Skip to main content

ForgingBlocks

Composable abstractions and interfaces for writing clean, testable, and maintainable Python code.

Python Poetry Type checked: mypy Code style: ruff Security: bandit CI


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


License

MIT — see LICENSE


ForgingBlocks — foundations for clean, testable, and maintainable Python architectures.

Metadata

Release files for forging-blocks 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forging-blocks 0.6.1
File Size Uploaded Provenance Actions
forging_blocks-0.6.1.tar.gz 93.5 kB With provenance Details for forging_blocks-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for forging-blocks 0.6.1
File Interpreter ABI Platform Actions
forging_blocks-0.6.1-py3-none-any.whl Python 3 none any Details for forging_blocks-0.6.1-py3-none-any.whl

Total release size: 281.1 kB

Release files / forging_blocks-0.6.1.tar.gz

Download URL forging_blocks-0.6.1.tar.gz
Size 93.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4824f6a69ab64dac082bb99bd6ac478f959de7c0be2fac72a99fc4e25c3de54f
BLAKE2b-256 checksum
How to use checksums
d41a55ae5ff8378a5a143f16ebc593630d0d9ba92dad938da18ac0f92679bdd7
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 Oct 9, 2026.

Transparency log

Release files / forging_blocks-0.6.1-py3-none-any.whl

Download URL forging_blocks-0.6.1-py3-none-any.whl
Size 187.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b081de9b8f1e54ed4c1d08c5b5dc0a0e7922eeef35b5e4c062beadc90b9a4ed
BLAKE2b-256 checksum
How to use checksums
c2b97313370c94122a94a6507871c7ba7f74a0ca7b7235a58207515e066a2b2f
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 Oct 9, 2026.

Transparency log

Security for forging-blocks 0.6.1

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.

Select from 2 files

Attestation for forging_blocks-0.6.1.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 Oct 9, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page