Skip to main content

Open-source Reactive Python database

Project description

Skypy Skypy

Skypy - open-source reactive database.
The better way to build Python logging system!

License | | Docs

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

MIT

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

skypydb-0.1.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

skypydb-0.1.2-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

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

Hashes for skypydb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e59eec1a4ce1cb999ce7f91d6a8f4c69d3810465e6b1be245b722648fb462656
MD5 7b6a9b4e2da7a30ff316a1d7195f6495
BLAKE2b-256 ed0fe1e2dc69f56300931fb13088e5358c1ec70c5be8ccf4702d9cd585cc2bce

See more details on using hashes here.

Provenance

The following attestation bundles were made for skypydb-0.1.2.tar.gz:

Publisher: python-publish.yml on Ahen-Studio/skypy-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for skypydb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f03f783f9b0f8c8e7707f59e411fd202153c2aa4b890ade48535dd948002e9c4
MD5 43cca4aac2dd8eccecd905862857012c
BLAKE2b-256 02ab23642ee2083acb863cb97eebc89bc034293ca028954425d146aaf23cfba9

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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