Skip to main content

Small library for easy work with databases.

Project description

Welcome to ORMStorm

ORMStorm is a small library for easy work with databases.

The key features are:

  • Simplicity: The library is very simple, and it won't take long to learn it.
  • Coding speed: Integrating the library into your projects won't take long.
  • Dynamic: Unlike others, this library will allow you to very quickly create new tables and add databases to them.

Installing

pip install ormstorm

Usage

Using standard tables

from ormstorm import Table, Types, Column, create_session  



class ExampleTable(Table):  
    __tablename__ = "example"  
  
    id = Column(Types.INTEGER, primary_key=True, autoincrement=True)  
    text = Column(Types.STRING)  
  
  
LocalSession = create_session("example.sqlite3", [ExampleTable])  
  
with LocalSession() as session:  
    session.insert(ExampleTable(text="Hello, world!"))

Using a dynamic table

from ormstorm import DynamicTable, Types, Column, create_session  
  
  
LocalSession = create_session("example.sqlite3", [])  
  
with LocalSession() as session:  
    NewTable = DynamicTable(  
        "new_table", {"id": Column(Types.INTEGER, primary_key=True, autoincrement=True), "text": Column(Types.STRING)}  
    )  
  
    session.create(NewTable)  
    session.insert(NewTable(text="Easy use of dynamic tables!"))

Note

This library is strictly not recommended for use in large projects because of the small functionality!

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

ormstorm-0.0.1.1.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

ormstorm-0.0.1.1-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

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