Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pychrdb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pychrdb

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

  • 1.2.1
  • PyPI
  • Socket score

Maintainers
1

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")

Keywords

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc