|
1 | | -# yourpkg/__init__.py |
2 | | -from .object_schema import ObjectSchema |
3 | | -from .array_schema import ArraySchema |
4 | | -from .primitive_schema import PrimitiveSchema |
5 | | -from .endpoint_parameter import EndpointParameter |
| 1 | +# Import all classes for public API |
| 2 | +from agentle.agents.apis.api import API |
| 3 | +from agentle.agents.apis.api_metrics import APIMetrics |
| 4 | +from agentle.agents.apis.authentication import ( |
| 5 | + ApiKeyLocation, |
| 6 | + AuthType, |
| 7 | + AuthenticationConfig, |
| 8 | + AuthenticationBase, |
| 9 | + NoAuthentication, |
| 10 | + BearerAuthentication, |
| 11 | + BasicAuthentication, |
| 12 | + ApiKeyAuthentication, |
| 13 | + OAuth2Authentication, |
| 14 | + HMACAuthentication, |
| 15 | + OAuth2GrantType, |
| 16 | +) |
| 17 | +from agentle.agents.apis.endpoint import Endpoint |
| 18 | +from agentle.agents.apis.endpoint_parameter import EndpointParameter |
| 19 | +from agentle.agents.apis.file_upload import FileUpload |
| 20 | +from agentle.agents.apis.http_method import HTTPMethod |
| 21 | +from agentle.agents.apis.object_serialization_style import ObjectSerializationStyle |
| 22 | +from agentle.agents.apis.parameter_location import ParameterLocation |
| 23 | +from agentle.agents.apis.request_config import ( |
| 24 | + CacheStrategy, |
| 25 | + CircuitBreaker, |
| 26 | + CircuitBreakerError, |
| 27 | + RateLimiter, |
| 28 | + RequestConfig, |
| 29 | + ResponseCache, |
| 30 | + RetryStrategy, |
| 31 | + RateLimitError, |
| 32 | +) |
| 33 | +from agentle.agents.apis.request_hook import RequestHook |
| 34 | +from agentle.agents.apis.object_schema import ObjectSchema |
| 35 | +from agentle.agents.apis.array_schema import ArraySchema |
| 36 | +from agentle.agents.apis.primitive_schema import PrimitiveSchema |
| 37 | +from agentle.agents.apis.endpoints_to_tools import endpoints_to_tools |
6 | 38 |
|
7 | 39 | _types = { |
8 | 40 | "ObjectSchema": ObjectSchema, |
9 | 41 | "ArraySchema": ArraySchema, |
10 | 42 | "PrimitiveSchema": PrimitiveSchema, |
11 | 43 | } |
12 | 44 |
|
13 | | - |
| 45 | +# Rebuild models for proper type resolution |
14 | 46 | ObjectSchema.model_rebuild(_types_namespace=_types) |
15 | 47 | ArraySchema.model_rebuild(_types_namespace=_types) |
16 | 48 | PrimitiveSchema.model_rebuild(_types_namespace=_types) |
17 | 49 | EndpointParameter.model_rebuild(_types_namespace=_types) |
| 50 | + |
| 51 | +__all__ = [ |
| 52 | + # API classes |
| 53 | + "API", |
| 54 | + "APIMetrics", |
| 55 | + # Endpoint classes |
| 56 | + "Endpoint", |
| 57 | + "EndpointParameter", |
| 58 | + "FileUpload", |
| 59 | + "RequestHook", |
| 60 | + "HTTPMethod", |
| 61 | + "ParameterLocation", |
| 62 | + "ObjectSerializationStyle", |
| 63 | + # Authentication classes |
| 64 | + "AuthType", |
| 65 | + "ApiKeyLocation", |
| 66 | + "OAuth2GrantType", |
| 67 | + "AuthenticationBase", |
| 68 | + "NoAuthentication", |
| 69 | + "BearerAuthentication", |
| 70 | + "BasicAuthentication", |
| 71 | + "ApiKeyAuthentication", |
| 72 | + "OAuth2Authentication", |
| 73 | + "HMACAuthentication", |
| 74 | + "AuthenticationConfig", |
| 75 | + # Request configuration classes |
| 76 | + "RequestConfig", |
| 77 | + "RetryStrategy", |
| 78 | + "CacheStrategy", |
| 79 | + "CircuitBreaker", |
| 80 | + "RateLimiter", |
| 81 | + "ResponseCache", |
| 82 | + "CircuitBreakerError", |
| 83 | + "RateLimitError", |
| 84 | + # Schema classes |
| 85 | + "ObjectSchema", |
| 86 | + "ArraySchema", |
| 87 | + "PrimitiveSchema", |
| 88 | + # Utilities |
| 89 | + "endpoints_to_tools", |
| 90 | +] |
0 commit comments