Skip to main content

Valkeyrie Python Client

A lightweight, Redis-compatible Python client for Valkeyrie distributed cache system.

Installation

pip install valkeyrie

Quick Start

from valkeyrie import ValkeyreClient

# Connect to Valkeyrie server
with ValkeyreClient('localhost', 6379) as client:
    # SET and GET
    client.set('user:1001', 'Alice')
    value = client.get('user:1001')
    print(value)  # 'Alice'
    
    # Check existence
    if client.exists('user:1001'):
        print("Key exists!")
    
    # Set expiration (TTL)
    client.expire('user:1001', 300)  # 5 minutes
    
    # Delete key
    client.delete('user:1001')

Features

  • ✅ Full RESP protocol support
  • ✅ Context manager for automatic connection handling
  • ✅ Simple, intuitive API
  • ✅ Compatible with Redis commands
  • ✅ No external dependencies
  • ✅ Python 3.7+

API Reference

Connection

client = ValkeyreClient(host='127.0.0.1', port=6379)
client.connect()
client.disconnect()

Commands

Method Description
set(key, value) Set key to value
get(key) Get value by key
delete(key) Delete key
exists(key) Check if key exists
expire(key, seconds) Set expiration time
keys() Get all keys
info() Get cache statistics
ping() Test connection

Example

from valkeyrie import ValkeyreClient

client = ValkeyreClient('localhost', 6379)
client.connect()

# Store user session
client.set('session:abc123', 'user_data')
client.expire('session:abc123', 3600)

# Retrieve session
session = client.get('session:abc123')

# Get all keys
all_keys = client.keys()

# Get cache stats
stats = client.info()
print(stats)

client.disconnect()

Requirements

  • Python 3.7+
  • Running Valkeyrie server

License

MIT License

Metadata

Release files for valkeyrie 1.0.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 valkeyrie 1.0.1
File Size Uploaded Provenance Actions
valkeyrie-1.0.1.tar.gz 4.9 kB Without provenance Details for valkeyrie-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 9.3 kB

Release files / valkeyrie-1.0.1.tar.gz

Download URL valkeyrie-1.0.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3c1868641175cbcf1e7b0f16ef5b2674c29ebd44659cc540691fee769c441e5c
BLAKE2b-256 checksum
How to use checksums
81c9b7dacb5d708a45c226fde9a522c01964226f06a7a96d22115ab0033ef914
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / valkeyrie-1.0.1-py3-none-any.whl

Download URL valkeyrie-1.0.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2547dc39a57d9a61fee303e1745160aad442526993f58d30d9b04e618eaa3bd0
BLAKE2b-256 checksum
How to use checksums
705d157710ac7863c56aebb06879299ee6995d5861c91eab4089533c16a7879d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for valkeyrie 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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