techai-webutils
Overview
techai_webutils is the Python mirror of the knowledge-engine'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://…).
Release files for techai-webutils 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| techai_webutils-0.2.0.tar.gz | 222.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| techai_webutils-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 581.1 kB
Release files / techai_webutils-0.2.0.tar.gz
| Download URL | techai_webutils-0.2.0.tar.gz |
|---|---|
| Size | 222.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6314271e7b9513639172e139f9d5693316dbc1a5bef56811c55785babbf324a
|
|
BLAKE2b-256 checksum How to use checksums |
af38fb0929840051296b0fc576dc15a9262814997103d714b3ce566eb6370524
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.2.0-py3-none-any.whl
| Download URL | techai_webutils-0.2.0-py3-none-any.whl |
|---|---|
| Size | 358.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6f2e49ee51a8c14714c496ec44bca5b63531ffeebfc9ddad81b9f793ce052a5
|
|
BLAKE2b-256 checksum How to use checksums |
d393938d4a62a872313c738670eec88ee90364e5d4fce01f442a6e5592535182
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|