|
| 1 | +# This file was auto-generated by Fern from our API Definition. |
| 2 | + |
| 3 | +import typing |
| 4 | + |
| 5 | +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper |
| 6 | +from ..core.request_options import RequestOptions |
| 7 | +from ..types.project_info_response import ProjectInfoResponse |
| 8 | +from .raw_client import AsyncRawProjectClient, RawProjectClient |
| 9 | + |
| 10 | + |
| 11 | +class ProjectClient: |
| 12 | + def __init__(self, *, client_wrapper: SyncClientWrapper): |
| 13 | + self._raw_client = RawProjectClient(client_wrapper=client_wrapper) |
| 14 | + |
| 15 | + @property |
| 16 | + def with_raw_response(self) -> RawProjectClient: |
| 17 | + """ |
| 18 | + Retrieves a raw implementation of this client that returns raw responses. |
| 19 | +
|
| 20 | + Returns |
| 21 | + ------- |
| 22 | + RawProjectClient |
| 23 | + """ |
| 24 | + return self._raw_client |
| 25 | + |
| 26 | + def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> ProjectInfoResponse: |
| 27 | + """ |
| 28 | + Retrieve project info based on the provided api key. |
| 29 | +
|
| 30 | + Parameters |
| 31 | + ---------- |
| 32 | + request_options : typing.Optional[RequestOptions] |
| 33 | + Request-specific configuration. |
| 34 | +
|
| 35 | + Returns |
| 36 | + ------- |
| 37 | + ProjectInfoResponse |
| 38 | + Retrieved |
| 39 | +
|
| 40 | + Examples |
| 41 | + -------- |
| 42 | + from zep_cloud import Zep |
| 43 | +
|
| 44 | + client = Zep( |
| 45 | + api_key="YOUR_API_KEY", |
| 46 | + ) |
| 47 | + client.project.get() |
| 48 | + """ |
| 49 | + _response = self._raw_client.get(request_options=request_options) |
| 50 | + return _response.data |
| 51 | + |
| 52 | + |
| 53 | +class AsyncProjectClient: |
| 54 | + def __init__(self, *, client_wrapper: AsyncClientWrapper): |
| 55 | + self._raw_client = AsyncRawProjectClient(client_wrapper=client_wrapper) |
| 56 | + |
| 57 | + @property |
| 58 | + def with_raw_response(self) -> AsyncRawProjectClient: |
| 59 | + """ |
| 60 | + Retrieves a raw implementation of this client that returns raw responses. |
| 61 | +
|
| 62 | + Returns |
| 63 | + ------- |
| 64 | + AsyncRawProjectClient |
| 65 | + """ |
| 66 | + return self._raw_client |
| 67 | + |
| 68 | + async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> ProjectInfoResponse: |
| 69 | + """ |
| 70 | + Retrieve project info based on the provided api key. |
| 71 | +
|
| 72 | + Parameters |
| 73 | + ---------- |
| 74 | + request_options : typing.Optional[RequestOptions] |
| 75 | + Request-specific configuration. |
| 76 | +
|
| 77 | + Returns |
| 78 | + ------- |
| 79 | + ProjectInfoResponse |
| 80 | + Retrieved |
| 81 | +
|
| 82 | + Examples |
| 83 | + -------- |
| 84 | + import asyncio |
| 85 | +
|
| 86 | + from zep_cloud import AsyncZep |
| 87 | +
|
| 88 | + client = AsyncZep( |
| 89 | + api_key="YOUR_API_KEY", |
| 90 | + ) |
| 91 | +
|
| 92 | +
|
| 93 | + async def main() -> None: |
| 94 | + await client.project.get() |
| 95 | +
|
| 96 | +
|
| 97 | + asyncio.run(main()) |
| 98 | + """ |
| 99 | + _response = await self._raw_client.get(request_options=request_options) |
| 100 | + return _response.data |
0 commit comments