Skip to main content

Electrus is a lightweight asynchronous & synchronous database module designed for Python.

Project description

Electrus Database

Electrus Logo

Electrus is a lightweight asynchronous & synchronous database module designed for Python, providing essential functionalities for data storage and retrieval.

Table of Contents

Overview

Electrus offers functionalities to manage collections and perform various operations such as insertion, updates, deletion, and data querying.

Installation

To install Electrus, use the following pip command:

$ pip install electrus

Getting Started

Asynchronous

import electrus.asynchronous as electrus

client = electrus.Electrus()
database = client['mydb'] # enter you desire database
collection = database['mycollection']

Synchronous

import electrus.synchronous as electrus

client = electrus.Electrus()
database = client['mydb'] # enter you desire database
collection = database['mycollection']

Examples

Asynchronous

Inserting data operation

# save this as main.py

import asyncio

import electrus as electrus
from electrus.exception import ElectrusException

client = electrus.Electrus()
database = client['mydb']
collection = database['mycollection']

async def handlecollectionOperations():
    query = await collection.insertMany(data_list = sample_users, overwrite = False)
    print(query.acknowledged)

    query = await collection.find().select("*").execute()
    if query.acknowledged:
        print(json.dumps(query.raw_result, indent=2))

    query = await collection.update(
        filter = {"age": {"$gt": 30}}, multi = True,
        update_data = {"$set": {"salary": 30000}}
    )

    print((await collection.find().select("*").execute()).raw_result)

    query = await collection.delete().where(id = 1).execute()
    if query.acknowledged:
        print((await collection.find().select("*").execute()).raw_result)

if __name__ == "__main__":
    import asyncio
    asyncio.run(handlecollectionOperations())

run the script

$ python main.py

Synchronous

Inserting data operation

# save this as main.py

import electrus.synchronous as electrus
from electrus.exception import ElectrusException

client = electrus.Electrus()
database = client['mydb']
collection = database['mycollection']

data = {
  "id": "auto_inc",
  "name": "Embrake | Electrus",
  "email": ["embrakeproject@gmail.com", "control@vvfin.in"],
  "role": "user"
}

try:
  query = collection.insert_one(data)
  if query:
    print("Data inserted successfully!")
except ElectrusException as e:
  print("Something went wrong {}".format(e))

run the script

$ python main.py

Documantation

The complete documantation available at http://electrus.vvfin.in.

Support

For any help and support feel free to contact us at embrakeproject@gmail.com or control@vvfin.in

🧰 Feature Roadmap

Feature Status
✅ Atomic Write Engine Complete
✅ Smart Insert Logic Complete
✅ Modular I/O Layer Complete
🔄 Transaction Support In Progress
🔄 Advanced Query Ops In Progress
🧪 Middleware Engine In Progress

Have ideas? Submit a GitHub Issue


❤️ Sponsor Electrus

Great open-source needs great community support.

If Electrus saves you time, sanity, or money — consider sponsoring:

Sponsor on GitHub

Every donation goes toward feature development, maintenance, and coffee ☕.


🔓 License

Electrus is open-source under the BSD License — flexible, permissive, and production-ready.


🎨 Final Thoughts

Electrus was crafted for those who care about code elegance, data safety, and developer happiness.

⚡ Electrus — Build fearlessly. Code beautifully.

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

axiomelectrus-1.1.1.tar.gz (71.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axiomelectrus-1.1.1-py3-none-any.whl (88.9 kB view details)

Uploaded Python 3

File details

Details for the file axiomelectrus-1.1.1.tar.gz.

File metadata

  • Download URL: axiomelectrus-1.1.1.tar.gz
  • Upload date:
  • Size: 71.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for axiomelectrus-1.1.1.tar.gz
Algorithm Hash digest
SHA256 a45a2c928c786d15a69921c7ce6eeb4ee6d38aa454bdfefafdd4dc4ceb60b5c0
MD5 d7a4cbdc3da6e9f91ef5365da5a12178
BLAKE2b-256 7b0ddd22fe0edc97a679291e640fd35b76fc00199f36896fd4911f4e07db908e

See more details on using hashes here.

File details

Details for the file axiomelectrus-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: axiomelectrus-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 88.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for axiomelectrus-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be3dd4e9474e5381a79a7bcf4ec797bdb831400d456fdcfd1dcc61bbda8713da
MD5 0028f13ffa6b66631e46f557f2e1c567
BLAKE2b-256 4f29e50a7d708eb51d35afec685929e02a4b578202b24a81bac8cc2b606e3b81

See more details on using hashes here.

Supported by

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