Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Sqlite-Worker is a Python package providing a thread-safe interface for SQLite database operations. It ensures safe concurrent access to SQLite databases and simplifies executing database queries from different threads.
To install, run:
pip3 install sqlite-worker
To create a basic instance of Sqlite3Worker by specifying the path to your SQLite database file:
from sqlite_worker import SqliteWorker
worker = SqliteWorker("/path/to/your/database.db")
Create a SqliteWorker
instance with initialization actions (such as setting pragmas):
from sqlite_worker import SqliteWorker
init_actions = [
"PRAGMA journal_mode=WAL;",
"PRAGMA synchronous=NORMAL;",
"PRAGMA temp_store=MEMORY;"
]
worker = SqliteWorker("/path/to/your/database.db", execute_init=init_actions)
Create a SqliteWorker instance with initialization actions and set a maximum query count for regular commits:
from sqlite_worker import SqliteWorker
init_actions = [
"PRAGMA journal_mode=WAL;",
"PRAGMA synchronous=NORMAL;",
"PRAGMA temp_store=MEMORY;"
]
worker = SqliteWorker("/path/to/your/database.db", execute_init=init_actions, max_count=50)
worker.execute("CREATE TABLE example (id INTEGER PRIMARY KEY, name TEXT)")
worker.execute("INSERT INTO example (name) VALUES (?)", ("Alice",))
token = worker.execute("SELECT * FROM example")
results = worker.fetch_results(token)
print(results)
After completing all database operations, close the worker to ensure proper cleanup:
worker.close()
Contributions to the Sqlite-Worker are welcome! Please refer to the project's issues and pull request sections for contributions.
FAQs
Thread-safe SQLite3 worker for Python
We found that sqlite-worker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.