Skip to main content

Milvio Package and tools

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-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

milvio-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for milvio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0245a5d6923464a6e9292daf1341403be072dfee8953d459bf5a17da339af5d8
MD5 007d0217b8e54c998bf1f2f7f155a3fd
BLAKE2b-256 bb65a0d60d4c2e2de27f262af80df192aa9db45037fc573cb8cf05091290ac96

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for milvio-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 120ad02f5cd0d636dd83aca7da75db888b9854b382f7d065c0157c2dcff18198
MD5 7620e8fc7ffe1603449da1749e81d60e
BLAKE2b-256 510e6e69c110913cdf0ca12540faf7012302d2b2c0e27b3c6683d84801c7a22c

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