Install & Compatibility
Where this runs
tested against v0.0.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
HubManifest
✓ from guardrails_hub_types import HubManifest
✗ from guardrails_hub_types import HubManifest
This quickstart demonstrates how to import and instantiate a `HubManifest` using `guardrails-hub-types`. Since it uses Pydantic, data validation is automatic, and `ValidationError` is raised for malformed input, as shown with the invalid data example.
from guardrails_hub_types.models.hub import HubManifest
from pydantic import ValidationError
# Example of creating a HubManifest instance
hub_data = {
"name": "my-hub-rail",
"version": "0.1.0",
"description": "A simple rail for demonstration.",
"authors": ["John Doe <john.doe@example.com>"],
"tags": ["demo", "llm"],
"docs_url": "https://example.com/docs",
"config": {"type": "llm_rail"},
"inputs": {"prompt": {"type": "string"}},
"outputs": {"result": {"type": "string"}}
}
try:
manifest = HubManifest(**hub_data)
print("HubManifest created successfully!")
print(f"Manifest Name: {manifest.name}")
print(f"Manifest Version: {manifest.version}")
except ValidationError as e:
print(f"Validation Error: {e}")
# Example of invalid data (missing required field 'name')
invalid_hub_data = {
"version": "0.1.0",
"description": "Missing name."
}
try:
invalid_manifest = HubManifest(**invalid_hub_data)
except ValidationError as e:
print(f"\nFailed to create invalid manifest as expected: {e}")
Debug
Known issues
gotchaThis library is version 0.0.x and is subject to rapid change. The API may not be stable and breaking changes are highly likely in future minor versions (e.g., 0.1.0, 0.2.0) before a 1.0.0 release.fixAlways pin to specific versions (`guardrails-hub-types==0.0.4`) in production environments and review release notes carefully for updates.
affects: <1.0.0
gotchaAs a types-only library, `guardrails-hub-types` provides Pydantic models for data validation and structure, but does not contain any runtime logic or execution capabilities. It is intended for schema definition and validation.fixDo not expect this library to provide functional components; it is a dependency for Guardrails Hub's data management, not an executable part of the Guardrails runtime itself.
affects: *
breakingThe internal structure of the `models` submodules might change, leading to `ModuleNotFoundError` if you import directly from paths like `guardrails_hub_types.hub` instead of `guardrails_hub_types.models.hub`.fixAlways refer to the latest source code or documentation to confirm exact import paths. Stick to the documented `guardrails_hub_types.models.<submodule>.<Type>` pattern.
affects: All versions prior to 1.0.0
Upgrade
Version history
0.0.4latest on PyPI · released Aug 12, 2024
Audit
Dependencies
No dependency data recorded yet.