Skip to main content

JsonDB

Uses

I'm using this for my Telegram bot and Elysian's Chemistry Bot.

Usage

  1. Add it to your project as dependency, for example if you use uv:
uv add jsondb-hakimifr
  1. profit!!!
from jsondb.database import Database

db = Database("foo.json")
db.read_database()  # actually redundant as __init__ will call this

db.data = {"hello": "world"}
db.write_database()

Extras

  • There's a callback registered to atexit module, so that a crash doesn't throw away unsaved stuff.
  • Minimal safeguard to prevent multiple instances from opening the same file at the same time (I don't even know if it actually works lol).

License

SPDX-License-Identifier: Apache-2.0

Copyright 2025 Firdaus Hakimi <hakimifirdaus944@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

or

    the LICENSE file in this repository.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Metadata

Release files for jsondb-hakimifr 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jsondb-hakimifr 0.4.0
File Size Uploaded
jsondb_hakimifr-0.4.0.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jsondb-hakimifr 0.4.0
File Interpreter ABI Platform
jsondb_hakimifr-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / jsondb_hakimifr-0.4.0.tar.gz

Download URL jsondb_hakimifr-0.4.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
571559231d0966c58d38f11abd36c2cb277058e691dff5e267769109325889d8
BLAKE2b-256 checksum
How to use checksums
14ed96f69b4284426e638f84f090db90dee152f4337bf54678758ef224acb640
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"46","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / jsondb_hakimifr-0.4.0-py3-none-any.whl

Download URL jsondb_hakimifr-0.4.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40b91f0a6931023428b8c5b49e64f3d4f579867fe08801b4edf8967f29b302e7
BLAKE2b-256 checksum
How to use checksums
7e892e072831a4ff57f484f4bd46813abfa7ff4404e9253853b0210065a6d09d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"46","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page