airtrain 0.1.3__py3-none-any.whl → 0.1.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airtrain/__init__.py +1 -1
- airtrain/core/credentials.py +3 -31
- airtrain/integrations/__init__.py +26 -0
- {airtrain-0.1.3.dist-info → airtrain-0.1.5.dist-info}/METADATA +1 -1
- airtrain-0.1.5.dist-info/RECORD +10 -0
- airtrain-0.1.3.dist-info/RECORD +0 -9
- {airtrain-0.1.3.dist-info → airtrain-0.1.5.dist-info}/WHEEL +0 -0
- {airtrain-0.1.3.dist-info → airtrain-0.1.5.dist-info}/top_level.txt +0 -0
airtrain/__init__.py
CHANGED
airtrain/core/credentials.py
CHANGED
@@ -5,7 +5,7 @@ from pathlib import Path
|
|
5
5
|
from abc import ABC, abstractmethod
|
6
6
|
import dotenv
|
7
7
|
from pydantic import BaseModel, Field, SecretStr
|
8
|
-
import yaml
|
8
|
+
import yaml
|
9
9
|
|
10
10
|
|
11
11
|
class CredentialError(Exception):
|
@@ -100,7 +100,7 @@ class BaseCredentials(BaseModel):
|
|
100
100
|
else:
|
101
101
|
raise ValueError(f"Unsupported file format: {file_path.suffix}")
|
102
102
|
|
103
|
-
def validate_credentials(self) ->
|
103
|
+
async def validate_credentials(self) -> bool:
|
104
104
|
"""Validate that all required credentials are present"""
|
105
105
|
missing = []
|
106
106
|
for field_name in self._required_credentials:
|
@@ -114,6 +114,7 @@ class BaseCredentials(BaseModel):
|
|
114
114
|
raise CredentialValidationError(
|
115
115
|
f"Missing required credentials: {', '.join(missing)}"
|
116
116
|
)
|
117
|
+
return True
|
117
118
|
|
118
119
|
def clear_from_env(self) -> None:
|
119
120
|
"""Remove credentials from environment variables"""
|
@@ -122,32 +123,3 @@ class BaseCredentials(BaseModel):
|
|
122
123
|
if env_key in os.environ:
|
123
124
|
del os.environ[env_key]
|
124
125
|
self._loaded = False
|
125
|
-
|
126
|
-
|
127
|
-
class OpenAICredentials(BaseCredentials):
|
128
|
-
"""OpenAI API credentials"""
|
129
|
-
|
130
|
-
api_key: SecretStr = Field(..., description="OpenAI API key")
|
131
|
-
organization_id: Optional[str] = Field(None, description="OpenAI organization ID")
|
132
|
-
|
133
|
-
_required_credentials = {"api_key"}
|
134
|
-
|
135
|
-
|
136
|
-
class AWSCredentials(BaseCredentials):
|
137
|
-
"""AWS credentials"""
|
138
|
-
|
139
|
-
aws_access_key_id: SecretStr
|
140
|
-
aws_secret_access_key: SecretStr
|
141
|
-
aws_region: str = "us-east-1"
|
142
|
-
aws_session_token: Optional[SecretStr] = None
|
143
|
-
|
144
|
-
_required_credentials = {"aws_access_key_id", "aws_secret_access_key"}
|
145
|
-
|
146
|
-
|
147
|
-
class GoogleCloudCredentials(BaseCredentials):
|
148
|
-
"""Google Cloud credentials"""
|
149
|
-
|
150
|
-
project_id: str
|
151
|
-
service_account_key: SecretStr
|
152
|
-
|
153
|
-
_required_credentials = {"project_id", "service_account_key"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"""Airtrain integrations package"""
|
2
|
+
|
3
|
+
from .openai.credentials import OpenAICredentials
|
4
|
+
from .aws.credentials import AWSCredentials
|
5
|
+
from .google.credentials import GoogleCloudCredentials
|
6
|
+
from .anthropic.credentials import AnthropicCredentials
|
7
|
+
from .groq.credentials import GroqCredentials
|
8
|
+
from .together.credentials import TogetherAICredentials
|
9
|
+
from .ollama.credentials import OllamaCredentials
|
10
|
+
from .sambanova.credentials import SambanovaCredentials
|
11
|
+
from .cerebras.credentials import CerebrasCredentials
|
12
|
+
|
13
|
+
from .anthropic.skills import AnthropicChatSkill
|
14
|
+
|
15
|
+
__all__ = [
|
16
|
+
"OpenAICredentials",
|
17
|
+
"AWSCredentials",
|
18
|
+
"GoogleCloudCredentials",
|
19
|
+
"AnthropicCredentials",
|
20
|
+
"AnthropicChatSkill",
|
21
|
+
"GroqCredentials",
|
22
|
+
"TogetherAICredentials",
|
23
|
+
"OllamaCredentials",
|
24
|
+
"SambanovaCredentials",
|
25
|
+
"CerebrasCredentials",
|
26
|
+
]
|
@@ -0,0 +1,10 @@
|
|
1
|
+
airtrain/__init__.py,sha256=eiw0x9Hie0dA0nrYtKSmD3XbW1KKOLr640Lu13DZFBs,312
|
2
|
+
airtrain/core/__init__.py,sha256=9h7iKwTzZocCPc9bU6j8bA02BokteWIOcO1uaqGMcrk,254
|
3
|
+
airtrain/core/credentials.py,sha256=PgQotrQc46J5djidKnkK1znUv3fyNkUFDO-m2Kn_Gzo,4006
|
4
|
+
airtrain/core/schemas.py,sha256=MMXrDviC4gRea_QaPpbjgO--B_UKxnD7YrxqZOLJZZU,7003
|
5
|
+
airtrain/core/skills.py,sha256=LljalzeSHK5eQPTAOEAYc5D8Qn1kVSfiz9WgziTD5UM,4688
|
6
|
+
airtrain/integrations/__init__.py,sha256=PRKI_A-KE307C4lpXgFAsZA2oFtTl1kt_4CrRUF2rpU,832
|
7
|
+
airtrain-0.1.5.dist-info/METADATA,sha256=YJiHLxGUOwqQvLlqis-JQrtmLcpeIP_11T_hn8pIFxg,2786
|
8
|
+
airtrain-0.1.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
9
|
+
airtrain-0.1.5.dist-info/top_level.txt,sha256=cFWW1vY6VMCb3AGVdz6jBDpZ65xxBRSqlsPyySxTkxY,9
|
10
|
+
airtrain-0.1.5.dist-info/RECORD,,
|
airtrain-0.1.3.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
airtrain/__init__.py,sha256=tgJhVEwGGFzwlIrtXHGfUULQOZm8Tb4NOrRCXUTau9g,312
|
2
|
-
airtrain/core/__init__.py,sha256=9h7iKwTzZocCPc9bU6j8bA02BokteWIOcO1uaqGMcrk,254
|
3
|
-
airtrain/core/credentials.py,sha256=CzUZkAFxrSMC0nq70zybkkJmeIZDYiNBuzfivOTEgH0,4773
|
4
|
-
airtrain/core/schemas.py,sha256=MMXrDviC4gRea_QaPpbjgO--B_UKxnD7YrxqZOLJZZU,7003
|
5
|
-
airtrain/core/skills.py,sha256=LljalzeSHK5eQPTAOEAYc5D8Qn1kVSfiz9WgziTD5UM,4688
|
6
|
-
airtrain-0.1.3.dist-info/METADATA,sha256=mbq-9NwqtCnevHmiKtC4r1jneyDrFyQJE0uvfSOir6s,2786
|
7
|
-
airtrain-0.1.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
8
|
-
airtrain-0.1.3.dist-info/top_level.txt,sha256=cFWW1vY6VMCb3AGVdz6jBDpZ65xxBRSqlsPyySxTkxY,9
|
9
|
-
airtrain-0.1.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|