Skip to main content

Tinrux Database

PyPI - Version PyPI - Python Version License: GPLv3


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 json module 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
PUSH PUSH NEW DATA PUSH key 5
POP POP A VALUE POP key
STACK initializes a entry as a stack POP key
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

Contributing

Metadata

Release files for tinrux 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tinrux 0.1.5
File Size Uploaded
tinrux-0.1.5.tar.gz 28.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tinrux 0.1.5
File Interpreter ABI Platform
tinrux-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 59.0 kB

Release files / tinrux-0.1.5.tar.gz

Download URL tinrux-0.1.5.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dc392fce2986cd74a8e58b6486907797a974cb5b9e3c869b2ab4e6dc46754456
BLAKE2b-256 checksum
How to use checksums
fcae6bebd52d8917b1b6692560f2890353fb13828d210a38e1e5c25466ae7bc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / tinrux-0.1.5-py3-none-any.whl

Download URL tinrux-0.1.5-py3-none-any.whl
Size 30.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53a37bb5eb074a7bd9faba68e0c5eb13ef2f842844ca4569310954cb03a6857b
BLAKE2b-256 checksum
How to use checksums
035e286af5b05d501aea1a534f98393cc02b0537e4dd02ae926a49f60c95330e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page