--- id: guardrails-ai-types version: "0.5.0" license: MIT License Copyright (c) 2024 Guardrails AI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) license_treatment: permissive maintenance: active --- # guardrails-ai-types — Offical Guardrails AI Types License: permissive · Maintenance: active · Downloads: 122.8K/mo ## What it is and what it does guardrails-ai-types is a types package providing Pydantic-based data structures for the Guardrails AI REST client. It defines the core types—Guard, ValidationOutcome, and related structures—needed to interact with the guardrails-api service for validating LLM outputs and creating guarded chat completions. The package serves as the type layer for the guardrails-ai SDK, enabling type-safe Python code when working with remote guardrails services. The package is actively maintained and has low installation friction, depending only on pydantic. It supports current Python versions (3.10+) and is distributed under the MIT License, making it freely usable in both open-source and commercial contexts. Use it for: - Type-checking guardrails client code when validating LLM outputs against remote guard definitions. - Building type-safe applications that create and manage guarded chat completions with streaming support. - Defining validation outcomes and summaries when integrating LLM safety checks into production systems. - Enabling IDE autocomplete and static analysis for guardrails-ai SDK method calls and responses. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type definitions and data structures for the Guardrails AI REST client, enabling type-safe interaction with the guardrails-api service for LLM output validation and guarded chat completions. Yes, if you are using the guardrails-ai SDK to validate LLM outputs or create guarded chat completions. The package provides essential type definitions with minimal overhead (one pydantic dependency), active maintenance, and permissive licensing. Install it as part of your guardrails-ai setup for type safety and IDE support. ## Install pip install guardrails-ai-types uv add guardrails-ai-types poetry add guardrails-ai-types ## Installing guardrails-ai-types Before you install: Low friction install with a single runtime dependency on pydantic. Actively maintained with recent commits and releases within the past month. License in practice: MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install guardrails-ai-types from guardrails_ai.sdk import Guard, ValidationOutcome # Use imported types in your guardrails client code guard: Guard = await client.guards.retrieve(name="my-guard") validation_outcome: ValidationOutcome = await client.guards.validate(name="my-guard", llm_output="Hello, world.") Requires Python 3.10 or later (supports_current); designed as a types package for use with the guardrails-ai SDK client. Verify before relying: - Whether this package is intended for direct installation or primarily as a transitive dependency of guardrails-ai-sdk. - What specific validation rules or guardrail types are included beyond the core Guard and ValidationOutcome classes shown in the excerpt. ## Package facts - License: MIT License Copyright (c) 2024 Guardrails AI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 122.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags guardrails ai types, llm output validation types, guarded chat completions, guardrails api client types, pydantic types for guardrails, validation outcome types, guard configuration types, llm-safety, types-and-validation, guardrails [View on SkillFed](https://skillfed.io/packages/guardrails-ai-types) · [View on PyPI](https://pypi.org/project/guardrails-ai-types/)