PyDbJson
pydbjson is a simple Python library for managing JSON-based databases.
Table of Contents
Installation
You can install pydbjson using pip:
pip install pydbjson
Description
pydbjson provides a convenient way to interact with JSON-based databases in Python. It allows you to load data from a JSON file, insert, retrieve, delete, and find documents, and save the data back to the file.
Usage
Importing the library
from pydbjson.pydbjson import pydbjson
Creating an instance of pydbjson
db = pydbjson("database.json")
Create an instance of the pydbjson class by providing the filename or path of the JSON database file.
Inserting a document
document = {"name": "John", "age": 30}
key = db.insert_one(document)
Insert a document into the database. The insert_one method returns the key of the inserted document.
Find a document
document = {"name": "John"}
found_document = db.find_one(document)
Find a document from the database based on the provided data.
Deleting a document
db.delete_one(found_document)
Delete a document from the database based on the data.
Metadata
Release files for pydbjson 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydbjson-0.0.5.tar.gz | 3.3 kB | Without provenance | Details for pydbjson-0.0.5.tar.gz |
Release files / pydbjson-0.0.5.tar.gz
| Download URL | pydbjson-0.0.5.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca225a2447dd453a7c3e6cd63b67931a1a6f72240679449b9cb60a2539294ad7
|
|
BLAKE2b-256 checksum How to use checksums |
f6b117f0e80c5b04fbc6e0f32f2e5e222da9162d3805ae14398f8d4f0758732c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for pydbjson 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.