Skip to main content

A stripped-down version of pysondb.

Project description

strip.pysondb

GitHub Azure DevOps builds PyPI

A stripped-down version of pysondb by Fredy Somy.


🎉 Features.

  • No third party packages needed
  • No CLI
  • No ImageUtils
  • Use of python naming conventions in functions and classes.
  • Just the code required to perform CRUD operation on JSON DB.
  • Users can generate custom id's for their data.
  • DB clustering (User can access / modify multiple DB from a single point / class)

✏️️ Note

Even though it's called a stripped-down version, there are some huge differences in the way this package works.

  • The data is not saved to file instantly, instead a methods needs to be called in order to do that.
  • The user is supposed to pass the keys / column name for the DB during initialization of the DB class.
  • Some of the new methods that are not derived from PysonDB are,

🔻 Installation

  • Delete the original pysondb before installing this version. (Might cause conflicts)

  • From Pypi

    pip3 install strip.pysondb
    

📚 Usage

  • tl;dr

    from pysondb import DB
    
    db = DB(keys=["name", "age"])
    db.add({
        "name": "name1",
        "age": 1
    })
    
    print(db)
    
    from pysondb import DB
    from pysondb import Cluster
    
    users = DB(keys=["username", "password"])
    posts = DB(keys=["username", "title", "content"])
    
    c = Cluster({"users": users, "posts": posts})
    c.users.add({"username": "adwaith", "password": "123@45"})
    c.posts.add("username": "adwaith", "title": "Hello", "content": "Hello WOrld")
    c.commit("cluster.json", indent=2)  # use a single json file to store all the data from all the DB in the cluster
    

Click here to see the complete docs.


🥰 Contributing to strip.pysondb

Read the CONTRIBUTING.md for the code design style and linting preferences.

Once you've gone though it, follow theses steps.

  • Fork this repo.
  • Create a new branch from master. (Very important)
  • Make your required changes with good commit messages.
  • Write the test to make sure that your changes work.
  • Create a pull request.
  • Bug the maintainers until it get merged 😊.

🙊 Have any issue or feature request.

Create an issue or join our Discord server Here.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strip.pysondb-1.5.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

strip.pysondb-1.5.0-py2.py3-none-any.whl (7.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file strip.pysondb-1.5.0.tar.gz.

File metadata

  • Download URL: strip.pysondb-1.5.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for strip.pysondb-1.5.0.tar.gz
Algorithm Hash digest
SHA256 d71afb17c9eb74bdc57d083febd15653fbf7b2b12ccdc5454810993aa0699207
MD5 ebb18585e23b73478ead6415032ea07a
BLAKE2b-256 1218c6e066d1265dc1b1590042df8a7e68e21f123de5b2e4f00701609ef95835

See more details on using hashes here.

Provenance

File details

Details for the file strip.pysondb-1.5.0-py2.py3-none-any.whl.

File metadata

  • Download URL: strip.pysondb-1.5.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for strip.pysondb-1.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f98a88816a8b9ab507a7d5f69e08de0334bd3782a04a4da3a0e8bb05a6d27304
MD5 3d8e6a0bc3c3caf2c9cf32f2810872f8
BLAKE2b-256 e0a4b4262688c9d78e4b96cdf114504c3ab088f37fd42922c89a30cdc47a94ec

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page