Skip to main content

dbjson

Get started

things that you need:


  • Python

    • of course you need it

Installation


$- pip install dbjson

What is dbjson?


dbjson is Python module

Everyone say JSON can't be used as database but I don't think JSON can't be used as database

With this module you can use JSON as database since JSON is just Python dictionary

Example Code


Creating json file

import dbjson as db

db.new('database')

Add a data inside our database

db.data().new('database','data1','value1')

If you open the JSON file you can see that JSON file will automatically update

//Before
{}
//After
{"data1": "value1"}

How about we want to edit the data?

Well,you can use rewrite method

db.data().rewrite('database','data1','value2')

check the JSON file

//Before
{"data1": "value1"}
//After
{"data1": "value2"}

To remove data we use remove method

db.data().remove('database','data1')
//Before
{"data1": "value2"}
//After
{}

To remove all the data in our database,we use end method

db.data().end('database')

Quicklinks


Github

Discord Server

License


MIT License

Copyright (c) 2021 muhammad184276@gmail.com


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Release files for DBJSONS 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DBJSONS 1.0.2
File Size Uploaded
DBJSONS-1.0.2.tar.gz 2.8 kB Details

Built distribution (wheel)

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

Total release size: 6.2 kB

Release files / DBJSONS-1.0.2.tar.gz

Download URL DBJSONS-1.0.2.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2ee96b6a705ad277e8c78e3ce635ce758ad752cd6ac25683c3766bc6bd2d4665
BLAKE2b-256 checksum
How to use checksums
d825edf20f50bc602c3b2533871fc1caf080f944911593900a9ee5fe91fd1b26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Release files / DBJSONS-1.0.2-py3-none-any.whl

Download URL DBJSONS-1.0.2-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
741af40fffaeadfcd2d7752e0a79959f80b4d519ec7f4944480181cb173eada8
BLAKE2b-256 checksum
How to use checksums
198506cb5dd4b954fbc00d5d8ae94fa9c5be7588e5c46fcc88f9288d22d5e9ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Release history Release notifications | RSS feed

This release

1.0.2 This release

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