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.1.3.tar.gz
(4.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 tileorm-0.1.3.tar.gz.
File metadata
- Download URL: tileorm-0.1.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.8 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d15be6000e505b09addc6979faa2fff9493916f09c386d283d16c6fafa9def81
|
|
| MD5 |
8fe23f9a5af44bc363414ed74ddeb38e
|
|
| BLAKE2b-256 |
005b9692cf511c6dfe3b4476869e36dacaa6f179ec4bc39046b0f18d6b04b3a5
|
File details
Details for the file tileorm-0.1.3-py3-none-any.whl.
File metadata
- Download URL: tileorm-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.8 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d82b801c79c4c6e0489fcb27bb901f4e547580331786f3b75a805f316d8e4f7
|
|
| MD5 |
a43ed8028ec8c89b1c0dceab7a069e6f
|
|
| BLAKE2b-256 |
fec0d06c8482298810fe9d8d5d518b361e2664827783fca879f48f69403fe454
|