Didnodb is a lightweight NoSQL database implemented in Python using FastAPI. It provides user authentication, data storage, and basic CRUD operations without requiring a traditional database management system.
- User authentication (register, login, logout)
- Store and retrieve structured JSON data
- Session-based authentication
- Data indexing for faster retrieval
- Basic metrics for tracking users and stored data
# Clone the repository
git clone https://github.com/yourusername/didnodb.git
cd didnodb
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
# Install dependencies
pip install -r requirements.txtuvicorn main:didnodb --reload-
Register a new user
POST /register{ "username": "user1", "password": "securepassword" } -
Login
POST /login{ "username": "user1", "password": "securepassword" } -
Logout
POST /logout
-
Save Data
POST /data{ "data": { "key": "value" } } -
Get Specific Data
GET /data/{model_id} -
Get All User Data
GET /data -
Delete Data
DELETE /data/{model_id}
- Check Server Status
GET / - Get Metrics (Users & Stored Data Count)
GET /metrics
- User data is stored in
db/data/{username} - Each data entry is stored as a JSON file
{model_id}.json
- Implement indexing for faster queries
- Add support for data expiration (TTL)
- Improve security (hashed sessions, rate limiting)
- Introduce query filters
- Fork the repository
- Create a feature branch (
git checkout -b feature-name) - Commit your changes (
git commit -m 'Add feature') - Push to your branch (
git push origin feature-name) - Open a Pull Request
MIT License
Made with ❤️ by Deyan Sirakov