Skip to main content

Lightweight NoSQL-like database with SQLite.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

🛠️ DuctTapeDB

DuctTapeDB is a lightweight, SQLite-powered, NoSQL-like database. It’s like a duct-tape fix for when you need simple JSON storage without the complexity of a full-blown database. Built with Python, it integrates neatly with Pydantic models for schema validation and object management.

Originally used for a hobby project of mine. Perfect for hobby projects or just experimenting with a "NoSQL but make it SQLite" approach. 🚀


Features

  • JSON Storage: Store and query JSON documents like you would in a NoSQL database.
  • Pydantic Integration: Use Pydantic models to validate and manage your data, and auto-save the models to the database.
  • Lightweight: Powered by SQLite—no server needed, works out-of-the-box!

TODO

  • Relationships: Simulate document relationships across tables.

Installation

You can install DuctTapeDB using pip:

pip install ducttapedb

Quickstart

Here's how you can get started:

  1. Create a Database
from ducttapedb.ducttapedb import DuctTapeDB

# Create an in-memory database
db = DuctTapeDB.create_memory()
  1. Define a Pydantic Model
from ducttapedb.ducttapemodel import DuctTapeModel

class MyDocument(DuctTapeModel):
    name: str
    value: int
  1. Save and Retrieve Data
# Create an instance
doc = MyDocument(name="Slime", value=42)

# Save to the database
doc.save(db)

# Retrieve by ID
retrieved_doc = MyDocument.from_id(db, doc.id)
print(retrieved_doc)

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

ducttapedb-2024.12.5.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

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

ducttapedb-2024.12.5.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file ducttapedb-2024.12.5.1.tar.gz.

File metadata

  • Download URL: ducttapedb-2024.12.5.1.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for ducttapedb-2024.12.5.1.tar.gz
Algorithm Hash digest
SHA256 c8da325c5356fb1d33bd7fc1ac6636aa3af8f7287a8bd478c1c493d38cfdb696
MD5 d686b6f2231f7186f68f8daecbf593e9
BLAKE2b-256 e9534099e656fe4ae88d7274e13d192b26f73483546b8e0f061c6337b1e84231

See more details on using hashes here.

File details

Details for the file ducttapedb-2024.12.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ducttapedb-2024.12.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95a49ecb443d1ded0b67d43e5761c6d8c2f4cebdd106862bea0505a75535e0c1
MD5 0db6684b1aaa8241f18d1460d4e4ab3f
BLAKE2b-256 eaf7acb7d533f451d3cb130e8a1c978b43c2fa269b42a904d5503694297cf7a5

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