Skip to main content

Tiferet - Domain-Driven Design, beautifully balanced

PyPI Python License

Tiferet is a Python framework that brings Domain-Driven Design into focus with elegance and clarity.

Inspired by the Kabbalistic principle of harmony and beauty in balance, Tiferet helps you turn complex business logic into maintainable, configuration-driven applications - where purpose, structure, and execution feel naturally aligned.

At a glance

  • Blueprints-first app entry point via build_app (exported as App)
  • Domain events as the core unit of behavior
  • YAML for features, workflows, dependency injection, errors, CLI commands
  • Clean layering: domain objects • aggregates • transfer objects • services
  • Structured, multilingual errors built-in
  • Easy to extend to CLI, web, scripts, TUI, … Current status: 2.2.2 Unit tests use @use_tester, and YAML test modules run through the tiferet-tester console script - see Testing Harness.

Quick Start - Add two numbers in ~3 minutes

# 1. Set up environment
python3 -m venv tiferet-demo && source tiferet-demo/bin/activate
pip install tiferet

Create these files in your project folder:

demo.py

"""Basic Calculator Quick Start"""

# *** imports

# ** infra
from tiferet import App

# *** blueprints

# ** blueprint: main
def main() -> None:
    '''
    Add two numbers through the calc.add feature and print the result.
    '''

    # Build the basic_calc session from config.yml (App is the build_app alias).
    app = App(
        'basic_calc',
        app_config='config.yml',
    )

    # Run the calc.add feature with two operands.
    result = app.run(
        feature_id='calc.add',
        data={'a': 19, 'b': 23},
    )

    # Print the sum (42).
    print(f'19 + 23 = {result}')

# Run the quick start when executed as a script.
if __name__ == '__main__':
    main()

config.yml

sessions:
  basic_calc:
    name: Basic Calculator
    description: Basic calculator interface

services:
  add_number_event:
    module_path: app.events.calc
    class_name: AddNumber

features:
  calc:
    add:
      name: Add Numbers
      steps:
        - service_id: add_number_event
          name: Add a and b

app/events/calc.py
(the domain event itself - very minimal)

# *** imports

# ** infra
from tiferet.events import DomainEvent

# *** events

# ** event: add_number
class AddNumber(DomainEvent):
    '''
    A domain event that adds two numbers.
    '''

    # * method: execute
    def execute(self, a: int, b: int, **kwargs) -> int:
        '''
        Add a and b.

        :param a: The first operand.
        :type a: int
        :param b: The second operand.
        :type b: int
        :param kwargs: Additional keyword arguments.
        :type kwargs: dict
        :return: The sum of a and b.
        :rtype: int
        '''

        # Return the sum of a and b.
        return a + b

Run:

python demo.py

You should see the default logger's line for the feature, then the sum:

<timestamp> - default - INFO - Executed Feature - calc.add (3ms)
19 + 23 = 42

→ Want a full calculator (add, subtract, multiply, divide, sqrt, …) with CLI, validation and proper error handling?
→ See the working example → or follow the step-by-step Tutorial →

Why Tiferet?

  • Configuration as code - features, DI, errors, CLI all live in YAML
  • Domain logic stays pure - focused events & aggregates
  • Infrastructure is injectable - file/db/utils behind clean service contracts
  • Built for evolution - today CLI, tomorrow FastAPI or TUI
  • Strong testability - events are easy to invoke in isolation

Documentation & Guides

Core architecture

Practical Guides

Domain Guides

Event Guides

Utility Guides

Other Component Guides

Tutorial
→ Build a complete Calculator (events + CLI + configs)

Contributing

We welcome bug reports, documentation improvements, feature ideas, and early adopters.

To work on Tiferet itself, install it in development mode with the test extra, then run the suite:

pip install -e '.[test]'
pytest

See CONTRIBUTING.md for the workflow: an RFP for prototype work, a TRD for trunk reconstruction or a hotfix, and a Doc PR for docs and skills.

Questions, feedback, or just want to say hi?
Open an issue or reach out via email: andrew@greatstrength.me

Let's build software that feels as good as it works.

Metadata

Release files for tiferet 2.2.2

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

Source distribution (sdist)

Source distribution for tiferet 2.2.2
File Size Uploaded Provenance Actions
tiferet-2.2.2.tar.gz 226.3 kB With provenance Details for tiferet-2.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tiferet 2.2.2
File Interpreter ABI Platform Actions
tiferet-2.2.2-py3-none-any.whl Python 3 none any Details for tiferet-2.2.2-py3-none-any.whl

Total release size: 503.4 kB

Release files / tiferet-2.2.2.tar.gz

Download URL tiferet-2.2.2.tar.gz
Size 226.3 kB
Tags Source
SHA-256 checksum
How to use checksums
61d9bc08e0c2f29d4e093ec9d9988496e975add088b414073bc11fd6bbb6f0d6
BLAKE2b-256 checksum
How to use checksums
74b814bda02d9d262ee905303d850704c72db1aca555607392ef083404358269
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 14, 2026.

Transparency log

Release files / tiferet-2.2.2-py3-none-any.whl

Download URL tiferet-2.2.2-py3-none-any.whl
Size 277.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
527a0fe064da3ed5b3c20f8a04c686f093a3769d224e5447bf1858249e8796ca
BLAKE2b-256 checksum
How to use checksums
bc6b099f4e7dd2895046cd8fd1ea9f8c41b2cf6cd18c8e80d950454669634eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 14, 2026.

Transparency log

Security for tiferet 2.2.2

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 tiferet-2.2.2.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 Nov 14, 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.

Release history Release notifications | RSS feed

This release

2.2.2 This release

2 release files Full provenance

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