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.asynchronous as electrus
from electrus.exception import ElectrusException
client = electrus.Electrus()
database = client['mydb']
collection = database['mycollection']
async def main():
data = {
"id": "$auto",
"name": "Embrake | Electrus",
"email": ["embrakeproject@gmail.com", "control@vvfin.in"],
"role": "user"
}
try:
query = await collection.insert_one(data)
if query.success:
print("Data inserted successfully!")
except ElectrusException as e:
print("Something went wrong {}".format(e))
if __name__ == "__main__":
asyncio.run(main())
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",
"name": "Embrake | Electrus",
"email": ["embrakeproject@gmail.com", "control@vvfin.in"],
"role": "user"
}
try:
query = collection.insert_one(data)
if query.success:
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
Metadata
Release files for electrus 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| electrus-1.1.2.tar.gz | 32.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| electrus-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 79.4 kB
Release files / electrus-1.1.2.tar.gz
| Download URL | electrus-1.1.2.tar.gz |
|---|---|
| Size | 32.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83b8882a26a39f2e81349fb966008dec2b07f4de3df3bb6963fa52fae31a0d9c
|
|
BLAKE2b-256 checksum How to use checksums |
a9c06c14f29217d4bc7b9703591902f27c986996ba732a3190acdd826ae30c9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / electrus-1.1.2-py3-none-any.whl
| Download URL | electrus-1.1.2-py3-none-any.whl |
|---|---|
| Size | 46.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ad6e27c6c2349ee46430c62df5c549f1ee794dc31dc70796822a3021f7a20bf
|
|
BLAKE2b-256 checksum How to use checksums |
d6b7dd7187d4410c9ce90c05e50d5cecfeeecb96e2979056748d072db8e2d4a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for electrus 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.