Skip to main content

ormspace

ORM modules powered by Pydantic for Deta Space.


Instructions

The package ormspace will use the deta data key provides as COLLECTION_KEY or will look for DETA_PROJECT_KEY if the first is not provided. This way you can set a custom data key or use the project default. The sistem cannot work all is missing.

the 'modelmap' decorator

To include the class in the system mapping you must use the 'modelmap' decorator. With this procedure you will get:

  • access to deta space api for read and write your data
  • create special fields for each class:
    • Model.Key
    • Model.KeyList

Example

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())

Metadata

Release files for ormspace 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ormspace 0.3.1
File Size Uploaded Provenance Actions
ormspace-0.3.1.tar.gz 16.6 kB Without provenance Details for ormspace-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ormspace 0.3.1
File Interpreter ABI Platform Actions
ormspace-0.3.1-py3-none-any.whl Python 3 none any Details for ormspace-0.3.1-py3-none-any.whl

Total release size: 36.6 kB

Release files / ormspace-0.3.1.tar.gz

Download URL ormspace-0.3.1.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6e18385998608635818db45212b6c37c7f83c064c22b607040ab26074b97a953
BLAKE2b-256 checksum
How to use checksums
099ce76a5828657a4bcb200fadb449d939843accf626d9fdca34d73bba3dfbb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.18 Darwin/23.5.0

Release files / ormspace-0.3.1-py3-none-any.whl

Download URL ormspace-0.3.1-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b26c4d2ca82ecfb019060bb8f455742b683510be9e98a22a16542c91b9a67b5
BLAKE2b-256 checksum
How to use checksums
38b2f09efd650ca16d2f76b608d0fc74fe85ed19bf645b87f28a8116d5593a2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.18 Darwin/23.5.0

Security for ormspace 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page