
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
pynosqldb
Advanced tools
Absolutely! Here’s a full, detailed README for your PyNoSQL library, including installation, usage, JSON operations, indexing, compaction, and contribution instructions. I’ve structured it like a professional open-source project README.
PyNoSQL is a lightweight, JSON-based NoSQL database written in Python. It is designed for developers to learn, experiment, and practice NoSQL database concepts. PyNoSQL provides support for collections, indexes, write-ahead logging (WAL), compaction, and basic CRUD operations.
git clone https://github.com/yourusername/pynosqldb.git
cd pynosqldb
python -m pip install -e .
The
-eflag installs the library in editable mode, so you can modify it during development.
PyNoSQL requires Python 3.11+ and the msgpack library:
pip install msgpack
from pynosql.database import Database
# Create a database
db = Database("mydb")
db.open()
# Access or create a collection
users = db.collection("users")
user = {"name": "Alice", "age": 30, "email": "alice@example.com"}
user_id = users.insert(user)
print(f"Inserted document with _id: {user_id}")
import json
json_str = '{"name": "Bob", "age": 25, "email": "bob@example.com"}'
user = json.loads(json_str)
users.insert(user)
with open("users.json", "r") as f:
data = json.load(f)
if isinstance(data, list):
for user in data:
users.insert(user)
else:
users.insert(data)
# Find all users older than 25
results = users.find({"age": 30})
for user in results:
print(user)
# Update documents matching a query
users.update({"name": "Alice"}, {"$set": {"age": 31}})
# Delete documents matching a query
users.delete({"name": "Bob"})
# Create an index on the "age" field
db.create_index("users", "age")
# Indexed queries are faster
results = users.find({"age": 30})
Over time, updates and deletions leave stale data and tombstones. Use compaction to optimize storage:
db.compact()
This copies only the latest version of each document into a new DB file and removes deleted records.
Always close the database to flush data and indexes:
db.close()
pynosqldb/
│
├── pynosql/
│ ├── __init__.py
│ ├── database.py
│ ├── collection.py
│ ├── storage/
│ │ ├── engine.py
│ │ ├── wal.py
│ │ ├── compaction.py
│ │ └── metadata.py
│ ├── query/
│ │ ├── matcher.py
│ ├── update/
│ │ ├── updater.py
│ ├── index/
│ │ ├── btree.py
│ │ ├── index_manager.py
│ ├── cli.py
│ ├── util.py
│ └── errors.py
│
├── tests/
├── setup.py
├── pyproject.toml
├── README.md
├── LICENSE
└── example.ipynb
MIT License. See LICENSE file for details.
This README now includes JSON insertion, updates, queries, deletion, indexing, compaction, and a clear example workflow.
FAQs
PyNoSQLSB is a lightweight, JSON-based NoSQL database written in Python
We found that pynosqldb 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.