Skip to main content

Embedded JSON-based ORM-like database for small Python projects

Project description

tinyjsondb

tinyjsondb is a tiny, JSON-backed, embedded database with an ORM-like API.
It stores each model in a single .json file and provides CRUD operations through familiar Django-style managers.


Requirements

  • Python ≥ 3.8
  • portalocker (for cross-platform file locking)

Installation

install latest commit from GitHub

pip install git+https://github.com/Waland2/tinyjsondb.git

Quick start

from tinyjsondb import Model, IntegerField, StringField

class User(Model):
    path_to_file = "users.json" # store data in users.json
    age  = IntegerField()
    name = StringField(default="Anonymous")

User.sync()  # create or migrate the file

# create
alice = User.objects.create(age=24, name="Alice")

# read
bob = User.objects.get(age=24)

# update
bob.update(name="Bob")

# delete
bob.delete()

License MIT © 2025 Waland2

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

tinyjsondb-0.1.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

tinyjsondb-0.1.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file tinyjsondb-0.1.2.tar.gz.

File metadata

  • Download URL: tinyjsondb-0.1.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for tinyjsondb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4218edc9332c75b22f1fbb12d1743259bac3fab9305c9bbb7b85d813df76db03
MD5 4a03761e4f395190ba8afaf1bce157e4
BLAKE2b-256 8d64a39c7bfd756823fde1efc4075f72c6cebbb797ed15f90b28b829fe2c6a67

See more details on using hashes here.

File details

Details for the file tinyjsondb-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tinyjsondb-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for tinyjsondb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 666852ef7d8368ad1b91b103e6d6a44b2cd848ced41d434b71771327dd660849
MD5 c56b27f8abaaeb1df0fb2a4755c1f8ac
BLAKE2b-256 61208e755299b5a819e8c68fba9e41f1c1695ea893890a625c943ed90e341d75

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