Skip to main content

ashredis - Redis Object Storage Library

PyPI version Python versions

Overview

Python library for Redis object storage with async interface.

Installation

pip install ashredis

Basic Usage Example

import asyncio
from dataclasses import dataclass
from typing import Optional
from ashredis import RedisObject, RedisParams, RecordBase, MISSING

# Define data model
@dataclass
class User(RecordBase):
    username: Optional[str] = MISSING
    email: Optional[str] = MISSING
    age: Optional[int] = MISSING

async def main():
    # Configure Redis connection
    redis_params = RedisParams(
        host="localhost",
        port=6379,
        password="",
        db=0
    )
    
    # Create RedisObject instance
    async with RedisObject(redis_params=redis_params) as redis_obj:
        # Create and save object
        user = User(
            username="test_user",
            email="user@example.com",
            age=30
        )
        
        # Save object to Redis
        await redis_obj.save(record=user, key="user_1")
        
        # Load object from Redis
        loaded_user = await redis_obj.load(record_type=User, key="user_1")
        print(f"Loaded user: {loaded_user.username}, {loaded_user.email}")
        
        # Update object
        loaded_user.age = 31
        await redis_obj.save(record=loaded_user, key="user_1")
        
        # Delete object
        await redis_obj.delete(record_type=User, key="user_1")

if __name__ == "__main__":
    asyncio.run(main())

Metadata

Release files for ashredis 1.2.5

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

Source distribution (sdist)

Source distribution for ashredis 1.2.5
File Size Uploaded Provenance
ashredis-1.2.5.tar.gz 8.6 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 15.8 kB

Release files / ashredis-1.2.5.tar.gz

Download URL ashredis-1.2.5.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
01e944058c0f26aee03f2bdc2532aef473027634280508e57d29fb6d20fb9002
BLAKE2b-256 checksum
How to use checksums
a5f177c5b0ecdb77105580bdabefc17d86e8f09c435e89bc010700c92acf4be1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / ashredis-1.2.5-py3-none-any.whl

Download URL ashredis-1.2.5-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f12388647a3b7f5fe2411dc3f5f23363732daa382c8e174036127f4947f2ad4b
BLAKE2b-256 checksum
How to use checksums
a79d315c8c6172dab6bc90da1676370e99124e7bfd818886246d0f833f1d1e1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for ashredis 1.2.5

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.

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