Skip to main content

JsonDB

This is a simple I/O JSON handler that allows direct operations on JSONs and with a single call to JsonDB.flushAllyou can save them all on permanent memory.

Example

from JsonDB import JsonDB

class Foo:
    def __init__(self):
        self.db = JsonDB("Foo.json", {"param1": [1,2,3,4], "param2": {"a": 1, "b": 2}})
        self.params = self.db.getJSON()

    def changeParam1(self, value):
        self.params["param1"] = value

    def changeParam2(self, value):
        self.params["param2"] = value

foo = Foo()

foo.changeParam1([1,2,3])
foo.changeParam2(14)

# Save all JSON on respective files
JsonDB.flushAll()

Tests

Automated tests can be run with pytest-3 test.py.

Metadata

Release files for JsonDB-labm1997 0.0.3.post1

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-labm1997 0.0.3.post1
File Size Uploaded
JsonDB-labm1997-0.0.3.post1.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for JsonDB-labm1997 0.0.3.post1
File Interpreter ABI Platform
JsonDB_labm1997-0.0.3.post1-py3-none-any.whl Python 3 none any Details

Total release size: 19.0 kB

Release files / JsonDB-labm1997-0.0.3.post1.tar.gz

Download URL JsonDB-labm1997-0.0.3.post1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3d3710c2909b56a8453b10fa9a436061f64241f57348f49f618ad901c383aa8b
BLAKE2b-256 checksum
How to use checksums
020b6a6c8fb4630b9ed49febc3bec96bd2828874965c41b7c5d2d8eb4265f5c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

Release files / JsonDB_labm1997-0.0.3.post1-py3-none-any.whl

Download URL JsonDB_labm1997-0.0.3.post1-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
185e5e7d64e32bc3b4e82a4f3e2cb82bda8f79e91e96a293040ad9ec448708e9
BLAKE2b-256 checksum
How to use checksums
7d385dc1ef7e1787059d043e22496803a7960e2a6b2e91f8119877c39b3be6e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.0.3.post1 This release

2 release files

0.0.3

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