Skip to main content

Improved and easy-to-use version of builtin Python's JSON

Project description

Chroma Database (ChrDB)

Improved and easy-to-use version of builtin Python's JSON

Key Features

  • Simple and easy-to-use syntax.
  • It is based on ujson, instead of default json, which speeds up the database.
  • You can use dots in the key arguments to search in child dictionaries.

Installing

Python 3.8 or higher is required.

# Linux/macOS
python3 -m pip install pychrdb

# Windows
py -3 -m pip install pychrdb

Usage

Print full database to the console:

from chrdb import ChrDB

database = ChrDB("database.json")
print(database.full())

Get the key from the database:

from chrdb import ChrDB

database = ChrDB("database.json")
database.find("key")

Update key value in the database:

from chrdb import ChrDB

database = ChrDB("database.json")
database.update(key="key", value="Hello, World!")

Update full database (value must be dict):

from chrdb import ChrDB

database = ChrDB("database.json")
database.update(key=None, value={"key": "Hello, World!"})

Delete key from the database:

from chrdb import ChrDB

database = ChrDB("database.json")
database.delete("key")

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

pychrdb-1.2.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

pychrdb-1.2.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pychrdb-1.2.1.tar.gz.

File metadata

  • Download URL: pychrdb-1.2.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for pychrdb-1.2.1.tar.gz
Algorithm Hash digest
SHA256 b4b826aea7658ae15fae88375cfb0847f293979cddcee7fc625d4d67808e9a71
MD5 45d5509f9cbe47e8b351e56f5ec1af9d
BLAKE2b-256 f815a3515e945da45e9966c58c3fa05ae9799e2f1cb91ce6e009ecbf21669484

See more details on using hashes here.

File details

Details for the file pychrdb-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: pychrdb-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for pychrdb-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9055868934299747ad38f866e4854d6dac28c0d185982a3f482f6c0e3fa0efe
MD5 ff7d28553054205ba80c0c9a44c24366
BLAKE2b-256 83859bea9d77cb2d18ce2401acd38adaf269e63a4b3bb40316aca9d2b4044b3d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page