skillfed

placebo

Make boto3 calls that look real but have no effect

placebo v0.10.0 227.5K downloads/30d#9,176 on PyPI393
Permissive license Apache License 2.0 Abandoned released

What it is and what it does

Placebo is a mocking library that intercepts AWS API calls and replays recorded responses instead of hitting real endpoints. It works by attaching to a Session and using the event system to capture and store responses as JSON or pickle files, then replay them deterministically during test runs. This lets you write integration-style tests without incurring API costs or network latency, and without manually constructing mock responses.

The library supports recording all services or filtering by service and operation name, manual response injection, and a decorator-based test interface with environment variables for record/playback mode selection. It has no runtime dependencies, making it lightweight to add to existing projects.

Use it for:

  • Unit testing code that calls AWS services without making real API calls or incurring costs.
  • Recording API interactions once in development, then replaying them consistently in CI/CD pipelines.
  • Building deterministic test suites where response order and timing are predictable and reproducible.
  • Mocking complex responses with nested structures that would be tedious to construct manually in test code.
  • Testing legacy code that uses the default session without refactoring it to accept an injected session object.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Placebo records and replays AWS API calls without hitting actual endpoints, enabling you to mock interactions in tests by saving responses to JSON or pickle files.

No. The package is abandoned (last commit 2021-09-28) with no maintenance or compatibility updates. While it works for basic mocking, you risk incompatibility with newer versions and lack of support for bugs or edge cases. Actively maintained alternatives exist for this use case.

Install

placebo on PyPI

pip

pip install placebo

uv

uv add placebo

poetry

poetry add placebo

Installing placebo

Before you install

Install friction is high due to source-only distribution. The package is abandoned—last commit was 2021-09-28, over 1781 days ago—so expect no maintenance, bug fixes, or compatibility updates.

License in practice

Licensed under Apache License 2.0 (permissive), so you can use it freely in commercial and open-source projects without restriction, though you must include a copy of the license.

Quickstart

import placebo

session = boto3.Session()
pill = placebo.attach(session, data_path='/path/to/responses')
pill.record()
# Make calls; responses are recorded

# Later, to replay:
pill.playback()
# Calls return recorded responses

Requires a boto3 Session object to attach to; placebo itself has no runtime dependencies but is tightly coupled to the botocore event system.

Verify before relying

  • Whether placebo remains compatible with current boto3 versions given its abandoned status since 2021.
  • Whether the package works with Python versions beyond 3.9 (classifiers list up to 3.9 only).
  • Performance or behavioral differences when using pickle vs. JSON response format in large test suites.

Package facts

License Apache License 2.0 (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 1,781 days since the last release
Last repo commit
First released
Downloads 227,507/month — #9,176 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: placebo-0.10.0.tar.gz

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

aws api mockingrecord replay aws callstest fixtures awsmock aws responsesaws call recordingresponse playback testingaws integration testing
aws-testingmockingabandoned

More Testing packages