get_systems - Get Systems Prefect Blocks
Enterprise-grade Prefect blocks for LLM operations, HTTP requests, and data models.
🐍 Available on PyPI — install it with pip install get-systems
Features
LLM Module (get_systems.llm)
- ✅ OpenAI & Azure OpenAI Support - Seamlessly switch between providers
- ✅ Environment Variables - Automatic fallback to env vars
- ✅ Retry Logic - Exponential backoff with jitter
- ✅ Caching - Optional in-memory response caching
- ✅ Safe Logging - No API key leaks
- ✅ Flexible Parameters - Pass any OpenAI API parameter via **kwargs
- ✅ Function Calling - Full support for tools
HTTP Module (get_systems.http)
- ✅ Multiple Auth Types - None, Basic, Token, Bearer
- ✅ Async HTTP Client - Built on httpx
- ✅ Prefect Integration - First-class block support
Models Module (get_systems.models)
- ✅ Pydantic Models - Type-safe data models with validation
- ✅ Address Parsing - German address format support with normalization
- ✅ Contact Management - Client, Debtor, and Contact models
- ✅ GDPR Compliance - Data protection and source tracking fields
- ✅ Bank Accounts - IBAN/BIC validation via python-stdnum
- ✅ Event Handling - Case events and interest calculations
Azure Content Understanding Module (get_systems.azure_cu)
- ✅ Async Azure SDK Client - URL analysis through Azure AI Content Understanding
- ✅ Prefect Block Config - Store endpoint, key, and optional API version
- ✅ Usage Metadata - Emits token usage metadata through Prefect events when available
- ✅ LangChain Tool Block - Optional separate block for
langchain-azure-ai
Langfuse Module (get_systems.langfuse)
- ✅ Prefect Credentials Block - Store Langfuse keys and base URL in Prefect
- ✅ Client Factory - Create an authenticated client with
get_client()
Installation
Install Everything (Recommended)
pip install "get_systems[all]"
Install Specific Modules
Install only what you need:
# For LLM operations only
pip install "get_systems[llm]"
# For HTTP operations only
pip install "get_systems[http]"
# For Azure Content Understanding only
pip install "get_systems[azure_cu]"
# For Azure Content Understanding LangChain tools
pip install "get_systems[azure_cu_langchain]"
# For Langfuse credentials and client
pip install "get_systems[langfuse]"
# Install several modules
pip install "get_systems[llm,http,azure_cu]"
From Azure Artifacts
# All modules
pip install "get_systems[all]" --extra-index-url https://pkget_systems.dev.azure.com/get-systems/_packaging/get-systems/pypi/simple/
# Specific modules
pip install "get_systems[llm]" --extra-index-url https://pkget_systems.dev.azure.com/get-systems/_packaging/get-systems/pypi/simple/
pip install "get_systems[http]" --extra-index-url https://pkget_systems.dev.azure.com/get-systems/_packaging/get-systems/pypi/simple/
What Gets Installed
| Installation | Dependencies |
|---|---|
pip install get_systems |
prefect, pydantic (base only) |
pip install "get_systems[llm]" |
Base + openai |
pip install "get_systems[http]" |
Base + httpx |
pip install "get_systems[azure_cu]" |
Base + Azure Content Understanding SDK |
pip install "get_systems[azure_cu_langchain]" |
Base + langchain-azure-ai |
pip install "get_systems[langfuse]" |
Base + Langfuse Python SDK |
pip install "get_systems[all]" |
Base + all optional integrations |
Quick Start
LLM Operations
from get_systems.llm import GptCompletionBlock, GptAuth, LlmRuntime
from prefect import flow
# Configure auth
auth = GptAuth(
api_key="sk-...",
model="gpt-4o-mini",
is_azure=False
)
# Create completion block
block = GptCompletionBlock(
auth=auth,
prompt="What is Prefect?",
temperature=0.7
)
@flow
async def my_llm_flow():
result = await block.run()
print(result.content)
HTTP Operations
from get_systems.http import HttpAuth, HttpBlock
from prefect import flow
# Configure HTTP auth
auth = HttpAuth(
auth_type="bearer",
token="your-token"
)
# Create HTTP block
http_block = HttpBlock(
auth=auth,
url="https://api.example.com"
)
@flow
async def my_http_flow():
response = await http_block.request("GET", "/users")
print(response.json())
Signing request bodies in HttpBlock
Set the optional signing_secret (whsec_<base64>) on HttpBlock and every
request() is signed per the Hermes v2 scheme:
webhook-id, X-Webhook-Timestamp and X-Webhook-Signature-V2 (hex HMAC-SHA256 of
<timestamp>.<body>) headers are added and the
exact signed bytes are sent. Only json= and content= bodies are supported
(data=/files= raise ValueError).
block = HttpBlock(url="https://hermes.example.com", signing_secret="whsec_...")
await block.request("POST", "/webhooks/x", json={"a": 1})
Signed Webhook (Standard Webhooks) for Prefect automations
SignedWebhook subclasses Prefect's built-in Webhook block, so it appears in
the automation action "Call a webhook". It sends the request signed per the
Standard Webhooks spec (HMAC-SHA256).
Block fields: url, method (default POST), headers, allow_private_urls,
verify (as in Webhook) plus secret - the signing secret whsec_<base64>.
The block adds webhook-id, X-Webhook-Timestamp and X-Webhook-Signature-V2
(hex HMAC-SHA256 of <timestamp>.<body>, Hermes v2; the standard-webhooks
webhook-timestamp/webhook-signature headers are not sent) headers and content-type: application/json (unless set). The
exact signed bytes are sent: a string payload is sent as-is, a dict as compact
JSON, None as an empty body.
from get_systems.http import SignedWebhook
block = SignedWebhook(url="https://hermes.example.com/webhooks/x", secret="whsec_...")
await block.save("hermes-signed")
Register the block type (see DEPLOYMENT.md):
prefect block register -m get_systems.http.signed_webhook
Note: the "Call a webhook" action is executed by the Prefect server, so the
get-systems package (with this class) must be installed in the server image;
otherwise the action fails with "The webhook block was invalid".
Token obtained with username and password
For APIs such as Django REST Framework that issue a token from
api-token-auth/, select Token Login authentication. Configure the
authentication URL, username, and password in that tab; the password is stored
as a Prefect secret field. Before every request, the block posts
{"username": "...", "password": "..."} to the configured URL, reads the
token field from the JSON response, and sends the target request with
Authorization: Token <token>.
from get_systems.http import HttpAuth, HttpBlock
http_block = HttpBlock(
url="https://api.example.com",
auth=HttpAuth(
auth_type="token_login",
auth_url="/api-token-auth/",
username="admin",
password="use-a-prefect-secret-in-production",
),
)
response = await http_block.request("GET", "/users")
response.raise_for_status()
The retrieved token is used only for that request and is not saved in the
Prefect block. auth_url may also be an absolute URL.
Azure Content Understanding
from get_systems.azure_cu import AzureAIContentBlock
from prefect import flow
cu_block = AzureAIContentBlock(
endpoint="https://your-resource.services.ai.azure.com",
key="your-key",
)
@flow
async def analyze_document():
result = await cu_block.analyze_url(
analyzer_id="auftrag",
document_url="https://example.com/document.pdf",
)
print(result)
Azure Content Understanding LangChain Tool
from get_systems.azure_cu import AzureAIContentLangChainBlock
config_block = await AzureAIContentLangChainBlock.load("azure-cu-langchain-config")
tool = config_block.get_tool(analyzer_id="auftrag")
Data Models
from get_systems.models import Address, Debtor, ImportData, PersonType
# Parse German address from string
address = Address.from_raw("Zimmerstraße 456 c/o Amtsgericht, 63225 Langen, DE")
print(address.street) # "Zimmerstraße 456 c/o Amtsgericht"
print(address.zip_code) # "63225"
print(address.city) # "Langen"
# Create address with validation
address = Address(
street="Musterstraße 321a",
zip_code="12345",
city="Berlin",
country_code="DE",
validity="G" # Gültig (Valid)
)
# GDPR-compliant data tracking
address_with_source = Address(
street="Hauptstraße 10",
zip_code="10115",
city="Berlin",
country_code="DE",
source_contact_designation="Auskunftei",
source_contact_id="12345",
source_date="2026-06-01"
)
# Create debtor with contact info
debtor = Debtor(
first_name="Max",
name1="Mustermann",
addresses=[address],
person_type=PersonType.MALE,
)
# Build the top-level import payload
payload = ImportData(
debtors=[debtor],
robot_name="invoice-import",
flow_run_id="01a05d2a-6d74-747b-a028-a168be25ef03",
prefect_instance="prefect-prod1",
)
ImportData contains the top-level fields ccases, clients, debtors,
bank_accounts, file_entries, robot_name, flow_run_id,
prefect_instance, and inherited extra_fields.
Extraction Telemetry Contract
get_systems.models.telemetry is the shared contract between extraction flows
(consumer_invoice, muenster_import, ...) and the telemetry consumer.
- Events:
<producer>.extraction.completedand<producer>.extraction.errored(telemetry_event_name(producer, completed)). - Payload (
ExtractionTelemetryPayload,schema_version= 1):run_id(producer flow run),instance,client,result(S3 URI ofresult.json, completed only),message(errored only),subflows(list ofSubflowRef). Unknown fields are kept. SubflowRef:type(azure_cu|gpt),run_id(task run),analyzer_id,attempt,s3_path,usage;azure_cuaddsfile_name,status,final;gptaddsmodel,cached. GPT usage is{"<model>_input": n, "<model>_output": n}(gpt_usage_to_dict).- S3 layout: each sub-call is stored as a
SubflowRecordJSON document (type, run_id, analyzer_id, attempt, input, output, usage, error, started_at, finished_at) at<prefix>/subflows/<flow_run_id>/<file>.json;SubflowRef.s3_pathpoints to it.
from get_systems.models import ExtractionTelemetryPayload, build_telemetry_event
from prefect.events import emit_event
payload = ExtractionTelemetryPayload(run_id=run_id, instance="prefect-prod1", client="42",
result="s3://bucket/mail/result.json", subflows=[])
emit_event(**build_telemetry_event("muenster_import", payload)) # raises ValueError if the event is too large
Langfuse Credentials
from get_systems.langfuse import LangfuseCredentials
credentials = await LangfuseCredentials.load("langfuse-dev")
client = credentials.get_client()
Model Data Masking
Models derived from MaskedBaseModel or WithExtraFields can mark sensitive
fields declaratively:
from pydantic import Field
from get_systems.models import MaskedBaseModel
class DebtorTrace(MaskedBaseModel):
name: str | None = Field(
default=None,
json_schema_extra={"mask": True},
)
email: str | None = Field(
default=None,
json_schema_extra={"mask": True},
)
original = DebtorTrace(
name="Max Mustermann",
email="max@example.com",
)
masked = original.masked_dump() # Returns a copy with masked values
print(masked.name) # "Max...n"
print(masked.email) # "max...m"
masked_dump() returns a copy of the model instance with sensitive fields masked.
All methods from the base class are preserved. Nested MaskedBaseModel instances
are recursively masked. Sensitive strings are rendered as their first three characters,
..., and their last character, for example Max...n. Short values are
rendered as ***. The original model remains unchanged.
Register Blocks in Prefect
# Register all blocks
prefect block register -m get_systems.llm.gpt_blocks
prefect block register -m get_systems.http
prefect block register -m get_systems.azure_cu
prefect block register -m get_systems.langfuse
# View registered blocks
prefect block ls
Import Styles
All import styles are supported:
# Submodule imports (recommended)
from get_systems.llm import GptCompletionBlock, GptAuth
from get_systems.http import HttpAuth, HttpBlock
from get_systems.azure_cu import AzureAIContentBlock, AzureAIContentLangChainBlock
from get_systems.langfuse import LangfuseCredentials
# Direct module imports
from get_systems.llm.gpt_blocks import GptCompletionBlock
from get_systems.http.http_block import HttpAuth
from get_systems.azure_cu.blocks import AzureAIContentBlock
from get_systems.langfuse.credentials import LangfuseCredentials
# Package-level imports
from get_systems import GptCompletionBlock, HttpAuth, AzureAIContentBlock, LangfuseCredentials
Environment Variables
OpenAI Configuration:
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o-mini
OPENAI_BASE_URL=https://api.openai.com/v1 # optional
Azure OpenAI Configuration:
OPENAI_API_KEY=your-azure-key
OPENAI_BASE_URL=https://your-resource.openai.azure.com
OPENAI_MODEL=your-deployment-name
OPENAI_API_VERSION=2024-02-15-preview
OPENAI_IS_AZURE=true
Azure Content Understanding Configuration:
CONTENT_UNDERSTANDING_ENDPOINT=https://your-resource.services.ai.azure.com
CONTENT_UNDERSTANDING_KEY=your-key
CONTENT_UNDERSTANDING_API_VERSION=2025-11-01 # optional; SDK default is used when omitted
Documentation
- docs/QUICKSTART-GS.md - Quick start and usage examples
- docs/MODELS.md - Complete models documentation (Address, Contact, BankAccount, etc.)
- docs/MIGRATION.md - Migration guide from old packages
- LLM Module: Full OpenAI/Azure OpenAI integration with enterprise features
- HTTP Module: Flexible HTTP client with multiple authentication types
- Models Module: Pydantic models for addresses, contacts, bank accounts with validation
- Prefect Integration: Native Prefect block support for LLM and HTTP modules
License
Proprietary - Get Systems
Metadata
Release files for get-systems 0.2.49
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| get_systems-0.2.49.tar.gz | 103.5 kB | Without provenance | Details for get_systems-0.2.49.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| get_systems-0.2.49-py3-none-any.whl | Python 3 | none | any | Details for get_systems-0.2.49-py3-none-any.whl |
Total release size: 192.7 kB
Release files / get_systems-0.2.49.tar.gz
| Download URL | get_systems-0.2.49.tar.gz |
|---|---|
| Size | 103.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3c7dd93ed964bdeb8d470fd70d3b9d783beb874aa4054439ad402d731c6e683
|
|
BLAKE2b-256 checksum How to use checksums |
a8fde832fbe3e34e555970068e5e879457eebd6be4f8b24971ffe18f999cc078
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.17
|
Release files / get_systems-0.2.49-py3-none-any.whl
| Download URL | get_systems-0.2.49-py3-none-any.whl |
|---|---|
| Size | 89.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
703c6e4de91e545a383944216928a2792f63d56a4aee64b2360f1cbfbe63471e
|
|
BLAKE2b-256 checksum How to use checksums |
b9e4344907bdbd0d52b17b8192403ee3da6865bb2438367ac1f1b9ce6a126a58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.17
|
Security for get-systems 0.2.49
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.