Skip to main content

A lightweight, JSON-based database library for Python

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysimdb-0.1.dev9.tar.gz (54.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysimdb-0.1.dev9-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file pysimdb-0.1.dev9.tar.gz.

File metadata

  • Download URL: pysimdb-0.1.dev9.tar.gz
  • Upload date:
  • Size: 54.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pysimdb-0.1.dev9.tar.gz
Algorithm Hash digest
SHA256 6485e89d3d92dd6e6551ed79a4255242f3b1a3fa4185df37c136a3f7d0e5e8bc
MD5 f130401832c499ec2d83c4c62b894887
BLAKE2b-256 1d54aaf10381f58118cdeb989cddfbf0ba421c447982fe6903fe6d93443a75f3

See more details on using hashes here.

File details

Details for the file pysimdb-0.1.dev9-py3-none-any.whl.

File metadata

  • Download URL: pysimdb-0.1.dev9-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pysimdb-0.1.dev9-py3-none-any.whl
Algorithm Hash digest
SHA256 95f61c716c8fb56268cce2408fb866d78fe396ca3edaf3ec0aa58ceeb0983d19
MD5 5c895dae8ec71f0d6a3e00a75db6490d
BLAKE2b-256 2d54af72d78ccf09bec4b1afbf5b44ad0a879e629299bfefc087f2871f76e0f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page