Skip to main content

PySimDB

A lightweight, JSON-based database library for Python that provides a simple yet powerful interface for storing and querying structured data.

Features

  • Schema Validation: Enforce data types and required fields
  • CRUD Operations: Create, Read, Update, Delete records
  • Query Builder: Flexible querying with WHERE, ORDER BY, LIMIT, OFFSET
  • Joins: Join related data from multiple tables
  • Transactions: Atomic operations with rollback support
  • Indexing: Secondary indexes for improved query performance
  • Lightweight: Pure Python implementation with minimal dependencies
  • High Performance: Uses pysimdjson for fast JSON parsing

Installation

pip install pysimdb

Quick Start

from pysimdb import JsonDatabase, TableSchema

# Initialize database
db = JsonDatabase("data")

# Define a schema
user_schema = TableSchema({
    "id": int,
    "name": str,
    "age": int,
    "email": str
}, primary_key="id")

# Create table
db.create_table("users", user_schema)

# Insert data
user = {"id": 1, "name": "John Doe", "age": 30, "email": "john@example.com"}
db.insert("users", user)

# Query data
users = db.query("users").where("age", ">", 25).all()
print(users)

Performance

PySimDB uses pysimdjson for high-performance JSON parsing, which significantly improves read performance compared to the standard library's json module.

License

This project is licensed under the GNU General Public License v3.0.

Metadata

Release files for pysimdb 0.1.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysimdb 0.1.15
File Size Uploaded
pysimdb-0.1.15.tar.gz 46.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysimdb 0.1.15
File Interpreter ABI Platform
pysimdb-0.1.15-py3-none-any.whl Python 3 none any Details

Total release size: 79.3 kB

Release files / pysimdb-0.1.15.tar.gz

Download URL pysimdb-0.1.15.tar.gz
Size 46.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e4d754acbfc1cc5406952420aa2a85ff4e739cecb19479917a389082536214be
BLAKE2b-256 checksum
How to use checksums
55a567137b4e53a2e1f7ea658a7fd06ac302b17be13382735811ea7ab312adf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / pysimdb-0.1.15-py3-none-any.whl

Download URL pysimdb-0.1.15-py3-none-any.whl
Size 32.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a753c48d6b18a4f78e002a4a2c4376124296ad445146508809240fd6b0672ce
BLAKE2b-256 checksum
How to use checksums
7aa74c965d4c8a85f980ebbeee819f6c8b22ee7a6f4f62814d6912cc73cff90d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.15 This release

2 release files

0.1.14

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page