fleet-python 0.2.23__py3-none-any.whl → 0.2.24__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.
Potentially problematic release.
This version of fleet-python might be problematic. Click here for more details.
- fleet/_async/client.py +10 -0
- fleet/_async/env/client.py +5 -1
- fleet/client.py +10 -0
- fleet/env/__init__.py +4 -1
- fleet/env/client.py +5 -1
- fleet/models.py +8 -0
- {fleet_python-0.2.23.dist-info → fleet_python-0.2.24.dist-info}/METADATA +1 -1
- {fleet_python-0.2.23.dist-info → fleet_python-0.2.24.dist-info}/RECORD +11 -11
- {fleet_python-0.2.23.dist-info → fleet_python-0.2.24.dist-info}/WHEEL +0 -0
- {fleet_python-0.2.23.dist-info → fleet_python-0.2.24.dist-info}/licenses/LICENSE +0 -0
- {fleet_python-0.2.23.dist-info → fleet_python-0.2.24.dist-info}/top_level.txt +0 -0
fleet/_async/client.py
CHANGED
|
@@ -29,6 +29,7 @@ from ..models import (
|
|
|
29
29
|
VerifiersCheckResponse,
|
|
30
30
|
VerifiersExecuteResponse,
|
|
31
31
|
TaskListResponse,
|
|
32
|
+
AccountResponse,
|
|
32
33
|
)
|
|
33
34
|
from .tasks import Task
|
|
34
35
|
|
|
@@ -268,6 +269,15 @@ class AsyncFleet:
|
|
|
268
269
|
|
|
269
270
|
return tasks
|
|
270
271
|
|
|
272
|
+
async def account(self) -> AccountResponse:
|
|
273
|
+
"""Get account information including instance limits and usage.
|
|
274
|
+
|
|
275
|
+
Returns:
|
|
276
|
+
AccountResponse containing team_id, team_name, instance_limit, and instance_count
|
|
277
|
+
"""
|
|
278
|
+
response = await self.client.request("GET", "/v1/account")
|
|
279
|
+
return AccountResponse(**response.json())
|
|
280
|
+
|
|
271
281
|
|
|
272
282
|
# Shared
|
|
273
283
|
async def _delete_instance(client: AsyncWrapper, instance_id: str) -> InstanceResponse:
|
fleet/_async/env/client.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from ..client import AsyncFleet, AsyncEnv
|
|
2
|
-
from ...models import Environment as EnvironmentModel
|
|
2
|
+
from ...models import Environment as EnvironmentModel, AccountResponse
|
|
3
3
|
from typing import List, Optional
|
|
4
4
|
|
|
5
5
|
|
|
@@ -23,3 +23,7 @@ async def list_instances_async(
|
|
|
23
23
|
|
|
24
24
|
async def get_async(instance_id: str) -> AsyncEnv:
|
|
25
25
|
return await AsyncFleet().instance(instance_id)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
async def account_async() -> AccountResponse:
|
|
29
|
+
return await AsyncFleet().account()
|
fleet/client.py
CHANGED
|
@@ -29,6 +29,7 @@ from .models import (
|
|
|
29
29
|
VerifiersCheckResponse,
|
|
30
30
|
VerifiersExecuteResponse,
|
|
31
31
|
TaskListResponse,
|
|
32
|
+
AccountResponse,
|
|
32
33
|
)
|
|
33
34
|
from .tasks import Task
|
|
34
35
|
|
|
@@ -268,6 +269,15 @@ class Fleet:
|
|
|
268
269
|
|
|
269
270
|
return tasks
|
|
270
271
|
|
|
272
|
+
def account(self) -> AccountResponse:
|
|
273
|
+
"""Get account information including instance limits and usage.
|
|
274
|
+
|
|
275
|
+
Returns:
|
|
276
|
+
AccountResponse containing team_id, team_name, instance_limit, and instance_count
|
|
277
|
+
"""
|
|
278
|
+
response = self.client.request("GET", "/v1/account")
|
|
279
|
+
return AccountResponse(**response.json())
|
|
280
|
+
|
|
271
281
|
|
|
272
282
|
# Shared
|
|
273
283
|
def _delete_instance(client: SyncWrapper, instance_id: str) -> InstanceResponse:
|
fleet/env/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Fleet env module - convenience functions for environment management."""
|
|
2
2
|
|
|
3
|
-
from .client import make, list_envs, list_regions, get, list_instances
|
|
3
|
+
from .client import make, list_envs, list_regions, get, list_instances, account
|
|
4
4
|
|
|
5
5
|
# Import async versions from _async
|
|
6
6
|
from .._async.env.client import (
|
|
@@ -9,6 +9,7 @@ from .._async.env.client import (
|
|
|
9
9
|
list_regions_async,
|
|
10
10
|
get_async,
|
|
11
11
|
list_instances_async,
|
|
12
|
+
account_async,
|
|
12
13
|
)
|
|
13
14
|
|
|
14
15
|
__all__ = [
|
|
@@ -22,4 +23,6 @@ __all__ = [
|
|
|
22
23
|
"list_regions_async",
|
|
23
24
|
"list_instances_async",
|
|
24
25
|
"get_async",
|
|
26
|
+
"account",
|
|
27
|
+
"account_async",
|
|
25
28
|
]
|
fleet/env/client.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from ..client import Fleet, SyncEnv
|
|
2
|
-
from ..models import Environment as EnvironmentModel
|
|
2
|
+
from ..models import Environment as EnvironmentModel, AccountResponse
|
|
3
3
|
from typing import List, Optional
|
|
4
4
|
|
|
5
5
|
|
|
@@ -23,3 +23,7 @@ def list_instances(
|
|
|
23
23
|
|
|
24
24
|
def get(instance_id: str) -> SyncEnv:
|
|
25
25
|
return Fleet().instance(instance_id)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def account() -> AccountResponse:
|
|
29
|
+
return Fleet().account()
|
fleet/models.py
CHANGED
|
@@ -305,6 +305,14 @@ class TaskListResponse(BaseModel):
|
|
|
305
305
|
total: int = Field(..., title='Total')
|
|
306
306
|
|
|
307
307
|
|
|
308
|
+
class AccountResponse(BaseModel):
|
|
309
|
+
"""Response model for account information."""
|
|
310
|
+
team_id: str = Field(..., title='Team Id')
|
|
311
|
+
team_name: str = Field(..., title='Team Name')
|
|
312
|
+
instance_limit: int = Field(..., title='Instance Limit')
|
|
313
|
+
instance_count: int = Field(..., title='Instance Count')
|
|
314
|
+
|
|
315
|
+
|
|
308
316
|
class InstanceResponse(BaseModel):
|
|
309
317
|
instance_id: str = Field(..., title='Instance Id')
|
|
310
318
|
env_key: str = Field(..., title='Env Key')
|
|
@@ -17,20 +17,20 @@ examples/query_builder_example.py,sha256=Q3lUBETHpu1aS2FXAO79ADYqCxOjMMMZNgCcFVa
|
|
|
17
17
|
examples/quickstart.py,sha256=1VT39IRRhemsJgxi0O0gprdpcw7HB4pYO97GAYagIcg,3788
|
|
18
18
|
fleet/__init__.py,sha256=5js0jYu1wddNyfy4sJIcoVGMZNZeHHSAPJJzfFXN-Po,2276
|
|
19
19
|
fleet/base.py,sha256=0yYuMN0lBkrfTTZBt5NQp5112xWgziuWEk4GuHJB1wE,9189
|
|
20
|
-
fleet/client.py,sha256=
|
|
20
|
+
fleet/client.py,sha256=HJfUy9UlHw7610Cx1zhgIAl9Wu40OVH7hhpCvaTueJg,11970
|
|
21
21
|
fleet/config.py,sha256=zd19st83NJdW9DdOq7Irpc0x-iUnMad0JOtAr_nD5DM,273
|
|
22
22
|
fleet/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
23
|
-
fleet/models.py,sha256=
|
|
23
|
+
fleet/models.py,sha256=qDw9_yfn9t9VDOWaNPlnevTWIEuJQNZ0EQQTpuooEas,11716
|
|
24
24
|
fleet/tasks.py,sha256=OScp0tHIbCmOpmCFzHATBmA7WiJMlehP3rvEfeMAoPk,1648
|
|
25
25
|
fleet/types.py,sha256=eXeI8BFmiU5hln0PVvJbUZs7BSjl6wSqAtN9zaJT6yY,652
|
|
26
26
|
fleet/_async/__init__.py,sha256=AJWCnuo7XKja4yBb8fK2wX7ntciLXQrpzdRHwjTRP6M,62
|
|
27
27
|
fleet/_async/base.py,sha256=s0rYOtXsMJeitOvpa-Oh8ciLV226p_TIPp3fplzWvV4,9209
|
|
28
|
-
fleet/_async/client.py,sha256=
|
|
28
|
+
fleet/_async/client.py,sha256=XOociP8kFb7PnSifxuURpqBC7Tk5C4o_8nhSrBfQMcQ,12315
|
|
29
29
|
fleet/_async/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
30
30
|
fleet/_async/models.py,sha256=aPjcwbGfyEoDaS5Iip3cAyy3j5NDqhP0wyrvtVvF3M8,11410
|
|
31
31
|
fleet/_async/tasks.py,sha256=7ddJWkgulGW7dTPVQUUcl2L0HgsajmMQY6AUblHpG8A,1649
|
|
32
32
|
fleet/_async/env/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
fleet/_async/env/client.py,sha256=
|
|
33
|
+
fleet/_async/env/client.py,sha256=MR2Ju7AudGWmztTVUPPut-ys3yqD7D00D_jsxZaRybA,858
|
|
34
34
|
fleet/_async/instance/__init__.py,sha256=PtmJq8J8bh0SOQ2V55QURz5GJfobozwtQoqhaOk3_tI,515
|
|
35
35
|
fleet/_async/instance/base.py,sha256=3qUBuUR8OVS36LzdP6KyZzngtwPKYO09HoY6Ekxp-KA,1625
|
|
36
36
|
fleet/_async/instance/client.py,sha256=2ZNoBxRJXDQc8fohCLy_RNo-wmuUKXzJo5RZQeCQnkQ,6069
|
|
@@ -41,8 +41,8 @@ fleet/_async/resources/sqlite.py,sha256=DvDLRI5dJ7_v4WkHw-Zday1M_FQUdzAqUCy9FtfO
|
|
|
41
41
|
fleet/_async/verifiers/__init__.py,sha256=Z2Ic77mw6-mhF5CmVrucmDnAGSTAtiejR_eZjTjPPA0,447
|
|
42
42
|
fleet/_async/verifiers/bundler.py,sha256=A4yR3wBOcVZYFAv87CD58QlJn6L4QXeilrasnVm8n74,26185
|
|
43
43
|
fleet/_async/verifiers/verifier.py,sha256=fhy1bs_n0Ki2xDtisZI86McIZ09-v5WUFo5tZCBRsvA,12153
|
|
44
|
-
fleet/env/__init__.py,sha256=
|
|
45
|
-
fleet/env/client.py,sha256=
|
|
44
|
+
fleet/env/__init__.py,sha256=Wt6mO2dQnOdzdjOCvtiIP49wpSrmS7OaZ_OeHNrzqsY,595
|
|
45
|
+
fleet/env/client.py,sha256=2FzA7qfR-B7tVdCNa4uQk10g8zXV-9MNjAqx2D5vQ7c,710
|
|
46
46
|
fleet/instance/__init__.py,sha256=-Anms7Vw_FO8VBIvwnAnq4rQjwl_XNfAS-i7bypHMow,478
|
|
47
47
|
fleet/instance/base.py,sha256=OYqzBwZFfTX9wlBGSG5gljqj98NbiJeKIfFJ3uj5I4s,1587
|
|
48
48
|
fleet/instance/client.py,sha256=4x-3IZZNwlK02OJLKp7mhSymRgXk8NToRCDU3ZuDnJ0,5891
|
|
@@ -60,10 +60,10 @@ fleet/verifiers/decorator.py,sha256=Q-KHhicnIYFwX7FX_VZguzNfu8ZslqNUeWxcS2CwNVY,
|
|
|
60
60
|
fleet/verifiers/parse.py,sha256=FYbzgX86dLAxoAZ3jXfu6zRPlNxgzjTkhO3yxMC0hZ4,5261
|
|
61
61
|
fleet/verifiers/sql_differ.py,sha256=dmiGCFXVMEMbAX519OjhVqgA8ZvhnvdmC1BVpL7QCF0,6490
|
|
62
62
|
fleet/verifiers/verifier.py,sha256=-iEnLi4BOpqMV8tJgSPcTi_mGWM3vMJiAYTmaJolo2c,12080
|
|
63
|
-
fleet_python-0.2.
|
|
63
|
+
fleet_python-0.2.24.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
64
64
|
scripts/fix_sync_imports.py,sha256=zangqElfqIvIc-E0S46m6R-51pTZ6gbd8oUVkvCGzJo,4768
|
|
65
65
|
scripts/unasync.py,sha256=--Fmaae47o-dZ1HYgX1c3Nvi-rMjcFymTRlJcWWnmpw,725
|
|
66
|
-
fleet_python-0.2.
|
|
67
|
-
fleet_python-0.2.
|
|
68
|
-
fleet_python-0.2.
|
|
69
|
-
fleet_python-0.2.
|
|
66
|
+
fleet_python-0.2.24.dist-info/METADATA,sha256=JcD86EF6s8M3Z7Meyq30c4eYp1-gP4nqrBkcf9gE4B8,3297
|
|
67
|
+
fleet_python-0.2.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
68
|
+
fleet_python-0.2.24.dist-info/top_level.txt,sha256=_3DSmTohvSDf3AIP_BYfGzhwO1ECFwuzg83X-wHCx3Y,23
|
|
69
|
+
fleet_python-0.2.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|