A database writed entirely on python, Tinrux is not redis
Project description
Tinrux Database
A lightweight Redis-inspired database written in pure Python, designed for small-scale applications needing simple persistence.
✨ Features
- Redis-like commands:
SET,GET,DEL,EXPIRE, etc. - Auto-persistence: Saves data to JSON for more read (
tdb.json). - Server/Client mode: Runs as a standalone service.
- Zero dependencies: Pure Python (≥ 3.6).
- Autosaving system: Saves automatically the database (by default every 15 minutes).
- Cookie's management system: Has a cookie's management system for logins and more!
🚀 Installation
pip install tinrux
🛠️ Basic Usage
Make a new db:
tinrux server localhost 5000 new
Start a saved server:
tinrux server localhost 5000
Interactive client:
tinrux client localhost 5000
Python example:
(localhost:5000)>>> SET greeting "Hello Tinrux"
OK
(localhost:5000)>>> GET greeting
Hello Tinrux
📝 Why JSON?
Tinrux uses JSON for persistance due to several key advantages:
- Human-readable format: JSON files are easy to inspect and modify manually, making debugging and testing more straightforward.
- Language interoperability: JSON is widely supported across programming languages, allowing easy data export or import into other systems.
- Lightweight and structured: Perfect for small-scale applications where full databse engines are overkill, but a clear and structured format is still needed.
- Built-in support in Python: Using Python's standard
jsonmodule eliminates the need for external dependencies and ensures compatibility.
This choice aligns with Tinrux's philosophy of simplicity, transparency and minimalism.
📚 Available Commands
| Command | Description | Example |
|---|---|---|
| SET | Store a value | SET key value |
| GET | Retrieve a value | GET key |
| DEL | Delete a key | DEL key |
| EXPIRE | Set key expiration (sec) | EXPIRE key 10 |
| SAVE | Manual data persistence | SAVE |
| HELP | Help command | HELP |
📦 Project Structure
tinrux/
├── src/
│ └── tinrux/
│ ├── tinruxClient.py # Connection handler
│ ├── tinruxServer.py # Core database engine
│ ├── __about__.py # version
│ ├── __init__.py # packet
│ └── cli.py # Command-line interface
📄 License
tinrux is distributed under the terms of the GPLv3 license.
GNU General Public License v3.0 - See LICENSE.txt.
Contributors
Make pull request to be here!
Contributing
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 tinrux-0.0.9.tar.gz.
File metadata
- Download URL: tinrux-0.0.9.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4978ca6fbf6166cbe566fc40a7414897bba2d92c38f6b29bbc4f54968fa9eebb
|
|
| MD5 |
62d2286f11338cf175139c52d583fba2
|
|
| BLAKE2b-256 |
fd96c497a76e1344a7a14cfb56d642437b42b6130e331d1e2b7a23090222f75f
|
File details
Details for the file tinrux-0.0.9-py3-none-any.whl.
File metadata
- Download URL: tinrux-0.0.9-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef61b1c845d5fb27db7a3fae2b7f07ddadca01ee1d0228a3e1976e85cf0a7a62
|
|
| MD5 |
4710fee5e0a94f2f1ee22b80d66fefd1
|
|
| BLAKE2b-256 |
2cf8c155a8f905737b71e412556d49e3ef64360271e049e205050b5cf575422b
|