A lightweight Python database with SQL, API, dashboard, and distributed mode
Project description
👻 Ghostlite
Ghostlite is a lightweight Python database designed to make data storage simple and powerful for developers.
It allows you to store, query, and manage data directly in Python while providing built-in tools such as SQL querying, REST APIs, a web dashboard, an admin panel, and distributed database synchronization.
Ghostlite is perfect for local applications, prototypes, learning databases, and lightweight backend services.
🚀 Installation
Install Ghostlite using pip:
pip install ghostlite
⚡ Features
Ghostlite provides powerful capabilities while remaining lightweight.
🗄 Simple Data Storage
Create databases and tables easily using Python.
🧠 SQL Query Engine
Run SQL-like queries directly on your data.
🔍 Full Text Search
Search records using keywords.
🌐 REST API
Expose your database through a built-in API server.
📊 Web Dashboard
View tables and records directly in your browser.
👨💻 Admin Panel
Manage your database visually with a simple UI.
🔄 Distributed Mode
Synchronize multiple Ghostlite nodes for distributed databases.
🔐 Transaction Support
Basic transaction operations for safe updates.
🧑💻 Basic Example
import ghostlite
# create or open database
db = ghostlite.open("mydatabase")
# access table
users = db["users"]
# insert records
users.insert(name="Alice", age=25)
users.insert(name="Bob", age=30)
# read data
print(users.all())
Output example:
[
{'name': 'Alice', 'age': 25},
{'name': 'Bob', 'age': 30}
]
🧾 SQL Query Example
Ghostlite supports SQL-style queries.
import ghostlite
db = ghostlite.open("mydb")
result = db.query("SELECT * FROM users WHERE age=25")
print(result)
🌐 Running the Web Tools
Start Admin Panel
db.enable_admin()
Open in browser:
http://localhost:9000
Start REST API
db.enable_api()
Example endpoints:
http://localhost:5000/tables
http://localhost:5000/table/users
http://localhost:5000/query?sql=SELECT * FROM users
Start Dashboard
db.enable_dashboard()
Open:
http://localhost:8080
🔎 Full Text Search
db.enable_search()
results = db.search("users", "Alice")
print(results)
🔄 Distributed Database Example
Ghostlite supports simple distributed database synchronization.
db.enable_cluster([
"http://node1:5000",
"http://node2:5000"
])
💡 What You Can Build With Ghostlite
Ghostlite can be used for many types of projects:
• Local data storage applications • Lightweight backend services • Prototypes and MVPs • Developer tools • Learning database systems • Offline-first applications
🔗 Links
GitHub
https://github.com/praveenkumar83372
Portfolio
https://praveenkumart-portfolio.web.app/
👨💻 Author
Praveen Kumar
Developer passionate about building innovative software tools and systems.
📜 License
MIT License
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 ghostlite-1.0.2.tar.gz.
File metadata
- Download URL: ghostlite-1.0.2.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39b345a330a2470fe07b98d492cfe80cfe670c69b43595aa68c962d0bc106d0e
|
|
| MD5 |
916b7913793b3512d13c88260ce3dc6b
|
|
| BLAKE2b-256 |
69d6dc4ce93a0425a1955b8dcca7da2a39f4c4c55021a1930cae04dd7825a8f4
|
File details
Details for the file ghostlite-1.0.2-py3-none-any.whl.
File metadata
- Download URL: ghostlite-1.0.2-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
434ef44186749f4d4b2ba7609b31cc86c69bbe30f1d9a818f2e85e6c5977575c
|
|
| MD5 |
749b7ed52cd090c15cba1cc86cf3f972
|
|
| BLAKE2b-256 |
ea389b0ceccaea9df708519022461b96765110f1d184610f0fa68f7c26db46ac
|