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.3 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.3

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.3
File Size Uploaded Provenance Actions
tiferet-2.2.3.tar.gz 230.4 kB With provenance Details for tiferet-2.2.3.tar.gz

Built distribution (wheel)

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

Total release size: 511.9 kB

Release files / tiferet-2.2.3.tar.gz

Download URL tiferet-2.2.3.tar.gz
Size 230.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a732a6bd4d75f4cb2f159216eac0815a26da71113fcaa6005bf8bfe9f04f7b9b
BLAKE2b-256 checksum
How to use checksums
9a1485140929c4fa7d531adf504d7b75bb3a27ff7d849234f042457c02ac11e8
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 15, 2026.

Transparency log

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

Download URL tiferet-2.2.3-py3-none-any.whl
Size 281.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87dff353cd96efbfdd8196b8e603d6d0347a5bc9d3064e783e751d6280618c2d
BLAKE2b-256 checksum
How to use checksums
c45924bccc3e4dff0bfee75b807404912e99e65a2ea1db219af57c3255bded70
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 15, 2026.

Transparency log

Security for tiferet 2.2.3

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.3.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 15, 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.3 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