Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bd94969
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.70.2
speakeasybot Aug 9, 2023
a8fd2e5
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.72.0
speakeasybot Aug 15, 2023
afaba1c
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.74.3
speakeasybot Aug 19, 2023
8d10ad9
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.74.11
speakeasybot Aug 25, 2023
d277a72
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.74.16
speakeasybot Aug 26, 2023
ffb9abd
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.74.17
speakeasybot Aug 29, 2023
352d3c0
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.76.0
speakeasybot Aug 31, 2023
c8f5bfd
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.77.0
speakeasybot Sep 1, 2023
1fc19d3
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.77.2
speakeasybot Sep 2, 2023
201753a
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.78.3
speakeasybot Sep 5, 2023
a6deabe
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.82.5
speakeasybot Sep 12, 2023
8bec480
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.86.0
speakeasybot Sep 16, 2023
a0c4a0a
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.88.0
speakeasybot Sep 20, 2023
36877af
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.91.0
speakeasybot Sep 26, 2023
7d5003f
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.91.2
speakeasybot Sep 27, 2023
174052e
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.91.3
speakeasybot Sep 29, 2023
e5c81ba
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.92.2
speakeasybot Oct 1, 2023
bb6d965
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.92.3
speakeasybot Oct 2, 2023
066154a
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.94.0
speakeasybot Oct 5, 2023
320cd13
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.96.1
speakeasybot Oct 7, 2023
24d7ed1
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.99.1
speakeasybot Oct 13, 2023
683adf6
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.101.0
speakeasybot Oct 18, 2023
aa8894d
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.104.0
speakeasybot Oct 21, 2023
2bd7607
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.109.0
speakeasybot Oct 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: regenerated with OpenAPI Doc 0.2.0, Speakeay CLI 1.82.5
  • Loading branch information
speakeasybot committed Sep 12, 2023
commit a6deabef5c327f5eb31b5feb0e74a369927dab59
10 changes: 9 additions & 1 deletion access_token/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,12 @@ Based on:
- OpenAPI Doc 0.2.0 https://docs.api.epilot.io/access-token.yaml
- Speakeasy CLI 1.78.3 (2.96.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.7.2] access_token
- [python v1.7.2] access_token

## 2023-09-12 00:35:53
### Changes
Based on:
- OpenAPI Doc 0.2.0 https://docs.api.epilot.io/access-token.yaml
- Speakeasy CLI 1.82.5 (2.108.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.7.3] access_token
2 changes: 0 additions & 2 deletions access_token/docs/models/shared/accesstokenitem.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# AccessTokenItem

The revoked generated Access Token


## Fields

Expand Down
2 changes: 0 additions & 2 deletions access_token/docs/sdks/accesstokens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ s = epilot.Epilot(
req = operations.ListAccessTokensRequest(
token_type=[
shared.AccessTokenType.API,
shared.AccessTokenType.API,
shared.AccessTokenType.API,
],
)

Expand Down
8 changes: 4 additions & 4 deletions access_token/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ configVersion: 1.0.0
management:
docChecksum: 02397f0d4663d4ade6c146f4c087489b
docVersion: 0.2.0
speakeasyVersion: 1.78.3
generationVersion: 2.96.3
speakeasyVersion: 1.82.5
generationVersion: 2.108.3
generation:
sdkClassName: epilot
sdkFlattening: true
singleTagPerOp: false
telemetryEnabled: false
features:
python:
core: 2.85.3
core: 2.85.4
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
python:
version: 1.7.2
version: 1.7.3
author: epilot
description: Python Client SDK for Epilot
maxMethodParams: 0
Expand Down
2 changes: 1 addition & 1 deletion access_token/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setuptools.setup(
name="epilot-access-token",
version="1.7.2",
version="1.7.3",
author="epilot",
description="Python Client SDK for Epilot",
long_description=long_description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from dataclasses_json import Undefined, dataclass_json
from datetime import datetime
from epilot import utils
from marshmallow import fields
from typing import Optional


Expand All @@ -17,7 +16,7 @@
@dataclasses.dataclass
class CreateAccessToken201ApplicationJSON:
r"""The new generated Access Token"""
created_at: datetime = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created_at'), 'encoder': utils.datetimeisoformat(False), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }})
created_at: datetime = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created_at'), 'encoder': utils.datetimeisoformat(False), 'decoder': dateutil.parser.isoparse }})
id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
r"""Human readable name for access token"""
Expand Down
4 changes: 1 addition & 3 deletions access_token/src/epilot/models/shared/accesstokenitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
from dataclasses_json import Undefined, dataclass_json
from datetime import datetime
from epilot import utils
from marshmallow import fields
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class AccessTokenItem:
r"""The revoked generated Access Token"""
created_at: datetime = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created_at'), 'encoder': utils.datetimeisoformat(False), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }})
created_at: datetime = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created_at'), 'encoder': utils.datetimeisoformat(False), 'decoder': dateutil.parser.isoparse }})
id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
r"""Human readable name for access token"""
Expand Down
9 changes: 6 additions & 3 deletions access_token/src/epilot/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def __init__(self,
server_idx: int = None,
server_url: str = None,
url_params: dict[str, str] = None,
client: requests_http.Session = None
client: requests_http.Session = None,
retry_config: utils.RetryConfig = None
) -> None:
"""Instantiates the SDK configuring it with the provided parameters.

Expand All @@ -34,7 +35,9 @@ def __init__(self,
:param url_params: Parameters to optionally template the server URL with
:type url_params: dict[str, str]
:param client: The requests.Session HTTP client to use for all operations
:type client: requests_http.Session
:type client: requests_http.Session
:param retry_config: The utils.RetryConfig to use globally
:type retry_config: utils.RetryConfig
"""
if client is None:
client = requests_http.Session()
Expand All @@ -45,7 +48,7 @@ def __init__(self,
if url_params is not None:
server_url = utils.template_url(server_url, url_params)

self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server_idx)
self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server_idx, retry_config=retry_config)

self._init_sdks()

Expand Down
7 changes: 5 additions & 2 deletions access_token/src/epilot/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import requests
from dataclasses import dataclass

from .utils.retries import RetryConfig


SERVERS = [
'https://access-token.sls.epilot.io',
Expand All @@ -17,8 +19,9 @@ class SDKConfiguration:
server_idx: int = 0
language: str = 'python'
openapi_doc_version: str = '0.2.0'
sdk_version: str = '1.7.2'
gen_version: str = '2.96.3'
sdk_version: str = '1.7.3'
gen_version: str = '2.108.3'
retry_config: RetryConfig = None

def get_server_details(self) -> tuple[str, dict[str, str]]:
if self.server_url:
Expand Down
33 changes: 32 additions & 1 deletion access_token/src/epilot/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import re
from dataclasses import Field, dataclass, fields, is_dataclass, make_dataclass
from datetime import date, datetime
from decimal import Decimal
from email.message import Message
from enum import Enum
from typing import Any, Callable, Optional, Tuple, Union, get_args, get_origin
Expand Down Expand Up @@ -193,7 +194,7 @@ def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass
f"{pp_key},{_val_to_string(param[pp_key])}")
path = path.replace(
'{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
elif not isinstance(param, (str, int, float, complex, bool)):
elif not isinstance(param, (str, int, float, complex, bool, Decimal)):
pp_vals: list[str] = []
param_fields: Tuple[Field, ...] = fields(param)
for param_field in param_fields:
Expand Down Expand Up @@ -737,6 +738,36 @@ def datefromisoformat(date_str: str):
return dateutil.parser.parse(date_str).date()


def bigintencoder(optional: bool):
def bigintencode(val: int):
if optional and val is None:
return None
return str(val)

return bigintencode


def bigintdecoder(val):
return int(val)


def decimalencoder(optional: bool, as_str: bool):
def decimalencode(val: Decimal):
if optional and val is None:
return None

if as_str:
return str(val)

return float(val)

return decimalencode


def decimaldecoder(val):
return Decimal(str(val))


def get_field_name(name):
def override(_, _field_name=name):
return _field_name
Expand Down