Skip to main content

A Redis-like interface using pandas as the data store.

Project description

Pandis

Pandis is a Python package that emulates Redis functionalities using pandas as the underlying data store.

Features

  • Strings: Simple key-value pairs.
  • Hashes: Key-value pairs where the value is a hash (dictionary-like).
  • Lists: Ordered collections.
  • Sets: Unordered collections of unique elements.
  • Sorted Sets: Sets ordered by a score.

Installation

pip install pandis

Usage

from pandis import PandisClient

client = PandisClient()

# Strings
client.set('key1', 'value1')
print(client.get('key1'))  # Output: value1

# Hashes
client.hset('hash1', 'field1', 'value1')
print(client.hget('hash1', 'field1'))  # Output: value1

# Lists
client.lpush('list1', 'a', 'b', 'c')
print(client.lpop('list1'))  # Output: c

# Sets
client.sadd('set1', 'a', 'b', 'c')
print(client.smembers('set1'))  # Output: ['a', 'b', 'c']

# Sorted Sets
client.zadd('zset1', {'a': 3, 'b': 1, 'c': 2})
print(client.zrange('zset1', 0, -1))  # Output: ['b', 'c', 'a']

Testing

python -m unittest discover tests

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

pandis-1.0.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

Pandis-1.0.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file pandis-1.0.2.tar.gz.

File metadata

  • Download URL: pandis-1.0.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pandis-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5362652790e028a9cb175fca1ba81bfd2be35974b94a725a1718409230d43d06
MD5 af96b51d6afe57e75742fd6948ca0352
BLAKE2b-256 d6f9a238e9da20645dd73a8e9823489856bcaca52f478cbb8087f6907f6a0aeb

See more details on using hashes here.

File details

Details for the file Pandis-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: Pandis-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for Pandis-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 edf02b489fd67c4cae635592bbdd9e5f696c01c50d891da39ca2d8db30847fbd
MD5 a9b102ff66677fd3c2ec1dc1e9930dfe
BLAKE2b-256 7ce518dbbcc5ab3c8a6badf4c7889fa92cd6f62cbf68d4aacb484786fb8efb3a

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