Python client for Tair
Project description
tair-py
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. (Open Sourced)
- 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)
- TairVector, is a self-developed data structure that provides high-performance real-time storage and retrieval of vectors. (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
Contributing
Feel free to dive in! Open an issue or submit a Pull Request.
License
Tair All SDK
Project details
Release history Release notifications | RSS feed
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.4.tar.gz
(37.1 kB
view details)
Built Distribution
tair-1.3.4-py3-none-any.whl
(26.8 kB
view details)
File details
Details for the file tair-1.3.4.tar.gz
.
File metadata
- Download URL: tair-1.3.4.tar.gz
- Upload date:
- Size: 37.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4d6046c9c523c3e39305c90b63ac68db354121c80e27866b824eb085ae1e096 |
|
MD5 | 0704d291a687a7ffffb706cf1e702ed7 |
|
BLAKE2b-256 | 84470a71d54f4f177b89f929e9687d05fb872987d9b57f0c03ab3b6f8672d6e5 |
File details
Details for the file tair-1.3.4-py3-none-any.whl
.
File metadata
- Download URL: tair-1.3.4-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f034559cfccd9edacea866354584eaef0150d1901cfc812a442aacc17b68656 |
|
MD5 | e4b70bda882decae34b7b5306774ccdf |
|
BLAKE2b-256 | 830566a4fd95a9c048cf742a6aa8704989e91ea4138b6683ffbc16481b529350 |