You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

tinyjsondb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinyjsondb

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

0.1.2
pipPyPI
Maintainers
1

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

Keywords

json

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts