Skip to content

A Python client of Tair based on redis-py

License

Notifications You must be signed in to change notification settings

vincillau/tair-py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
  • TairDoc, to perform create, read, update, and delete (CRUD) operations on JSON data. (Coming soon)
  • TairGis, allowing you to query points, linestrings, and polygons. (Coming soon)
  • TairTs, is a time series data structure that is developed on top of Redis modules. (Coming soon)
  • TairCpc, is a data structure developed based on the compressed probability counting (CPC) sketch. (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

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

About

A Python client of Tair based on redis-py

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%