Skip to main content

Easy storage handler

Project description

from ezstorge import Sqlite, Table, key

db = Sqlite("example.db")
@db.useTable("example")
class TExampleStr(Table):
    id : key.str
    string : str = None # Optional
    integer : int # required
    number : float
    boolean : bool
    date : datetime


@db.useTable("example")
class TExampleAuto(Table):
    id : key.auto
    string : str
    integer : int
    number : float
    boolean : bool
    date : datetime




# Create a single or all tables
db.createTable(TExampleStr)
db.createTables()

# Insert a single or all tables
db.updateTable(TExampleStr)
db.updateTables()

# Delete a single or all tables
db.deleteTable(TExampleStr)
db.deleteTables()


# Allow to have multiple databases
db2 = Sqlite("example2.db")

TExampleStr.select().where(TExampleStr.string == "Hello").execute()

import dis

class IterableCar(type): def iter(cls) -> Iterator["Car"]: return iter([])

class Car(metaclass=IterableCar): name: str id: int

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

ezstorages-0.0.9.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

ezstorages-0.0.9-py3-none-any.whl (9.3 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