Home

Awesome

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.

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

languageGitHub
Javahttps://github.com/alibaba/alibabacloud-tairjedis-sdk
Pythonhttps://github.com/alibaba/tair-py
Gohttps://github.com/alibaba/tair-go
.Nethttps://github.com/alibaba/AlibabaCloud.TairSDK