An ORM for Tile38 inspired by Peewee - with Pydantic validation
Project description
🌐 TileORM
[!WARNING] Not advisable for production critical workflows
Getting started
pip install tileorm
from tileorm import Model, Identifier, Group, CharField, Tile38
db = Tile38("redis://localhost:9851")
class Truck(Model):
id: int = Identifier()
group: str = Group()
field: str = CharField()
class Meta:
database = db
truck1 = await Truck.create(
id=1,
group="fleet1",
location=Point(lat=52.25, lon=13.37),
field="value,
)
truck = Truck.get(id=1, group="fleet1")
# Truck(id=1, location=Location(lat=52.25, lon=13.37), group='fleet1', field='value')
await db.get(truck.key, truck.id).withfields().exec()
# {'ok': True, 'object': {'type': 'Point', 'coordinates': [13.37, 52.25]}, 'fields': {'field': 'value'}, 'elapsed': '411.458µs'}
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
tileorm-0.2.0.tar.gz
(6.1 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 tileorm-0.2.0.tar.gz.
File metadata
- Download URL: tileorm-0.2.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf8ca8942747a9f527277a36e277c5eaa7a2db7bdff6350c322e1986f76bf299
|
|
| MD5 |
462835f7a552b0b6144942467cf327d4
|
|
| BLAKE2b-256 |
65d8c0571cb0bfefdad449bda06c12ce44c15fe5f0ec72087c2e3b920eaf194b
|
File details
Details for the file tileorm-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tileorm-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc8249586cf8bb2a7b3dfbc19409745854712424cb188cf9af49088bc9c7071f
|
|
| MD5 |
4ddbfeb487390d2cd6266df6e5af79bf
|
|
| BLAKE2b-256 |
5ea271b1312d1ed69dbf6e3f925207936768e2246040a232b78d12264ea19ce4
|