Skip to main content

A lightweight database system for Python

Project description

Storify

Storify is a dead-simple, lightweight Python database library that uses msgpack for efficient data serialization.

It provides a framework for data storage and retrieval, with an optional ORM model for interaction with data.

Storify supports automatic backups and error handling, ensuring data integrity and reliability.

Features

  • Create and manage multiple msgpack-based databases with ease.
  • Lightweight ORM-esque model for easy interaction with data.
  • Automatic backups and data flushing to prevent data loss.
  • Built-in error handling to automatically recover from database corruption and loading issues.
  • Configurable save intervals for optimized performance.

Installation

pip install storify

Usage

Here's a simplified example of how to use the storify package:

from storify import Storify

# Initialize Storify
storify = Storify(root="example_data")
db_name = "example_db"

# Check if the database exists
if storify.db_exists(db_name):
    print(f"Database '{db_name}' exists. It will be loaded.")

# Initialize a new database
 db = storify.get_db(name=db_name)

# Add some data to the database 
db["key1"] = "value1" 
db["key2"] = "value2"

# Get some data from the database
print(f"key1: {db['key1']}")
print(f"key2: {db['key2']}")

# Flush all databases (force save)
storify.flush()

For more complete examples, including how to use the ORM, please check the examples folder.

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

storify-0.0.6a0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

storify-0.0.6a0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file storify-0.0.6a0.tar.gz.

File metadata

  • Download URL: storify-0.0.6a0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for storify-0.0.6a0.tar.gz
Algorithm Hash digest
SHA256 fa35fb07d8087d6ea800048d378e084168eb61d96e840fd4551f3e5023642354
MD5 5e0f1c08db62edeb3af860c4254ecc3d
BLAKE2b-256 e5669c92f850eaeb949d19740b4b8be47e2339659e7a9ce77694df609bdc4a0a

See more details on using hashes here.

File details

Details for the file storify-0.0.6a0-py3-none-any.whl.

File metadata

  • Download URL: storify-0.0.6a0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for storify-0.0.6a0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ba93a2ce9b2e25d08b8a451345d1cfdd9899da72afab2a56b05ad85392e39af
MD5 5d9dd09610b25d6de5d5b3f920ab6d18
BLAKE2b-256 2ee73069469a3e888d0f52ddae1dc681b9aeff7ad03316a14e4ff7ba16bfd765

See more details on using hashes here.

Supported by

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