Skip to main content

PieData is a database based on separate files.

Project description

PieData is an ORM-wrapped file database that supports SQL-like commands via WebSocket server. Each table is stored as a folder, each record as an XML file. The ORM layer allows you to work with Python models, and the server handles client commands via WebSocket.

Usage example

models.py

from PieData import IntegerField, StringField, DatetimeField, FloatField, PieModel

class User(PieModel):
    name = StringField(max_length=255)
    age = IntegerField(min_value=0, max_value=100)

main.py

from PieData import PieData
from models import User

db = PieData()

db.create_table(User)

user = User(name="Alice", age=30)
db.insert(user)

users = db.select(User, as_model=True)

db.update(User, {"age": 31}, "name = 'Alice'")

db.delete(User, "age = 31")

Async usage

async def main():
    async with PieData() as db:
        await db.create_table_async(User)
        await db.insert_async(User(name="Bob", age=25))
        users = await db.select_async(User, as_model=True)

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

piedata-0.0.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

piedata-0.0.5-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file piedata-0.0.5.tar.gz.

File metadata

  • Download URL: piedata-0.0.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for piedata-0.0.5.tar.gz
Algorithm Hash digest
SHA256 8ae3f2e032b8870f646095ab32e8fed8937a7802dc3480c7325e260affeefd57
MD5 59e3c5964b8b065d6c0a9dc8a639f286
BLAKE2b-256 b167f3960c99434c735fed273bd78cfe80de4330cce64d81dbfea6e874223f1b

See more details on using hashes here.

File details

Details for the file piedata-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: piedata-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for piedata-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9b080b92fb4d08b7ad337a6a4bcd378839f8f000fc71114e99dab5aadb4f122c
MD5 493d3c440e86fde0338a88103bc82c85
BLAKE2b-256 ebed0a43a38db980ff936a56473be34611acb248228183eea0d0e735767bce80

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