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:
- Create a Database
from ducttapedb.ducttapedb import DuctTapeDB
# Create an in-memory database
db = DuctTapeDB.create_memory()
- Define a Pydantic Model
from ducttapedb.ducttapemodel import DuctTapeModel
class MyDocument(DuctTapeModel):
name: str
value: int
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8da325c5356fb1d33bd7fc1ac6636aa3af8f7287a8bd478c1c493d38cfdb696
|
|
| MD5 |
d686b6f2231f7186f68f8daecbf593e9
|
|
| BLAKE2b-256 |
e9534099e656fe4ae88d7274e13d192b26f73483546b8e0f061c6337b1e84231
|
File details
Details for the file ducttapedb-2024.12.5.1-py3-none-any.whl.
File metadata
- Download URL: ducttapedb-2024.12.5.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95a49ecb443d1ded0b67d43e5761c6d8c2f4cebdd106862bea0505a75535e0c1
|
|
| MD5 |
0db6684b1aaa8241f18d1460d4e4ab3f
|
|
| BLAKE2b-256 |
eaf7acb7d533f451d3cb130e8a1c978b43c2fa269b42a904d5503694297cf7a5
|