Skip to main content

An ORM for Tile38 inspired by Peewee - with Pydantic validation

Project description

🌐 TileORM

Build

[!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.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tileorm-0.1.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file tileorm-0.1.2.tar.gz.

File metadata

  • Download URL: tileorm-0.1.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.8 Darwin/24.3.0

File hashes

Hashes for tileorm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 33cf2e2d99c7b7a37b6188be9a7aae9b3d8dd3e7744bb6eb0e911bf7bc43fa67
MD5 a1c539b1b1e5be511713f8e9cc950139
BLAKE2b-256 3e48d39b4a85ac58007252c7d8d6c8104136e024d6fe15619d57a0c8f9716523

See more details on using hashes here.

File details

Details for the file tileorm-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tileorm-0.1.2-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.8 Darwin/24.3.0

File hashes

Hashes for tileorm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3fb7e5f31ddf74e5eb3365485519359f5633aee268f49b0b3275d7f18c55196
MD5 ff87859f6cd98ab804ae0b791a462e20
BLAKE2b-256 358e4344f2c6f934aae982a7ca780f08e7d217b98231d48e97d4234be8163615

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page