Skip to main content

Pluggable client for easy and intuitive work with the Redis database in Python projects

Project description

Redis Python Lua

Test coverage UnitTests CodeQL Advanced Dependabot Updates

Python version: >= 3.11

The library is very limited in functions compared to redis-py, but has a wide functionality if you need a minimal set of commands to work with the database.

Install

pip install pyluaredis

How does this library differ from redis-py, on which it is built?

For quick connection to your Python projects and easy usage. «Plug and Play» :)

  1. The methods have a more flexible type system, you can get both a number and a list using one r_get function, without worrying about what exactly is being treated in a given key.
  2. Scenarios that require 2 or more calls to the Redis service are built on the basis of Lua scripts that perform all operations in 1 call to the server.
  3. The methods have additional parameters that are not in the standard library, for example, an analogue of RETURNING (like in Postgres), which also allows you not to worry about the type of the variable that lies in a given key.
  4. Pluggable flexible logging with many settings that allow you to customize it "for yourself"
  5. It helps in the development of applications following the 12-factor principles.
  • It is assumed that you already have the Redis service installed and running.
  • There is no need to install Lua as it is built into Redis.

_________________________________________________________________________

Is it slower than the original implementation? Yes, it is slower.

But, .lua scripts are cached within a single class object and subsequent function calls will be faster (almost the same time as the original implementation).

You can see comparisons with the original library in the file benchmark/main.py This library is not about the speed of working with Redis, it is about the ease of working with Redis, allowing you to not worry about a lot of different functions of the database and the original library, as well as data types.

______________________________________________________________________________________________

Supported Python types:

  • integer
  • float
  • string
  • boolean
  • bytes
  • list
  • tuple
  • set
  • frozenset

The number of supported methods and data types increases as the project develops, but it has all the basic methods for working with Redis (see the list and description of current commands with examples in the example.py file in the root of the repository).

Backward compatibility of functions is also preserved, which allows you to avoid problems when using the library in your projects

PyRedisImage

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

pyluaredis-1.0.6.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

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

pyluaredis-1.0.6-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file pyluaredis-1.0.6.tar.gz.

File metadata

  • Download URL: pyluaredis-1.0.6.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyluaredis-1.0.6.tar.gz
Algorithm Hash digest
SHA256 90a9a134362b65247786d59c87c6f6739f6962fe8cdd5bbaca3ad4e025d0a2a7
MD5 f8d1626e5643dd419696a683a8594d4b
BLAKE2b-256 036562cf58a1b3dcc6a1b09953eeb7265bc16a5d8d864e86139c52747e395231

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluaredis-1.0.6.tar.gz:

Publisher: publish.yml on MothScientist/pylua-redis-fusion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyluaredis-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: pyluaredis-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyluaredis-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7a9b78cf03a4b24bcd937b5c96c1696189f75a4c41c47fe22ef23b448ed4c7a9
MD5 816925680f3ffb9cf11d40513ae7ca2c
BLAKE2b-256 bafcbab669f550fb56d4e3a7d950e32d9e6df7397b184f687fb2c55c146b46cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluaredis-1.0.6-py3-none-any.whl:

Publisher: publish.yml on MothScientist/pylua-redis-fusion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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