$npx skillfedfor your agent

pytest-redis

Redis fixtures and fixture factories for Pytest.

Worth itPyPI Python ModulesReleased Feb 2026265.5K downloads / mocopyleft licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_redis-4.0.0-py3-none-any.whl
v4.0.0 · released 2026-02-28 · Python >=3.10 · 4 runtime deps: pytest, port-for, mirakuru, redis

Yes. The plugin is actively maintained, has low install friction, supports modern Python versions (3.10–3.14), and solves a real testing problem—automating Redis lifecycle management. The LGPLv3+ license is permissive for most use cases via the linking exception. No known vulnerabilities. Install if your test suite depends on Redis.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • redis-server executable must be available on PATH or passed explicitly via --redis-exec; Redis must be installed locally or available in a container.
  • Low friction install with active maintenance.
  • Depends on pytest, port-for, mirakuru, and redis; all are standard testing/utility packages.

License · maintenance · safety

copyleft license (copyleft) — Licensed under LGPLv3+, a copyleft license. Derivative works and modifications must be released under compatible terms, but linking to the library from proprietary code is permitted under LGPL's linking exception.

last release 2026-02-28 (167 days) · last repo commit 2026-08-11 · 104 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 265,492 downloads/mo, #8,324 on PyPI

Verify before relying

pip install pytest-redis

import pytest
from pytest_redis import factories

def test_redis(redisdb):
    redisdb.set('key', 'value')
    assert redisdb.get('key') == b'value'
  • Whether the plugin supports Redis modules and extension loading in production scenarios beyond the documented test configuration.
  • Performance characteristics when running many tests with redis_proc fixture across different scopes.
Same gist for agents: .md · .json

What it is and what it does

pytest-redis is a pytest plugin that automates Redis setup and teardown for test suites. It provides three fixtures: redisdb (function-scoped client that cleans databases after each test), redis_proc (session-scoped process that starts Redis on first use and stops at test end), and redis_noproc (connects to an already-running Redis instance). The plugin manages port allocation, process lifecycle, and client connections, allowing developers to write tests that interact with Redis without manual server management.

The plugin integrates with pytest's fixture system and supports extensive configuration through fixture factory arguments, command-line options, or pytest.ini settings. It handles Redis executable discovery, port binding, authentication, logging, and data persistence options. Developers can create multiple Redis fixtures with different configurations for testing scenarios requiring multiple Redis instances or specific server settings.

Use it for

  • Unit testing code that reads/writes to Redis without requiring manual server startup or teardown between tests.
  • Integration testing multi-instance Redis scenarios by creating separate redis_proc and redisdb fixtures with different configurations.
  • Testing against an external Redis instance in CI/CD by using redis_noproc fixture to connect to a pre-running container.
  • Validating Redis-based caching layers and session stores in web applications during test execution.
  • Testing Redis Pub/Sub or stream functionality by configuring multiple client fixtures against a single Redis process.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The plugin is actively maintained, has low install friction, supports modern Python versions (3.10–3.14), and solves a real testing problem—automating Redis lifecycle management. The LGPLv3+ license is permissive for most use cases via the linking exception. No known vulnerabilities. Install if your test suite depends on Redis.

Install

pytest-redis on PyPI

Before you install

Low friction install with active maintenance. Depends on pytest, port-for, mirakuru, and redis; all are standard testing/utility packages. Last release 167 days ago, repository active with recent commits.

redis-server executable must be available on PATH or passed explicitly via --redis-exec; Redis must be installed locally or available in a container.

License in practice

Licensed under LGPLv3+, a copyleft license. Derivative works and modifications must be released under compatible terms, but linking to the library from proprietary code is permitted under LGPL's linking exception.

Quickstart

pip install pytest-redis

import pytest
from pytest_redis import factories

def test_redis(redisdb):
    redisdb.set('key', 'value')
    assert redisdb.get('key') == b'value'

Verify before relying

  • Whether the plugin supports Redis modules and extension loading in production scenarios beyond the documented test configuration.
  • Performance characteristics when running many tests with redis_proc fixture across different scopes.

Package facts

Licensecopyleft license copyleft
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
pytestport-formirakururedis
MaintenanceActively maintained 167 days since the last release
Last repo commit
First released
Downloads265,492 / month, #8,324 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

Evidence: pytest_redis-4.0.0-py3-none-any.whl

Tags

Capabilities
pytest redis fixturesredis testing plugintest redis databasepytest redis processredis test fixturesredis integration testingpytest redis client
Topics
redis-testingpytest-pluginfixture-factory
PyPI keywords
testspytestfixtureredis

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytest redis fixtures”

  • pytest-redisA pytest plugin that provides fixtures for testing code that depends…
  • pytest-databasesProvides pytest fixtures that spin up isolated database services in…
  • pytest-mock-resourcesProvides pytest fixtures that spin up real database and service…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also pytest-rabbitmq · pytest-postgresql · pytest-spark · pytest-docker-tools · pytest-datadir · pytest-shutil · pytest-mysql · pytest-mock-resources · fixtures · pytest-deadfixtures