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.7.tar.gz
(5.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ezstorages-0.0.7.tar.gz.
File metadata
- Download URL: ezstorages-0.0.7.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d59c62fc7b905359589ab9a2d902aba19f35f7d6819314b2de0e85fbf06a9350
|
|
| MD5 |
9c8ad81c369eb391b5e206ec71cd0888
|
|
| BLAKE2b-256 |
a69fa3007a47ba429c4c3ad09ce534a517ccb0f1a688e81f983470f32924d140
|
File details
Details for the file ezstorages-0.0.7-py3-none-any.whl.
File metadata
- Download URL: ezstorages-0.0.7-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
680c97783aeb9f941cef7e439fdae8a82106c61a3789781b3874d256dac776ea
|
|
| MD5 |
b0c7e99a213e9ea633f15022a6983141
|
|
| BLAKE2b-256 |
8073fc8a90ccdb7183eeb842096cefb0ead2a435805c60e4ba61b6924a532f17
|