Skip to main content

Python Redis Object Mapper

asyncio based Redis object mapper

Table of content

Installation

TODO

Usage

import asyncio

from dataclasses import field
from typing import Set, Dict

from aio_rom import Model
from aio_rom.fields import Metadata
from aio_rom.session import redis_pool


class Foo(Model):
    bar: int
    foobar: Set[int] = field(default_factory=set)
    my_boolean: bool = False
    transient_field: Dict = field(metadata=Metadata(transient=True))


class OtherFoo(Model):
    foo: Foo

async def main():
    async with redis_pool("redis://localhost"):
        foo = Foo(123, {1,2,3}, True)
        await foo.save()
        ...
        foo2 = await Foo.get(321)
        other_foo = OtherFoo(303, foo2)
        await other_foo.save()

asyncio.run(main())

Features

TODO

TODO

  1. Docs
  2. Tests

Limitations

  1. configure must be called before other calls to Redis can succeed, no defaults to localhost atm.
  2. You cannot use from __future__ import annotations in the same file you define your models. See https://bugs.python.org/issue39442
  3. TODO Supported datatypes
  4. Probably more ...

Metadata

Release files for aio-rom 0.1.7

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

Source distribution (sdist)

Source distribution for aio-rom 0.1.7
File Size Uploaded Provenance Actions
aio_rom-0.1.7.tar.gz 16.5 kB Without provenance Details for aio_rom-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aio-rom 0.1.7
File Interpreter ABI Platform Actions
aio_rom-0.1.7-py3-none-any.whl Python 3 none any Details for aio_rom-0.1.7-py3-none-any.whl

Total release size: 28.5 kB

Release files / aio_rom-0.1.7.tar.gz

Download URL aio_rom-0.1.7.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a06f371f4378d13aa7163979ff070252d669b566f8e215606f6a28ec94a39bb4
BLAKE2b-256 checksum
How to use checksums
786afc83f8d97add4cd8f9bb14d5654bd3eb7465456b49713499b1806583002f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / aio_rom-0.1.7-py3-none-any.whl

Download URL aio_rom-0.1.7-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d8bdeb2e47d21bfd87106b87f0b98f700f12710623a1e4728353b5e5e2ca117
BLAKE2b-256 checksum
How to use checksums
c6c908643d6def060302316f194b4d82c895be0398343a70c7771781c4ac0570
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for aio-rom 0.1.7

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