ForgingBlocks
Composable abstractions and interfaces for writing clean, testable, and maintainable Python code.
Overview
Not a framework — a toolkit of composable contracts and abstractions.
ForgingBlocks provides layer-agnostic foundations for clean architecture in Python: Result for explicit error handling, ValueObject for domain modeling, ports and adapters for dependency inversion, and more. Use what you need; ignore the rest. It doesn't dictate your architecture — it gives you the language to define one.
Installation
pip install forging-blocks # pip
poetry add forging-blocks # Poetry
uv add forging-blocks # uv
Requires Python 3.14+
Quick Example
from forging_blocks.foundation import Result, Ok, Err
def divide(a: float, b: float) -> Result[float, str]:
if b == 0:
return Err("Don't divide by zero")
return Ok(a / b)
result = divide(10, 2).map(lambda n: f"Result: {n}")
print(result.value) # "Result: 5.0"
Documentation
- Full Documentation
- Getting Started
- Blocks Overview
- Architecture Overview
- Testing Guide
- API Reference
- Contributing Guide
- Release Guide
License
MIT — see LICENSE
ForgingBlocks — foundations for clean, testable, and maintainable Python architectures.
Metadata
Release files for forging-blocks 0.5.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 |
|---|---|---|---|---|
| forging_blocks-0.5.0.tar.gz | 89.9 kB | With provenance | Details for forging_blocks-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forging_blocks-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for forging_blocks-0.5.0-py3-none-any.whl |
Total release size: 270.6 kB
Release files / forging_blocks-0.5.0.tar.gz
| Download URL | forging_blocks-0.5.0.tar.gz |
|---|---|
| Size | 89.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35c6f3e9bd01f8d03419989b7dfe2aea164fa435533b34726270ebad63752d49
|
|
BLAKE2b-256 checksum How to use checksums |
ab8867b25936a18795a492eaecfe52a23340410007a340d7a104a40f6a19f39d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.
Transparency logRelease files / forging_blocks-0.5.0-py3-none-any.whl
| Download URL | forging_blocks-0.5.0-py3-none-any.whl |
|---|---|
| Size | 180.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4286f22bc7f4632718ff5dde2131cf3187e3882147680215241e32cfc6187faa
|
|
BLAKE2b-256 checksum How to use checksums |
ea824234ba9599e3cf5affd67709c55e0403016011656f76dd2cb7a0b811e3ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.
Transparency logSecurity for forging-blocks 0.5.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for forging_blocks-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.
Transparency logA 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.