Skip to main content

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

Project description

pypi.org/project/pyluaredis
socket.dev/pypi/package/pyluaredis

Redis Python Lua

Socket Badge 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. 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.9.tar.gz (30.4 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.9-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyluaredis-1.0.9.tar.gz
  • Upload date:
  • Size: 30.4 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.9.tar.gz
Algorithm Hash digest
SHA256 6c1da5650d73b9b9ed8a93c813cbb37ce015c3736366baa72c32527d23bb712f
MD5 14ba863a778d2835d8743b2d64b4dd16
BLAKE2b-256 bc87dbf5a414b73df027716331fed7a2fe6e2210f5bd272578354b830c4692b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluaredis-1.0.9.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.9-py3-none-any.whl.

File metadata

  • Download URL: pyluaredis-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 18.0 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 03aa949a2868783600b9466c29095e7a837e2aa66f8364dcb381841a852caf69
MD5 6d52f96b583bc29d42970ffe98c8aceb
BLAKE2b-256 6bedff73a257aff791e1720316e39d1ae76aae105c819090f34e5a9272f76124

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluaredis-1.0.9-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