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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for ezstorages-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d442f0259d5673e8b9289eb6093918b907db671910581ecead03795cac06cee |
|
MD5 | 7dd7cb34d7a1abd27f86963e55db8c15 |
|
BLAKE2b-256 | e3c59d2e9f2ad4bab908ad21d431b2ee122fadcac9f66cede44a44be7f6eaebb |