![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
SQLite-powered document database with MongoDB-like syntax, full-text search, and advanced querying capabilities
SQLite-powered document database with MongoDB-like syntax, full-text search, and advanced querying capabilities. For complete examples of all features, PLEASE check out usage.py.
pip install zenithdb
from zenithdb import Database
# Initialize database
db = Database("myapp.db")
users = db.collection("users")
# Add document validation
def age_validator(doc):
return isinstance(doc.get('age'), int) and doc['age'] >= 0
users.set_validator(age_validator)
# Insert documents
users.insert({
"name": "John Doe",
"age": 30,
"tags": ["premium"],
"profile": {"city": "New York"}
})
# Query documents
users.find({
"age": {"$gt": 25},
"tags": {"$contains": "premium"}
})
# Full-text search
users.find({"*": {"$contains": "John"}})
# Nested updates
users.update(
{"name": "John Doe"},
{"$set": {
"profile.city": "Brooklyn",
"tags.0": "vip"
}}
)
# Aggregations
users.aggregate([{
"group": {
"field": "profile.city",
"function": "COUNT",
"alias": "count"
}
}])
# List and count collections
db.list_collections()
db.count_collections()
# Drop collections
db.drop_collection("users")
db.drop_all_collections()
# Print collection contents
users.print_collection()
users.count()
# Create indexes
db.create_index("users", ["email"])
db.create_index("users", ["profile.city", "age"])
# List indexes
db.list_indexes("users")
bulk_ops = users.bulk_operations()
with bulk_ops.transaction():
bulk_ops.bulk_insert("users", [
{"name": "User1", "age": 31},
{"name": "User2", "age": 32}
])
from zenithdb.migrations import MigrationManager
manager = MigrationManager(db)
migration = {
'version': '001',
'name': 'add_users',
'up': lambda: db.collection('users').insert({'admin': True}),
'down': lambda: db.collection('users').delete({})
}
manager.apply_migration(migration)
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
pytest tests/test_migrations.py
pytest --cov=zenithdb tests/
For complete examples of all features, check out usage.py. I would not recommend using this as a production database, but it's a fun project to play around with.
FAQs
SQLite-powered document database with MongoDB-like syntax, full-text search, and advanced querying capabilities
We found that zenithdb 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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.