Skip to main content

Another stupid library for using json as Database

Project description

https://raw.githubusercontent.com/aurkaxi/AshenDB/master/docs/source/AshenDB_Logo.png Documentation Status

AshenDB

AshenDB is a another stupid library for using json as Database. It mimics MongoDB functionalities.

Why AshenDB?

  • MongoDB : Needs a server to run. You can clone your MongoDB to AshenDB. AshenDB is highly inspired from MongoDB, it uses MongoDB like syntax, which makes it easy to use for beginners as well as for MongoDB users.

  • TinyDB : Too simple. Query and Update Operators such as $set, $inc are not supported. Check all the supported Operators in AshenDB. Also it is not thread safe.

  • JsonDB : It is not thread safe. Neither it supports mongodb like syntax.

Why not AshenDB?

It is immature. It doesn’t use separate server but uses json as a database. Which may be good for small or medium projects but for large and scalable projects it is recommended to use MongoDB with Redis as a cache.

Installation

It is available on PyPI. You can install it using pip.

pip install ashendb

Usage

>>> from ashendb import AshenDB
# Assuming you are inside a async function
>>> db = await AshenDB.get_db('test')
>>> db
<AshenDB: test>
>>> coll = await db.get_coll('users')
>>> coll
<Collection: users>
>>> doc = await coll.get_doc('user1')
>>> doc
<Document: user1>
>>> print(doc)
{'_id': 'user1'}

Documentation

Documentation is available at Read the Docs.

Contributing

  • Open an issue.

  • Fork the repository -> New Branch -> Make Changes -> Open a Pull Request.

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

AshenDB-0.0.8.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

AshenDB-0.0.8-py3-none-any.whl (13.3 kB view hashes)

Uploaded Python 3

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