Skip to main content

a client extends redis.py that gives developers easy access to tair or tairModules

Project description

tairClient is still being developed. Please do not use it for any mission critical purpose at this time.

tairClient-py is a package that gives developers easy access to tair or tairModules. Tair is a redis-like Key/Value structure data storage system independently developed by Alibaba. It has added many powerful modules which also can load by redis such as tairHash, tairString, etc.

The package extends redis-py’s interface with Tair’s API.

Installation

$ pip install tairClient

Usage example

from tairClient.client import Client
tair = Client()
tair.exhset("key","field","value",nx=True,ver=2) # returns 1
tair.exhmset("key",{"field2":"value2","field3":"value3","field4":""}) # returns b'OK'
tair.exhlen("key")                 # return 4
tair.exhdel("key","field")         # return 1
tair.exhlen("key")                 # return 3
tair.exhgetall("key")              # returns [b'field3', b'value3', b'field2', b'value2', b'field4', b'']
tair.exhver("key","field3")        # returns 1
tair.exhset("key","field3","2")    # returns 1
tair.exhgetwithver("key","field3") # returns [b'2', 13]

API

For complete documentation about tair’s commands, refer to tair’s module website.

from tairClient.client import Client
tair = Client()
# use __doc__ can get a simple doc about tair's class and function
print(tair.__doc__)
print(tair.exhget.__doc__)

Development and test

install tox , runs all tests as its default target. Ensure you have a running redis, with the module loaded.

pip install tox

License

Apache License Version 2.0

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

tairClient-0.1.3.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tairClient-0.1.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file tairClient-0.1.3.tar.gz.

File metadata

  • Download URL: tairClient-0.1.3.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for tairClient-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a51c981c8922072695a87a14a7c6c668366b29474fad84bc51a78cdb9e33d070
MD5 34affab63b66945becfb04363440b1a3
BLAKE2b-256 7c6aca7950aa7222f069ecb751b7ee2f229f2890218a2f294a52e7fcff4d38e2

See more details on using hashes here.

File details

Details for the file tairClient-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tairClient-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for tairClient-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f7a0e26d91c7acafabe668441e0e59b31ac6837b80b1acfcbaa7ede074470911
MD5 abd6c1d9b0b837fa177fd1d122c93b8f
BLAKE2b-256 58e2a1f1d7b8563f6b7281730bdc2a39efd10399b9c50b37d67281c3bc60daf0

See more details on using hashes here.

Supported by

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