Skip to main content

Async and Sync Redis Service Wrapper

Project description

Milvio Redis Service

A simple wrapper around redis-py providing both async and sync clients with automatic prefixing for app slug and environment.

Installation

pip install milvio_redis

Usage

import asyncio
from milvio_redis import redis_service

async def main():
    # Connect
    await redis_service.connect(
        redis_url="redis://localhost:6379/1",
        app_slug="my_app",
        environment="production"
    )

    # Set value (will be prefixed as my_app_production_key1)
    await redis_service.set_async("key1", "value1")

    # Get value
    value = await redis_service.get_async("key1")
    print(value)
    
    # Disconnect
    await redis_service.disconnect()

if __name__ == "__main__":
    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

milvio_redis-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

milvio_redis-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file milvio_redis-0.1.0.tar.gz.

File metadata

  • Download URL: milvio_redis-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for milvio_redis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 50073bed8adf636228407d74943a771b790c61e6cdbc0a86d87a53a97a471815
MD5 00fcbfabc3b4c5d9d80a242dca85b50b
BLAKE2b-256 c980f85cd91126dd837449c956cf93abc412b23425ba7284431446962eafae0b

See more details on using hashes here.

File details

Details for the file milvio_redis-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: milvio_redis-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for milvio_redis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 538b52b6d8f1449a88c8dbc146c4480858ee411683a7db01719d69396edc4e4a
MD5 63b6e4d7dad4b061dc8ce39fb357aaf8
BLAKE2b-256 2fcd80d4c1cb58aafac802fbfa230854d05ea06d2c11119d3377ebf8f7eeb658

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