Skip to main content

konstruktor

Create and manage Arkitekt deployments — the konstruktor CLI in a wheel, and a Python interface to it.

pip install konstruktor

The wheel carries the CLI itself, so that is the whole install: konstruktor is on your PATH (and python -m konstruktor runs it), and the Python interface below always drives the generator it was released with. Docker has to be running.

Everything that decides what a deployment looks like lives in the CLI. This package runs it and reads back what it wrote — nothing more.

A deployment from Python

from konstruktor import create_hub

hub = create_hub("./hub", services=["rekuest", "mikro"], redeem_tokens=2)

hub.fakts_url                   # http://localhost:<port> — where an app is pointed
hub.redeem_token("my-app")      # what the app trades for a client, with no browser
hub.services["mikro"].url       # http://localhost:<port>/mikro
hub.logs("mikro")
hub.destroy()

A hub can also be made from images instead of names. Each image is asked which service it is, so a client library only has to know the image that hosts it:

hub = create_hub("./hub", service_images=["jhnnsrs/mikro:7"])

Rekuest then runs only if one of the images is Rekuest's.

create_hub builds a self-contained hub: the services you name, and a coordination server of their own, behind one gateway on one port (konstruktor hub create --server local). Nobody has to accept it and nothing leaves the machine. It returns once everything a client opens answers.

Connecting an app to it takes the address and a redeem token:

from arkitekt import App, connect

app = App("my-app", "0.1.0", services=[...])
with connect(app, url=hub.fakts_url, redeem_token=hub.redeem_token("my-app")) as runtime:
    ...

or, for an app in another process, hub.env("my-app") — FAKTS_URL and FAKTS_REDEEM_TOKEN. An app in a container on the hub's own docker network points at http://gateway instead: the hub can be logged into at any address it answers on.

One redeem token serves one app. The coordination server pins a token to the first app that redeems it, so redeem_tokens= is how many apps can connect, and hub.redeem_token(name) hands each name its own.

To run a particular build of a service rather than the one a new hub gets, pin it by its name in the stack: create_hub(..., images={"rekuest": "jhnnsrs/rekuest:1.2.3"}).

With pytest

Installing the package registers a pytest plugin:

import pytest


@pytest.fixture(scope="session")
def hub(konstruktor_hub):
    return konstruktor_hub(services=["rekuest", "mikro"], redeem_tokens=2)


@pytest.mark.konstruktor
def test_my_app(hub):
    ...
  • konstruktor_hub is a session-scoped factory. Every hub it makes is destroyed — containers, volumes and folder — when the session ends.
  • Tests marked konstruktor are skipped where Docker is not running.
  • A failed test gets the hub's container logs attached to its report.
  • Hubs live in a registry of their own, so they never show up beside your real ones.
  • A session that is killed leaves containers behind; the next session removes them.

Which build of a service a run tests against is usually the job's to say, not the suite's. Set KONSTRUKTOR_IMAGES where the suite runs and every hub created there uses those images, for the services it has:

KONSTRUKTOR_IMAGES=rekuest=jhnnsrs/rekuest:1.2.3,mikro=jhnnsrs/mikro:6.1.0 pytest -m konstruktor
option
--konstruktor-keep leave the hubs running after the session, and print where they are
--konstruktor-timeout seconds a hub gets to answer after it is started (600)
--konstruktor-bin the executable to use, instead of $KONSTRUKTOR_BIN or the one in the wheel

From a source checkout

cargo build -p konstruktor-cli
KONSTRUKTOR_BIN=target/debug/konstruktor PYTHONPATH=python python -m pytest python/tests

Metadata

Release files for konstruktor 0.16.1

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

Built distributions (wheels)

Table of built distributions (wheels) for konstruktor 0.16.1
File
konstruktor-0.16.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
konstruktor-0.16.1-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
konstruktor-0.16.1-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
konstruktor-0.16.1-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
konstruktor-0.16.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
konstruktor-0.16.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 31.9 MB

Release files / konstruktor-0.16.1-py3-none-win_amd64.whl

Download URL konstruktor-0.16.1-py3-none-win_amd64.whl
Size 5.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
60f0611746c8b02ee5e7bc2b6e0b94aeceb261c983b0291f601a7843a6ad33fa
BLAKE2b-256 checksum
How to use checksums
a74be1ea184396b90400cba7bfaa93adcf45c41a1f482ccca77561a9f7c46b49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release files / konstruktor-0.16.1-py3-none-musllinux_1_2_x86_64.whl

Download URL konstruktor-0.16.1-py3-none-musllinux_1_2_x86_64.whl
Size 5.6 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
2f748baab5a8f89d501170db6e627d614fac3b0071bbb40b27691b6210921000
BLAKE2b-256 checksum
How to use checksums
e33e94e9feb6ed1fc68629eb839f8d70a1c147aad784d1fc0f629533ce04f354
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release files / konstruktor-0.16.1-py3-none-manylinux_2_28_x86_64.whl

Download URL konstruktor-0.16.1-py3-none-manylinux_2_28_x86_64.whl
Size 5.5 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e25c16086ad906e094d48115e779ffe035c0fd61978104f6782a01a2aa7e93bc
BLAKE2b-256 checksum
How to use checksums
97b2b34586914926d3d2407e7750ea8dbdfada56146355cfb1784502544d789d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release files / konstruktor-0.16.1-py3-none-manylinux_2_28_aarch64.whl

Download URL konstruktor-0.16.1-py3-none-manylinux_2_28_aarch64.whl
Size 5.1 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
6590c54b7fe7f25fabd281e7650981e507ca9bdad18529b6d9dfe6373249ce69
BLAKE2b-256 checksum
How to use checksums
eb19dfbabb612ea9a586d251133813631485173ab9b95afd0bda138ad62dcd7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release files / konstruktor-0.16.1-py3-none-macosx_11_0_arm64.whl

Download URL konstruktor-0.16.1-py3-none-macosx_11_0_arm64.whl
Size 5.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
699442930f1c3b01f3616bb56a208b9ad8a6d3eefdabeb475d097b8b925b43a9
BLAKE2b-256 checksum
How to use checksums
1d28307178fb6300259f18c1ddadfb856029dfbaf789b436bdcbe7ff31129e4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release files / konstruktor-0.16.1-py3-none-macosx_10_12_x86_64.whl

Download URL konstruktor-0.16.1-py3-none-macosx_10_12_x86_64.whl
Size 5.3 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
37bd6b970b92f811cf9bae5fd15d28b7aa6c572c27ae6b37a3d71b55f157fe13
BLAKE2b-256 checksum
How to use checksums
c2373d10d962b320a3e36421e14115a6530157add03e5ef2a95a8e95bdc448b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release history Release notifications | RSS feed

0.23.1

6 release files

0.23.0

6 release files

0.22.0

6 release files

0.21.0

6 release files

0.20.0

6 release files

0.19.0

6 release files

This release

0.16.1 This release

6 release files

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