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.0.tar.gz
(4.4 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.0.tar.gz.
File metadata
- Download URL: tileorm-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f68f282f0b7efca23c648baef6327e6e8a71f970e1da7b3af4570f20d80ac27
|
|
| MD5 |
19e5a3d90fb31dd4f2b1e21a1e3670d1
|
|
| BLAKE2b-256 |
01e9d833ea7b4f4f6db211a94b5422bf5f74e78985b93eb1ba2426dc430620f4
|
File details
Details for the file tileorm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tileorm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38a854f04e233650ca474c31561eb442b9ba32a1791f71202461201be761b80e
|
|
| MD5 |
1e5e6308a0a3c2ae3df366cde4ae1234
|
|
| BLAKE2b-256 |
2bd9f6d3b6b3a3bbf1da37e2932438cca16e3c4709088124759ddca74c16be46
|