Electrus is a lightweight, MongoDB-style asynchronous and synchronous database module designed for Python.
Project description
Electrus Database
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:
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axiomelectrus-1.1.2.tar.gz.
File metadata
- Download URL: axiomelectrus-1.1.2.tar.gz
- Upload date:
- Size: 71.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
895128f65d64c38d992aa3a233a0f53e0241368da2bc312641799c5ca558285b
|
|
| MD5 |
2aec284a49bf588e8cf8f1fb68fda10a
|
|
| BLAKE2b-256 |
63ce3cb17d861ee07d0dba1ef993ce2797acdb3501c2937c6c980b5f4f7ebed3
|
File details
Details for the file axiomelectrus-1.1.2-py3-none-any.whl.
File metadata
- Download URL: axiomelectrus-1.1.2-py3-none-any.whl
- Upload date:
- Size: 89.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88b9dc3099ab517f3fb0b6f4c315e1cede2ed04616c29a6aa33e3ac1387449cb
|
|
| MD5 |
2654cfb196a17a3d8c83f02a195ac5cd
|
|
| BLAKE2b-256 |
521640da1d6958e5692576df0813e296c0917667a12076c0c74ae1e64ef63276
|