Skip to main content

Python client for Tair

Project description

tair-py

Test Format Coverage MIT licensed pypi

English | 简体中文

tair-py is a Python client of Tair based on redis-py. The following modules of Tair are supported.

  • TairString, is a string that contains a version number. (Open sourced)
  • TairHash, is a hash that allows you to specify the expiration time and version number of a field. (Open sourced)
  • TairZset, allows you to sort data of the double type based on multiple dimensions. (Open sourced)
  • TairBloom, is a Bloom filter that supports dynamic scaling. (Coming soon)
  • TairRoaring, is a more efficient and balanced type of compressed bitmaps recognized by the industry. (Coming soon)
  • TairSearch, is a full-text search module developed in-house based on Redis modules. (Coming soon)

Install

Install from pip:

pip install tair

Install from source:

git clone https://github.com/alibaba/tair-py.git
cd tair-py
python setup.py install

Usage

tair-py supports Python 3.7+.

#!/usr/bin/env python

from tair import Tair

if __name__ == "__main__":
    try:
        t = Tair(host="localhost", port=6379, db=0)
        t.exset("foo", "bar")
        # exget return a ExgetResult object.
        ret = t.exget("foo")
        print(ret.value)  # output b'bar'.
        print(ret.version)  # output 1
    except Exception as e:
        print(e)
        exit(1)

For more examples, please see examples.

Maintainers

@Vincil Lau.

Contributing

Feel free to dive in! Open an issue or submit a Pull Request.

License

MIT

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

tair-1.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distributions

tair-1.1.0-py3.10.egg (59.5 kB view details)

Uploaded Source

tair-1.1.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file tair-1.1.0.tar.gz.

File metadata

  • Download URL: tair-1.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for tair-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e76027836d0b463b46f2f63a1536a236e1634904f6d2a064617713ea2bab6fa0
MD5 92afbf36f950a2c2f1a797f5548f42f8
BLAKE2b-256 22740536ca3033aba8e8b5a14b05fca89879971616142e2893e523585f5b19ab

See more details on using hashes here.

File details

Details for the file tair-1.1.0-py3.10.egg.

File metadata

  • Download URL: tair-1.1.0-py3.10.egg
  • Upload date:
  • Size: 59.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for tair-1.1.0-py3.10.egg
Algorithm Hash digest
SHA256 e4498f27ef1d353fe4bf5969273a73a9aec52fc077ffa32dc4dd011ee35de8c4
MD5 7b4d168800a436e40519e3464e656c06
BLAKE2b-256 649b233debac0a9d70b50a1a39c36b1b456fe5d430a04ee35329fb8cecb863da

See more details on using hashes here.

File details

Details for the file tair-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: tair-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for tair-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2696dfbc8bdac0705d3092b54cec158736e50089c1aa30b4ae7e9ffd3cf37df
MD5 3b86ac82e125e3f5e2887e08321af10a
BLAKE2b-256 8e3bf969fab94965b79c41c78273a5dbdfa89e7a1ea9fddab7a237af4073e4d1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page