{"id":9800,"library":"guardrails-hub-types","title":"Guardrails Hub Types","description":"Guardrails Hub Types provides Pydantic models and type definitions used across the Guardrails Hub ecosystem. It encapsulates data structures for hub manifests, workflows, and other configuration, ensuring consistency and validation. Currently at version 0.0.4, it is part of a rapidly evolving project, with frequent updates likely as Guardrails Hub matures.","status":"active","version":"0.0.4","language":"python","source_language":"en","source_url":"https://github.com/guardrails-ai/guardrails-hub/tree/main/guardrails-hub-types","tags":["types","guardrails","pydantic","llm","ai","schema","validation"],"install":[{"cmd":"pip install guardrails-hub-types","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"wrong":"from guardrails_hub_types import HubManifest","symbol":"HubManifest","correct":"from guardrails_hub_types import HubManifest"}],"quickstart":{"code":"from guardrails_hub_types.models.hub import HubManifest\nfrom pydantic import ValidationError\n\n# Example of creating a HubManifest instance\nhub_data = {\n    \"name\": \"my-hub-rail\",\n    \"version\": \"0.1.0\",\n    \"description\": \"A simple rail for demonstration.\",\n    \"authors\": [\"John Doe <john.doe@example.com>\"],\n    \"tags\": [\"demo\", \"llm\"],\n    \"docs_url\": \"https://example.com/docs\",\n    \"config\": {\"type\": \"llm_rail\"},\n    \"inputs\": {\"prompt\": {\"type\": \"string\"}},\n    \"outputs\": {\"result\": {\"type\": \"string\"}}\n}\n\ntry:\n    manifest = HubManifest(**hub_data)\n    print(\"HubManifest created successfully!\")\n    print(f\"Manifest Name: {manifest.name}\")\n    print(f\"Manifest Version: {manifest.version}\")\nexcept ValidationError as e:\n    print(f\"Validation Error: {e}\")\n\n# Example of invalid data (missing required field 'name')\ninvalid_hub_data = {\n    \"version\": \"0.1.0\",\n    \"description\": \"Missing name.\"\n}\n\ntry:\n    invalid_manifest = HubManifest(**invalid_hub_data)\nexcept ValidationError as e:\n    print(f\"\\nFailed to create invalid manifest as expected: {e}\")","lang":"python","description":"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."},"warnings":[{"fix":"Always pin to specific versions (`guardrails-hub-types==0.0.4`) in production environments and review release notes carefully for updates.","message":"This 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.","severity":"gotcha","affected_versions":"<1.0.0"},{"fix":"Do 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.","message":"As 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.","severity":"gotcha","affected_versions":"*"},{"fix":"Always refer to the latest source code or documentation to confirm exact import paths. Stick to the documented `guardrails_hub_types.models.<submodule>.<Type>` pattern.","message":"The 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`.","severity":"breaking","affected_versions":"All versions prior to 1.0.0"}],"env_vars":null,"search_vec":"'0.0.4':37 'across':14 'ai':58 'configur':29 'consist':31 'current':34 'data':21 'definit':12 'ecosystem':18 'encapsul':20 'ensur':30 'evolv':44 'frequent':47 'guardrail':1,4,16,51,55 'hub':2,5,17,24,52 'like':49 'llm':57 'manifest':25 'matur':53 'model':9 'part':40 'project':45 'provid':7 'pydant':8,56 'rapid':43 'schema':59 'structur':22 'type':3,6,11,54 'updat':48 'use':13 'valid':33,60 'version':36 'workflow':26","created_at":"2026-04-17T01:20:47.373669+00:00","updated_at":"2026-04-17T01:20:47.373669+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmp7_vrn0rc/venv/lib/python3.12/site-packages/guardrails_hub_types/__init__.py\", line 17, in <module>\n    from guardrails_hub_types.models.applicator import Applicator\n  File \"/tmp/tmp7_vrn0rc/venv/lib/python3.12/"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.4","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/guardrails-hub-types/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}