agree-partner-api 3.0.0b1__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.
@@ -0,0 +1,28 @@
1
+ """SDK gerado da Agree Partner API (feed de perfis), com iterador de paginação e retry.
2
+
3
+ O código em ``agree_partner_api.generated`` é gerado do contrato OpenAPI e não deve ser editado à
4
+ mão. Só ``pagination`` e ``retry`` são escritos à mão. Suporte melhor esforço.
5
+ """
6
+
7
+ from agree_partner_api.generated import ApiClient, Configuration
8
+ from agree_partner_api.generated.api.perfis_api import PerfisApi
9
+ from agree_partner_api.generated.exceptions import ApiException
10
+ from agree_partner_api.generated.models.profile import Profile
11
+ from agree_partner_api.generated.models.profile_list import ProfileList
12
+ from agree_partner_api.pagination import all_profiles, profile_pages
13
+ from agree_partner_api.retry import RetryPolicy, call_with_retry
14
+
15
+ __version__ = "3.0.0b1"
16
+
17
+ __all__ = [
18
+ "ApiClient",
19
+ "ApiException",
20
+ "Configuration",
21
+ "PerfisApi",
22
+ "Profile",
23
+ "ProfileList",
24
+ "RetryPolicy",
25
+ "all_profiles",
26
+ "call_with_retry",
27
+ "profile_pages",
28
+ ]
@@ -0,0 +1,56 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ Agree Partner API
7
+
8
+ Vista pública da Agree Partner API para a sandbox de parceiros. Traz só as rotas disponíveis hoje: o feed e o detalhe de perfis desidentificados dos produtores que autorizaram compartilhar dados com o parceiro. Somente leitura. ## Autenticação O token é o da própria empresa parceira, pelo grant `client_credentials`, com o `client_id` e o `client_secret` no cabeçalho Basic, `scope=farm:read` e `resource=https://api-sandbox.agree.agr.br/partner/v1`. Toda chamada leva `Authorization: Bearer <token>` e o cabeçalho `X-Agree-Client-Id` com o `client_id` do token. ## Paginação O feed é paginado por `next_cursor`, que é opaco: repita a chamada com `cursor=<next_cursor>` e os mesmos filtros até ele vir vazio. Não há total. ## Limites Cada parceiro tem um limite de requisições por segundo, anunciado em `Agree-RateLimit-Limit`. O feed e o detalhe de perfis têm também um orçamento de consultas e de produtores distintos por hora e por dia (UTC). Acima deles, a resposta é `429 rate_limited`, com `Retry-After`. Com a quota mensal ligada, a quota esgotada responde `429 quota_exceeded`. ## Erros Os erros do serviço são Problem Details (RFC 9457) em `application/problem+json`. Trate o campo `code`; o `trace_id` serve para abrir chamado. Recusas da borda da rede e falhas do balanceador podem vir sem esse formato: trate como temporárias e repita com espera crescente. Guia, catálogo de erros e dicionário de dados: Portal do desenvolvedor Agree.
9
+
10
+ The version of the OpenAPI document: 3.0.0
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "3.0.0b1"
18
+
19
+ # Define package exports
20
+ __all__ = [
21
+ "PerfisApi",
22
+ "ApiResponse",
23
+ "ApiClient",
24
+ "Configuration",
25
+ "OpenApiException",
26
+ "ApiTypeError",
27
+ "ApiValueError",
28
+ "ApiKeyError",
29
+ "ApiAttributeError",
30
+ "ApiException",
31
+ "Problem",
32
+ "ProblemError",
33
+ "Profile",
34
+ "ProfileList",
35
+ ]
36
+
37
+ # import apis into sdk package
38
+ from agree_partner_api.generated.api.perfis_api import PerfisApi as PerfisApi
39
+
40
+ # import ApiClient
41
+ from agree_partner_api.generated.api_response import ApiResponse as ApiResponse
42
+ from agree_partner_api.generated.api_client import ApiClient as ApiClient
43
+ from agree_partner_api.generated.configuration import Configuration as Configuration
44
+ from agree_partner_api.generated.exceptions import OpenApiException as OpenApiException
45
+ from agree_partner_api.generated.exceptions import ApiTypeError as ApiTypeError
46
+ from agree_partner_api.generated.exceptions import ApiValueError as ApiValueError
47
+ from agree_partner_api.generated.exceptions import ApiKeyError as ApiKeyError
48
+ from agree_partner_api.generated.exceptions import ApiAttributeError as ApiAttributeError
49
+ from agree_partner_api.generated.exceptions import ApiException as ApiException
50
+
51
+ # import models into sdk package
52
+ from agree_partner_api.generated.models.problem import Problem as Problem
53
+ from agree_partner_api.generated.models.problem_error import ProblemError as ProblemError
54
+ from agree_partner_api.generated.models.profile import Profile as Profile
55
+ from agree_partner_api.generated.models.profile_list import ProfileList as ProfileList
56
+
@@ -0,0 +1,5 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from agree_partner_api.generated.api.perfis_api import PerfisApi
5
+