Rootoi is a nosql ,lightweight, file-based database management system that provides basic CRUD (Create, Read, Update, Delete) operations along with hashing mechanisms for data security.
Project description
Rootoi
Rootoi is a nosql ,lightweight, file-based database management system that provides basic CRUD (Create, Read, Update, Delete) operations along with hashing mechanisms for data security.
Features
- Store and manage data in a simple file-based format.
- Secure data with SHA-256 hashing.
- Read and retrieve entries using unique identifiers.
- Update and delete entries.
- Verify database integrity.
- Acts as NoSQL database
Installation
Ensure you have Python 3 installed on your system.
pip install -r requirements.txt # if dependencies are needed
Usage
Initialize the Database
from rootoi import Rootoi
db = Rootoi("database_name", 4) # Initialize with database name and entry column count
Methods
__init__(database: str, rc: int)
Initializes the Rootoi database.
database: Name of the database.rc: Number of columns for each entry.
create_project(project: str, column: int)
Imported from rootoi.project
Creates a new database project.
project: Name of the project.column: Number of columns per entry.- Generates two files:
{project}.config.jsonand{project}.rootoi. - The config file initializes default security settings.
Example:
from rootoi.project import create_project
create_project("my_database", 4)
create_entry(*entry)
Adds a new entry to the database.
entry: Variable number of values (must matchrcfrom initialization).- Returns the generated entry ID.
Example:
db.create_entry("John Doe", "johndoe@example.com", "password123", "Admin")
read_all_entry()
Retrieves all entries in the database.
- Returns a list of dictionaries containing stored entries.
Example:
entries = db.read_all_entry()
print(entries)
read_entry(id: str)
Retrieves a specific entry by ID.
id: The unique identifier for an entry.- Returns the corresponding entry data.
Example:
entry = db.read_entry("Syh8ZZC2aIItAWA5xDDy33Pf8VHPWpjWPbZBWM6Bci04KIW9NWPQsj4b7PmKBUKO1UlDFcs8AYeBSipBXjsivSIEZi9ZR6Nnz0nOeyzlND9")
print(entry)
delete_all_entry()
Deletes all entries in the database.
Example:
db.delete_all_entry()
delete_entry(id: str)
Deletes a specific entry by ID.
id: The unique identifier of the entry to delete.
Example:
db.delete_entry("eRPW69QnPKAyAJC8jkW9c5IxYz4h8PDWXObllPGgY6JCUHh2P7ODuOYSuNfAoaC0Qaywh3iejV0JzZZeQrh6wAQvdhSqielUPeO7pw7PQ8Kf")
update_entry(id: str, column: int, value)
Updates a specific entry.
id: The unique identifier of the entry.column: The column index to update.value: The new value to set.
Example:
db.update_entry("V7Nnqyxcqw2CasP5QP26NG7wFtE0HD2YGQEUfLi6B4ExYlGkFqhyN6NndINEmLl8dN6AdmC7YzvGUBsOseBqTzz7qsukzKF8q7PYgjhuYHcE", 3, "New Value")
hash_dev_sha256()
Applies SHA-256 hashing to all stored entries that are not yet hashed.
Example:
db.hash_dev_sha256()
Security
- Uses SHA-256 hashing for sensitive data storage.
- Ensures database integrity through versioning and configuration verification.
License
This project is licensed under the MIT License.
Author
Developed by Akshay
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 rootoi-1.0.4.tar.gz.
File metadata
- Download URL: rootoi-1.0.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1c531a0dc9017fc45c18bdd3463ef904467054199f24b035dc771ff3a1f9d8a
|
|
| MD5 |
9495e1f77d9e17792d02a73e3dd01375
|
|
| BLAKE2b-256 |
a4c1e43ffb186aa0be497d50468996974b196a17ad408c71af1ae171ef9be7be
|
File details
Details for the file rootoi-1.0.4-py3-none-any.whl.
File metadata
- Download URL: rootoi-1.0.4-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f65e7c327b2ee5589e33d253484322c78ecc054d246b0ccd955ab811f6aa9a2
|
|
| MD5 |
b39cd42af1d65077488854665d37ff58
|
|
| BLAKE2b-256 |
199a388a8c7a57a3691c1d10d0937b895bea306146cdd8e07debf137967d65da
|