Skip to main content

techai-webutils

Development: uv ruff pytest CI GitHub commit activity

Overview

techai_webutils is the Python mirror of the knowledge-engine-toolkit's Go substrate. It follows the same layers (core → foundation (+ execution) → clients → repos → services → pipelines → workflows → controllers) and the same rules, described in the repository's ARCHITECTURE.md. Every swappable component is a Kind + a config + a new_<type>_from_config factory, so switching a backend (memory → S3, stub → Bedrock, asyncio → Ray) is a configuration change.

How to use techai_webutils

uv add techai-webutils            # or: pip install techai-webutils
uv add "techai-webutils[postgres]"  # optional backends: ray, postgres, parsing, langdetect

Build a component from its config at your composition root and inject it:

from techai_webutils.clients.storage import (
    S3Config,
    StorageConfig,
    StorageKind,
    new_storage_from_config,
)

config = StorageConfig(
    kind=StorageKind.MEMORY,  # StorageKind.S3 in a deployment: same code, different config
    s3=S3Config(endpoint="", bucket="documents", region="us-east-1"),
)
storage = new_storage_from_config(config)

The base install already includes the AWS, gRPC, FastAPI, Qdrant, Redis and OpenTelemetry clients. The ray, postgres, parsing and langdetect extras are imported only when their backend is selected, so a service installs just the extras its configuration uses.

Load layered YAML config (base.yaml → {env}.yaml → secrets.yaml) under an env prefix of your own, and give your settings class the same env_prefix:

from techai_webutils.foundation.config import initialize_config

initialize_config("config", env_prefix="MYAPP")

Set a prefix: without one, config keys are exported under bare names (AWS_REGION, DEBUG) that collide with ambient variables, such as the service links Kubernetes injects (REDIS_PORT=tcp://…).

Metadata

Release files for techai-webutils 0.4.0

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

Source distribution (sdist)

Source distribution for techai-webutils 0.4.0
File Size Uploaded
techai_webutils-0.4.0.tar.gz 278.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for techai-webutils 0.4.0
File Interpreter ABI Platform
techai_webutils-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 684.6 kB

Release files / techai_webutils-0.4.0.tar.gz

Download URL techai_webutils-0.4.0.tar.gz
Size 278.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a711c99027290564676b6ef732834d6a8de6ccc9af0a063ef1fa50eb16cbe827
BLAKE2b-256 checksum
How to use checksums
8d55d83b739a3c3591566c57cd4d96c1f0fba534e39efb9090c41905232fc433
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / techai_webutils-0.4.0-py3-none-any.whl

Download URL techai_webutils-0.4.0-py3-none-any.whl
Size 406.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b22c4a9fd8c84432d94328d0d21f7198b556ffa6c0513e95c14cebc18ae84ab2
BLAKE2b-256 checksum
How to use checksums
29c93ae3872a34250d4c45e2388aa1e0d369a6edeaae2d8187a44dcff6668393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

This release

0.4.0 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 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