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.
  • TairRoaring, is a more efficient and balanced type of compressed bitmaps recognized by the industry.
  • TairSearch, is a full-text search module developed in-house based on Redis modules.
  • TairDoc, to perform create, read, update, and delete (CRUD) operations on JSON data.
  • TairGis, allowing you to query points, linestrings, and polygons. (Open Sourced)
  • TairTs, is a time series data structure that is developed on top of Redis modules.
  • TairCpc, is a data structure developed based on the compressed probability counting (CPC) sketch.
  • TairVector, is a vector search data structure, offering simplicity, flexibility, real-time performance, and high efficiency.

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

Tair All SDK

language GitHub
Java https://github.com/alibaba/alibabacloud-tairjedis-sdk
Python https://github.com/alibaba/tair-py
Go https://github.com/alibaba/tair-go
.Net https://github.com/alibaba/AlibabaCloud.TairSDK

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

Uploaded Source

Built Distribution

tair-1.3.5-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tair-1.3.5.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for tair-1.3.5.tar.gz
Algorithm Hash digest
SHA256 4e7908b41a2756fb8bcdeb84d9494f2d56f6a5708b361230e7a2fa93ab500588
MD5 592db8e2015109cf042796a7add24b21
BLAKE2b-256 d150762d6dd9e86a0776013dedcbd87fcda63bf8e482e053a4d23302a2a60eb8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tair-1.3.5-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for tair-1.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 85aa8737298f2f9727a76ecdc24e1a7255702944f54195e2df3647c92f3088c6
MD5 124b1214ca34980ba7e7887f650a83f9
BLAKE2b-256 8e9fe405dda7cd1c9d806d994814575fc774c19c286c16c689ca7e34f3cecb1e

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