Py-tiny-orm

Latest version: v0.0.6

Safety actively analyzes 623704 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.0.6

Subtables are here! You can now store data across muliple tables in one logical model!

python
import orm


class SubList(orm.Table["SubList"]):
"""Simple subtable for a list of strings"""

sub_list_id: int
main_table_id: int
data: str


class SubDict(orm.Table["SubDict"]):
"""Simple subtable for a dict of strings"""

sub_dict_id: int
main_table_id: int
key: str
value: str


orm.subtable("data", SubList)
orm.subtable("datadict", SubDict, "value", "key")
dataclasses.dataclass
class MainTable(orm.Table["MainTable"]):
"""A simple table with a list of SubList rows"""

main_table_id: int
data: List[str]
datadict: Dict[str, str]

0.0.5

0.0.4

0.0.3

0.0.2

Test of the release automation

0.0.1

A test release

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.