
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
matsushibadb
Advanced tools
MatsushibaDB - Next-Generation SQL Database with Local Support, Caching, and Async/Await
Version 1.0.9 Next-Generation SQL Database with Local Support, Caching, and Async/Await
MatsushibaDB is a powerful, production-ready database system that combines the simplicity of local databases with the power of distributed systems. Built for modern applications requiring high performance, security, and scalability.
# Basic installation
pip install matsushibadb
# With server features
pip install matsushibadb[server]
# With async support
pip install matsushibadb[async]
# Development installation
pip install matsushibadb[dev]
import matsushibadb
# Local database
db = matsushibadb.MatsushibaDBClient(
mode='local',
database='myapp.msdb'
)
await db.initialize()
# Create table
await db.execute('''
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT UNIQUE
)
''')
# Insert data
await db.execute(
'INSERT INTO users (name, email) VALUES (?, ?)',
['John Doe', 'john@example.com']
)
# Query data
users = await db.execute('SELECT * FROM users')
print(users.rows)
await db.close()
import matsushibadb
# Start server
server = matsushibadb.MatsushibaDBServer(
database='server.msdb',
port=8000,
enable_security=True
)
await server.start()
print('Server running on http://localhost:8000')
client = matsushibadb.MatsushibaDBClient(
mode='hybrid', # 'local', 'remote', 'hybrid'
database='app.msdb', # Database file path
protocol='https', # 'http', 'https', 'tcp', 'websocket'
host='api.example.com', # Server host
port=443, # Server port
username='user', # Authentication username
password='pass', # Authentication password
timeout=30, # Request timeout (seconds)
retries=3, # Retry attempts
cache={
'enabled': True, # Enable caching
'max_size': 1000, # Max cache entries
'ttl': 300 # Cache TTL (seconds)
},
encryption={
'enabled': True, # Enable encryption
'key': 'your-key' # Encryption key
}
)
server = matsushibadb.MatsushibaDBServer(
database='server.msdb',
port=8000,
host='0.0.0.0',
enable_security=True,
enable_rate_limit=True,
enable_audit_log=True,
cors={
'origin': '*',
'methods': ['GET', 'POST', 'PUT', 'DELETE'],
'credentials': True
},
ssl={
'enabled': False,
'key': 'path/to/key.pem',
'cert': 'path/to/cert.pem'
}
)
# Create user
await client.create_user(
username='admin',
password='secure-password',
role='admin',
permissions=['read', 'write', 'delete']
)
# Authenticate
token = await client.authenticate_user('admin', 'secure-password')
# Role-based access
await client.execute('SELECT * FROM sensitive_data') # Requires 'read' permission
# Enable file encryption
client = matsushibadb.MatsushibaDBClient(
database='secure.msdb',
encryption={
'enabled': True,
'algorithm': 'aes-256-cbc',
'key': 'your-encryption-key'
}
)
# Enable audit logging
server = matsushibadb.MatsushibaDBServer(
enable_audit_log=True,
audit_log={
'level': 'info',
'file': '/var/log/matsushiba-audit.log'
}
)
# Get audit logs
logs = await client.get_audit_log(
start_date='2025-01-01',
end_date='2025-01-31',
user='admin'
)
| Operation | MatsushibaDB | SQLite | PostgreSQL | MySQL |
|---|---|---|---|---|
| Single Insert | 0.001s | 0.002s | 0.005s | 0.008s |
| Single Select | 0.0005s | 0.001s | 0.003s | 0.004s |
| Batch Insert (1000) | 0.08s | 0.15s | 0.25s | 0.35s |
| Complex Join | 0.12s | 0.18s | 0.30s | 0.45s |
| Concurrent Ops | 20,000/sec | 5,000/sec | 2,000/sec | 1,500/sec |
# Run the lightning demo to see hyper-performance
python -m matsushiba_db.test.lightning_demo
# Results:
# E-commerce: 1000 operations in 0.142s (7,066 ops/sec)
# Banking: 1000 operations in 0.154s (6,505 ops/sec)
# Healthcare: 1000 operations in 0.156s (6,391 ops/sec)
# Analytics: 1000 operations in 0.156s (6,424 ops/sec)
# Sub-millisecond operations
start = time.time()
await client.execute('INSERT INTO users (name) VALUES (?)', ['John'])
insert_time = time.time() - start # < 0.001s
# Microsecond-level queries
start = time.time()
result = await client.execute('SELECT * FROM users WHERE id = ?', [1])
query_time = time.time() - start # < 0.0005s
# Batch operations at scale
start = time.time()
async with client.transaction() as tx:
for i in range(1000):
await tx.execute('INSERT INTO products (name) VALUES (?)', [f'Product {i}'])
batch_time = time.time() - start # < 0.1s for 1000 inserts
# Enable hyper-performance caching
client = matsushibadb.MatsushibaDBClient(
cache={
'enabled': True,
'max_size': 50000, # Large cache for maximum performance
'ttl': 3600 # 1 hour cache
}
)
# Use prepared statements for maximum speed
stmt = await client.prepare('SELECT * FROM users WHERE id = ?')
user = await stmt.get(1)
await stmt.finalize()
# Batch operations for maximum throughput
async with client.transaction() as tx:
for user in users:
await tx.execute('INSERT INTO users (name) VALUES (?)', [user.name])
# Quick test suite
python -m matsushibadb.test.quick_suite
# Comprehensive tests
python -m matsushibadb.test.comprehensive
# Stress tests
python -m matsushibadb.test.stress
# Military-grade tests
python -m matsushibadb.test.military
# Enterprise tests
python -m matsushibadb.test.enterprise
# All tests
python -m matsushibadb.test.all
# Pull image
docker pull matsushiba/matsushibadb:latest
# Run container
docker run -d \
--name matsushiba-db \
-p 8000:8000 \
-v /path/to/data:/app/data \
matsushiba/matsushibadb:latest
version: '3.8'
services:
matsushiba-db:
image: matsushiba/matsushibadb:latest
ports:
- "8000:8000"
volumes:
- ./data:/app/data
environment:
- MATSUSHIBA_DB_PATH=/app/data
- MATSUSHIBA_SERVER_PORT=8000
# Install with PM2 equivalent
pip install matsushibadb[server]
# Start server
matsushiba-server --config production.json
# Monitor
matsushiba-server --monitor
# Check server health
curl http://localhost:8000/health
# Get metrics
curl http://localhost:8000/metrics
# Check database status
curl http://localhost:8000/api/status
# Enable monitoring
client = matsushibadb.MatsushibaDBClient(
monitoring={
'enabled': True,
'slow_query_threshold': 1.0, # seconds
'metrics_interval': 60 # seconds
}
)
# Get metrics
metrics = client.get_metrics()
print(metrics)
# Create backup
matsushiba-backup --database app.msdb --output backup-$(date +%Y%m%d).msdb
# Restore from backup
matsushiba-restore --database app.msdb --input backup-20250101.msdb
# Add to crontab
0 2 * * * matsushiba-backup --database app.msdb --output /backups/backup-$(date +\%Y\%m\%d).msdb
This software is licensed under the Matsushiba Proprietary License. See LICENSE for details.
MatsushibaDB is developed by Matsushiba Systems & Foundation - delivering enterprise-grade database solutions for modern applications.
Ready to get started? Check out our Installation Guide or explore Examples & Tutorials!
FAQs
MatsushibaDB - Next-Generation SQL Database with Local Support, Caching, and Async/Await
We found that matsushibadb 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
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.