Skip to main content

jsodb

Mine database realization that uses .json files.

How to work with it?

Instalation: python3 -m pip install jsodb

Basic funcs:

import jdb
getkeyval("key") # returns key val
addkey(key=val) # adds keys to json
changekey("key", val) # changes key to new val
createjson("/path/to/file" """without .json""") # new .json file (without decorator)
addtokey("key", int) # key += int
subfromkey("key", int) # key -= int
addmultikey("key", key=val, key2=val2) # new multi key {key: {"key": "val", "key2", "val2"}}
@json("/path/to/file") # main decorator

To use all that functions you need function with decorator, json file will be: opened, edited, saved.

Basic usage:

@json("profile.json")
def func():
	print(getkeyval(balance)) ### 1
	changekey(balance, 10) ### {balance=10}
	addkey(deposit=100) ### {balance=10, deposit=100}
	print(f"{getkeyval(balance)}\n{getkeyval(deposit)}")
	"""
	10
	100
	"""

func() ### changes applied

Release files for jsodb 1.6.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 jsodb 1.6.0
File Size Uploaded
jsodb-1.6.0.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jsodb 1.6.0
File Interpreter ABI Platform
jsodb-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / jsodb-1.6.0.tar.gz

Download URL jsodb-1.6.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5567c3f668faa8bd3be3f0f5b5fb001998928b530e74331476f7448a384aebe2
BLAKE2b-256 checksum
How to use checksums
781d55b1ef78c7b9439c460bd6bc2f57c5290145f19ee9392d5b0bfb0383990c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / jsodb-1.6.0-py3-none-any.whl

Download URL jsodb-1.6.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62860d69740e2071599218268a3f5b30d418b00e0c4a06020eddf1cbf00232a2
BLAKE2b-256 checksum
How to use checksums
908c0a6fb02a78245f14ad26f9ca893fe4c8e2e9c8fa06daf2fa4b55c6df9a11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files

1.5.5

2 release files

1.5.0

2 release files

1.0.1

2 release files

1.0.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