Socket
Socket
Sign inDemoInstall

json-as-db

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-as-db

Using JSON as very lightweight database


Maintainers
1

JSON-as-DB

Python Version Badge RTD PyTest Badge PyPI Version Badge PyPI Download Badge Hits Badge

Using JSON as very lightweight database

>>> db = Database()
>>> db.load('output.json')   # Load database from file
>>> db.add([{                # Add items what you want to add
...   "id": "1002",
...   "type": "Chocolate"
... })
['FqkmbYFSCRCAHQWydhM69v', 'RUJGcVBFANvNRReXa8U3En']
>>> db.save('output.json', json_kwds={'indent': 4})   # Just save it into file.
// output.json
{
    "created_at": "2022-12-25T16:50:02.459068",
    "creator": "json_as_db",
    "data": {
        "FqkmbYFSCRCAHQWydhM69v": {
            "id": "1001",
            "type": "Regular"
        },
        "RUJGcVBFANvNRReXa8U3En": {
            "id": "1002",
            "type": "Chocolate"
        }
    },
    "updated_at": "2022-12-28T16:51:36.276790",
    "version": "1.0.0"
}

Documentation

Installation

Installing via pip:

pip install json-as-db

Installing via GitHub repository,

git clone https://github.com/joonas-yoon/json-as-db.git
pip install -e json-as-db

Contributing

Contributing guidelines can be found CONTRIBUTING.md.

Welcome all contributions to the community and feel free to contribute.

License

Under the MIT license. See the LICENSE file for more info.

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc