Skip to main content

Pydantic models working with deta.space api, including ORM features.

Project description

ormspace

ORM modules powered by Pydantic for Deta Space.


Instructions

import datetime
import asyncio
from ormspace import model as md

@md.modelmap
class Person(md.Model):
    first_name: str 
    last_name: str 
    birth_date: datetime.date

@md.modelmap
class Patient(md.Model):
    person_key: Person.Key


async def main():
    await Patient.update_references_context()
    for item in await Patient.sorted_instances_list():
        print(item)

asyncio.run(main())

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

ormspace-0.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

ormspace-0.1.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file ormspace-0.1.1.tar.gz.

File metadata

  • Download URL: ormspace-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.18 Darwin/23.2.0

File hashes

Hashes for ormspace-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eaf339be764ecd6e877be0d4cea07dd7b8d4a33e254f5c675f2495d76e5677da
MD5 0792c509fffc46b68cd0df0d5f9b5490
BLAKE2b-256 1d9ab2af5def12cc214f02b9c9bb72ff5f97404c0b52a7688b85387319a123b4

See more details on using hashes here.

File details

Details for the file ormspace-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ormspace-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.18 Darwin/23.2.0

File hashes

Hashes for ormspace-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9e67927e7babfcfd703d744ff2e82579690487114ac6588d7fa24068c54ec836
MD5 c25e00a7b3e3ae1eb242eff5dc624675
BLAKE2b-256 30d900e99de72ffe961d76c6ae23010afaba68ac0dca692f8c8f6f3bc8f8e3ea

See more details on using hashes here.

Supported by

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