Skip to main content

RedisAI Python Client

Project description

https://img.shields.io/github/license/RedisAI/redisai-py.svg https://badge.fury.io/py/redisai.svg https://github.com/RedisAI/redisai-py/actions/workflows/integration.yml/badge.svg https://img.shields.io/github/release/RedisAI/redisai-py.svg https://codecov.io/gh/RedisAI/redisai-py/branch/master/graph/badge.svg https://readthedocs.org/projects/redisai-py/badge/?version=latest https://img.shields.io/badge/Forum-RedisAI-blue https://img.shields.io/discord/697882427875393627?style=flat-square https://snyk.io/test/github/RedisAI/redisai-py/badge.svg?targetFile=pyproject.toml

redisai-py is the Python client for RedisAI. Checkout the documentation for API details and examples

Installation

  1. Install Redis 5.0 or above

  2. Install RedisAI

  3. Install the Python client

$ pip install redisai
  1. Install serialization-deserialization utility (optional)

$ pip install ml2rt

Development

  1. Assuming you have virtualenv installed, create a virtualenv to manage your python dependencies, and activate it. `virtualenv -v venv; source venv/bin/activate`

  2. Install [pypoetry](https://python-poetry.org/) to manage your dependencies. `pip install poetry`

  3. Install dependencies. `poetry install --no-root`

[tox](https://tox.readthedocs.io/en/latest/) runs all tests as its default target. Running tox by itself will run unit tests. Ensure you have a running redis, with the module loaded.

Contributing

Prior to submitting a pull request, please ensure you’ve built and installed poetry as above. Then:

  1. Run the linter. `tox -e linters.`

  2. Run the unit tests. This assumes you have a redis server running, with the [RedisAI module](https://redisai.io) already loaded. If you don’t, you may want to install a [docker build](https://hub.docker.com/r/redislabs/redisai/tags). `tox -e tests`

RedisAI example repo shows few examples made using redisai-py under python_client folder. Also, checkout ml2rt for convenient functions those might help in converting models (sparkml, sklearn, xgboost to ONNX), serializing models to disk, loading it back to redisai-py etc.

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

redisai-1.3.0.tar.gz (16.0 kB view hashes)

Uploaded Source

Built Distribution

redisai-1.3.0-py3-none-any.whl (16.8 kB view hashes)

Uploaded Python 3

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