Add your description here
Project description
io-adapters
API Reference
Testing use cases that involve I/O is inherently difficult because they depend on external state and side effects. However, combining Dependency Injection (DI) with the Repository pattern significantly reduces this complexity.
By substituting real I/O implementations with fakes that simulate their behaviour, stateful interactions can be captured entirely in memory. This allows changes to the external world to be accumulated deterministically and the final state to be asserted directly, without relying on real filesystems, networks, or services.
The result is faster, more reliable tests that focus on behaviour rather than infrastructure.
However, creating these fakes can be time consuming and result in a maintenance burden that may not outweigh the benefit.
This is where io-adapters can help. Simply register each I/O function with one of the register decorators and the functionality will be added to the RealAdapter object, on top of that a stub will be added to the FakeAdapter object too so you can pass in either to your usecase and the functionality will work.
Repo map
├── .github
│ └── workflows
│ ├── ci_tests.yaml
│ └── publish.yaml
├── .pytest_cache
│ └── README.md
├── docs
│ └── source
│ └── conf.py
├── src
│ └── io_adapters
│ ├── __init__.py
│ ├── _adapters.py
│ ├── _container.py
│ ├── _io_funcs.py
│ └── _registries.py
├── tests
│ ├── __init__.py
│ ├── test_adapters.py
│ ├── test_adapters_apis.py
│ └── test_container.py
├── .pre-commit-config.yaml
├── README.md
├── pyproject.toml
├── ruff.toml
└── uv.lock
::
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file io_adapters-0.1.0.tar.gz.
File metadata
- Download URL: io_adapters-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbda6bcc7711817321d524e74f91068d70daa8f109bd42442351754c5b0a92dc
|
|
| MD5 |
5f4db8492023d242d4b97cd268d060b1
|
|
| BLAKE2b-256 |
67a860111b4fdb9b465d76182dea2e220d3109655ceadd0c8d10fbaf00661ce9
|
Provenance
The following attestation bundles were made for io_adapters-0.1.0.tar.gz:
Publisher:
publish.yaml on second-ed/io-adapters
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
io_adapters-0.1.0.tar.gz -
Subject digest:
fbda6bcc7711817321d524e74f91068d70daa8f109bd42442351754c5b0a92dc - Sigstore transparency entry: 782355266
- Sigstore integration time:
-
Permalink:
second-ed/io-adapters@fd53572ebc6fbcddf6f25f8ee50eb3d0682f909a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/second-ed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@fd53572ebc6fbcddf6f25f8ee50eb3d0682f909a -
Trigger Event:
release
-
Statement type:
File details
Details for the file io_adapters-0.1.0-py3-none-any.whl.
File metadata
- Download URL: io_adapters-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcce6c3532dc6d225715a7e8b4f041d51448e349faedb1182f01a55af803683f
|
|
| MD5 |
b36d3961a81a8d6f07b80587d847a45b
|
|
| BLAKE2b-256 |
310210f2774010514801f773f9ea5c6111a3721dbfded25f60f592b100207cb9
|
Provenance
The following attestation bundles were made for io_adapters-0.1.0-py3-none-any.whl:
Publisher:
publish.yaml on second-ed/io-adapters
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
io_adapters-0.1.0-py3-none-any.whl -
Subject digest:
fcce6c3532dc6d225715a7e8b4f041d51448e349faedb1182f01a55af803683f - Sigstore transparency entry: 782355268
- Sigstore integration time:
-
Permalink:
second-ed/io-adapters@fd53572ebc6fbcddf6f25f8ee50eb3d0682f909a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/second-ed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@fd53572ebc6fbcddf6f25f8ee50eb3d0682f909a -
Trigger Event:
release
-
Statement type: