Open-source Reactive Python database
Project description
Skypy - open-source reactive database.
The better way to build Python logging system!
pip install skypydb # python client
# or download from the source
# git clone https://github.com/Ahen-Studio/skypy-db.git
# cd skypy-db
# pip install -r requirements.txt
Features
-
Simple: fully-documented
-
Table: create, update, delete data from a table
-
Observable: Dashboard with real-time data, metrics, and query inspection
-
Free & Open Source: MIT Licensed
TODO
- code the database backend
- Create the dashboard using Reflex
- write the documentation
- improve user data security
- code a custom cli
What's next!
- give us ideas!
API
- use the api with a custom config
import skypydb
# setup skypydb client.
client = skypydb.Client(path="./data/skypy.db")
# config to make custom table.
config = {
"all-my-documents": {
"title": "str",
"user_id": str,
"content": str,
"id": "auto"
},
"all-my-documents1": {
"title": "str",
"user_id": str,
"content": str,
"id": "auto"
},
"all-my-documents2": {
"title": "str",
"user_id": str,
"content": str,
"id": "auto"
},
}
# Create tables. get_table_from_config(config, table_name="all-my-documents"), delete_table_from_config(config, table_name="all-my-documents") are also available.
try:
table = client.create_table_from_config(config)# Create all the tables present in the config.
except Exception:
# Tables already exist, that's fine
pass
# Retrieve the table before adding any data.
table = client.get_table_from_config(config, table_name="all-my-documents")
# Add data to a table.
table.add(
title=["document"],
user_id=["user123"],
content=["this is a document"],
id=["auto"]# ids are automatically created by the backend.
)
# Keep the program running so the dashboard stays active
client.wait()
- use the api without a custom config
import skypydb
# setup skypydb client.
client = skypydb.Client(path="./data/skypy.db")
# Create table. get_table, delete_table are also available.
try:
table = client.create_table("all-my-documents")
except Exception:
# Tables already exist, that's fine
pass
# Retrieve the table before adding any data.
table = client.get_table("all-my-documents")
# Add data to the table.
table.add(
title=["document"],
user_id=["user123"],
content=["this is a document"],
id=["auto"]# ids are automatically created by the backend
)
# Keep the program running so the dashboard stays active
client.wait()
Dashboard
The dashboard starts automatically when you create a client. To keep it running after your operations:
import skypydb
client = skypydb.Client(path="./data/skypy.db")
# ... your operations here ...
# Keep the dashboard active
client.wait() # Dashboard accessible at http://127.0.0.1:3000
Dashboard options:
# Change the dashboard port
client = skypydb.Client(
path="./data/skypy.db",
dashboard_port=8080
)
# Disable auto-start
client = skypydb.Client(
path="./data/skypy.db",
auto_start_dashboard=False
)
# Start manually later
client.start_dashboard()
Learn more on our Docs
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 skypydb-0.1.2.tar.gz.
File metadata
- Download URL: skypydb-0.1.2.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e59eec1a4ce1cb999ce7f91d6a8f4c69d3810465e6b1be245b722648fb462656
|
|
| MD5 |
7b6a9b4e2da7a30ff316a1d7195f6495
|
|
| BLAKE2b-256 |
ed0fe1e2dc69f56300931fb13088e5358c1ec70c5be8ccf4702d9cd585cc2bce
|
Provenance
The following attestation bundles were made for skypydb-0.1.2.tar.gz:
Publisher:
python-publish.yml on Ahen-Studio/skypy-db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skypydb-0.1.2.tar.gz -
Subject digest:
e59eec1a4ce1cb999ce7f91d6a8f4c69d3810465e6b1be245b722648fb462656 - Sigstore transparency entry: 843421018
- Sigstore integration time:
-
Permalink:
Ahen-Studio/skypy-db@6dd34585074016b8ec29a4013cb04ade1f0792dc -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/Ahen-Studio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6dd34585074016b8ec29a4013cb04ade1f0792dc -
Trigger Event:
release
-
Statement type:
File details
Details for the file skypydb-0.1.2-py3-none-any.whl.
File metadata
- Download URL: skypydb-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03f783f9b0f8c8e7707f59e411fd202153c2aa4b890ade48535dd948002e9c4
|
|
| MD5 |
43cca4aac2dd8eccecd905862857012c
|
|
| BLAKE2b-256 |
02ab23642ee2083acb863cb97eebc89bc034293ca028954425d146aaf23cfba9
|
Provenance
The following attestation bundles were made for skypydb-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on Ahen-Studio/skypy-db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skypydb-0.1.2-py3-none-any.whl -
Subject digest:
f03f783f9b0f8c8e7707f59e411fd202153c2aa4b890ade48535dd948002e9c4 - Sigstore transparency entry: 843421023
- Sigstore integration time:
-
Permalink:
Ahen-Studio/skypy-db@6dd34585074016b8ec29a4013cb04ade1f0792dc -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/Ahen-Studio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6dd34585074016b8ec29a4013cb04ade1f0792dc -
Trigger Event:
release
-
Statement type: