Autumn-Py - Convention-Based YAML API Testing Framework for Python & FastAPI
Autumn-Py is a convention-based API automation testing framework designed to streamline and simplify the testing process, inspired by the Java Autumn library.
By integrating directly with pytest, Autumn-Py allows you to run clutter-free API tests based on YAML files, eliminating repetitive test code. It supports testing local FastAPI applications (using httpx.Client(app=...) under the hood) as well as external REST services.
Features
- No Boilerplate Code Required: Write tests in YAML, not Python.
- Convention-Based: Follows standard patterns, zero configuration to start.
- pytest Integration: Discovered and run automatically by
pytest. - FastAPI / Local Testing: Route requests directly against your FastAPI app via the
autumn_appfixture. - Arrange-Act-Assert Support: Set up preconditions, run the main API call, and assert expectations.
- Rich Data Generation: Dynamic random names, emails, UUIDs, datetimes, sentences, and more using
faker. - Placeholder Chaining: Reference responses of previous arrange steps in URLs, headers, and request bodies.
- Flexible JSON Assertions: Easily match dynamic fields with matchers (e.g. UUID, datetime, regex, types) and ignore extra fields if needed.
- Conditional Skip Scheduling: Restrict test execution by day or time of day.
Installation
pip install autumn-yaml-test
Quick Start
- Define your test yml files (e.g. under
tests/):
# tests/get_user.yml
name: Get User by ID
act:
url: "https://jsonplaceholder.typicode.com/users/1"
method: GET
asserts:
status: 200
body:
id: 1
name: "Leanne Graham"
email: "${json-unit.matches:regex}[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}"
- Run your tests:
pytest
That's it! The plugin discovers all .yml/.yaml files containing an act: block and executes them dynamically.
Testing a Local FastAPI App
To test your local FastAPI application without running a separate server, define an autumn_app fixture in your conftest.py:
# tests/conftest.py
import pytest
from my_app import app
@pytest.fixture
def autumn_app():
return app
With autumn_app defined, Autumn-Py routes all requests in your YAML files directly through FastAPI's TestClient routing.
YAML Specification
Refer to the examples under tests/resources/ for a full showcase of features including:
- Data generation:
${generate:name},${generate:email},${generate:datetime:1minutesAgo},${generate:uuid}. - Arrange steps: wait steps (
type: wait), API dependencies (type: api), andsaveResponseAs. - Flexible asserts: ignore extra fields using
customization.
Metadata
Release files for autumn-yaml-test 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autumn_yaml_test-1.0.0.tar.gz | 12.5 kB | Without provenance | Details for autumn_yaml_test-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autumn_yaml_test-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for autumn_yaml_test-1.0.0-py3-none-any.whl |
Total release size: 23.5 kB
Release files / autumn_yaml_test-1.0.0.tar.gz
| Download URL | autumn_yaml_test-1.0.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d070dc22f2655aa7d417102f996f8aba0f44ab476e65682cf4ba54b9de7b340
|
|
BLAKE2b-256 checksum How to use checksums |
2efb4fb0b3ff574dd790820405e745a9fcb0bd03108365f1b25d638551597182
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / autumn_yaml_test-1.0.0-py3-none-any.whl
| Download URL | autumn_yaml_test-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf1f55529fc59323453e5339228c13daa5d0ba6d8b335af6d9d02578e66641a1
|
|
BLAKE2b-256 checksum How to use checksums |
f5e864c7e1c22f232abcb6c0ac1ad375a72a78f4fb87cc896c5718de02a31b00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for autumn-yaml-test 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.