Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghostlite-1.0.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghostlite-1.0.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file ghostlite-1.0.1.tar.gz.

File metadata

  • Download URL: ghostlite-1.0.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for ghostlite-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1b9fa196cd1223ceb2a8797720fe62724c7a49f6e793421e48db236a0a8c94d4
MD5 3005c1304769160d18bb7aa748089e88
BLAKE2b-256 a63dbb8c5578edb7d5bfa466eeda157fead6b75d8d0c797fceaecbe8fa4f3c5a

See more details on using hashes here.

File details

Details for the file ghostlite-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ghostlite-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for ghostlite-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18498fddeb360f9cac51401c97acbfc169c0c24ba6bd67c90b352e2597e40244
MD5 166aa07625538a88c35ec3a447537831
BLAKE2b-256 c9645933576f779cbe2dc0e062caeb6d9b2b04401aa80b5d5ec6dc4146ccf43d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page