Skip to content

Commit

Permalink
rename configurations to pydantic in python-pydantic-responses test
Browse files Browse the repository at this point in the history
  • Loading branch information
dphuang2 committed Nov 1, 2023
1 parent 612455b commit 61bdd70
Show file tree
Hide file tree
Showing 60 changed files with 262 additions and 262 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

|Language|Version|Package Manager|Documentation|Source|
|-|-|-|-|-|
|Python|1.0.0|[PyPI](https://pypi.org/project/python-dataclass-responses-python-sdk/1.0.0)|[Documentation](https://github.com/konfig-dev/konfig/tree/main/python/blob/main/README.md)|[Source](https://github.com/konfig-dev/konfig/tree/main/python)|
|Python|1.0.0|[PyPI](https://pypi.org/project/python-pydantic-responses-python-sdk/1.0.0)|[Documentation](https://github.com/konfig-dev/konfig/tree/main/python/blob/main/README.md)|[Source](https://github.com/konfig-dev/konfig/tree/main/python)|
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: Python Dataclass Responses API
description: A simple API based on python dataclass responses.
title: Python Pydantic Responses API
description: A simple API based on python pydantic responses.
version: 1.0.0
termsOfService: http://example.com/terms/
contact:
Expand All @@ -13,7 +13,7 @@ info:
url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- description: Live API server
url: https://python-dataclass-responses.konfigthis.com
url: https://python-pydantic-responses.konfigthis.com
tags:
- name: Test
paths:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# yaml-language-server: $schema=https://unpkg.com/konfig-lib@latest/konfig-yaml.schema.json

outputDirectory: /tmp/python-dataclass-responses-sdks-out
outputDirectory: /tmp/python-pydantic-responses-sdks-out
specPath: api.yaml
generators:
python:
version: 1.0.0
packageName: python_dataclass_responses
projectName: python-dataclass-responses-python-sdk
packageName: python_pydantic
projectName: python-pydantic-responses-python-sdk
outputDirectory: python
clientName: PythonDataclassResponses
clientName: PythonPydanticResponses
git:
userId: konfig-dev
repoId: konfig/tree/main/python
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# python-dataclass-responses-python-sdk
# python-pydantic-responses-python-sdk

A simple API based on python dataclass responses.
A simple API based on python pydantic responses.


[![PyPI](https://img.shields.io/badge/PyPI-v1.0.0-blue)](https://pypi.org/project/python-dataclass-responses-python-sdk/1.0.0)
[![PyPI](https://img.shields.io/badge/PyPI-v1.0.0-blue)](https://pypi.org/project/python-pydantic-responses-python-sdk/1.0.0)
[![GitHub last commit](https://img.shields.io/github/last-commit/konfig-dev/konfig.svg)](https://github.com/konfig-dev/konfig/commits)
[![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme)
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support)
Expand All @@ -17,7 +17,7 @@ A simple API based on python dataclass responses.
- [Getting Started](#getting-started)
- [Async](#async)
- [Reference](#reference)
* [`pythondataclassresponses.test.fetch`](#pythondataclassresponsestestfetch)
* [`pythonpydanticresponses.test.fetch`](#pythonpydanticresponsestestfetch)

<!-- tocstop -->

Expand All @@ -28,22 +28,22 @@ Python >=3.7
## Installing

```sh
pip install python-dataclass-responses-python-sdk==1.0.0
pip install python-pydantic-responses-python-sdk==1.0.0
```

## Getting Started

```python
from pprint import pprint
from python_dataclass_responses import PythonDataclassResponses, ApiException
from python_pydantic import PythonPydanticResponses, ApiException

pythondataclassresponses = PythonDataclassResponses(
pythonpydanticresponses = PythonPydanticResponses(
api_key="YOUR_API_KEY",
)

try:
# Fetches a JSON value based on input parameter
fetch_response = pythondataclassresponses.test.fetch(
fetch_response = pythonpydanticresponses.test.fetch(
input_parameter="inputParameter_example",
)
pprint(fetch_response.body)
Expand Down Expand Up @@ -73,17 +73,17 @@ except ApiException as e:
```python
import asyncio
from pprint import pprint
from python_dataclass_responses import PythonDataclassResponses, ApiException
from python_pydantic import PythonPydanticResponses, ApiException

pythondataclassresponses = PythonDataclassResponses(
pythonpydanticresponses = PythonPydanticResponses(
api_key="YOUR_API_KEY",
)


async def main():
try:
# Fetches a JSON value based on input parameter
fetch_response = await pythondataclassresponses.test.afetch(
fetch_response = await pythonpydanticresponses.test.afetch(
input_parameter="inputParameter_example",
)
pprint(fetch_response.body)
Expand Down Expand Up @@ -111,14 +111,14 @@ asyncio.run(main())


## Reference
### `pythondataclassresponses.test.fetch`
### `pythonpydanticresponses.test.fetch`

Provide an input parameter to receive a JSON value with properties.

#### 🛠️ Usage

```python
fetch_response = pythondataclassresponses.test.fetch(
fetch_response = pythonpydanticresponses.test.fetch(
input_parameter="inputParameter_example",
)
```
Expand All @@ -131,7 +131,7 @@ The input parameter to process.

#### 🔄 Return

[TestFetchResponse](./python_dataclass_responses/type/test_fetch_response.py)
[TestFetchResponse](./python_pydantic/type/test_fetch_response.py)

#### 🌐 Endpoint

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tool.poetry]
name = "python-dataclass-responses-python-sdk"
name = "python-pydantic-responses-python-sdk"
version = "1.0.0"
description = "Client for Python Dataclass Responses API"
description = "Client for Python Pydantic Responses API"
authors = ["API Support <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{include = "python_dataclass_responses"}]
packages = [{include = "python_pydantic"}]

[tool.poetry.dependencies]
python = "^3.7"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# coding: utf-8

# flake8: noqa

"""
Python Pydantic Responses API
A simple API based on python pydantic responses.
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Created by: http://example.com/support
"""

__version__ = "1.0.0"

# import ApiClient
from python_pydantic.api_client import ApiClient

# import Configuration
from python_pydantic.configuration import Configuration

# import exceptions
from python_pydantic.exceptions import OpenApiException
from python_pydantic.exceptions import ApiAttributeError
from python_pydantic.exceptions import ApiTypeError
from python_pydantic.exceptions import ApiValueError
from python_pydantic.exceptions import ApiKeyError
from python_pydantic.exceptions import ApiException

from python_pydantic.client import PythonPydanticResponses
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# coding: utf-8
"""
Python Dataclass Responses API
Python Pydantic Responses API
A simple API based on python dataclass responses.
A simple API based on python pydantic responses.
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Expand Down Expand Up @@ -32,14 +32,14 @@

import frozendict

from python_dataclass_responses import rest
from python_dataclass_responses.api_response import ApiResponse, AsyncApiResponse
from python_dataclass_responses.rest import AsyncResponseWrapper, ResponseWrapper
from python_dataclass_responses.configuration import Configuration
from python_dataclass_responses.exceptions import ApiTypeError, ApiValueError, MissingRequiredParametersError
from python_dataclass_responses.request_after_hook import request_after_hook
from python_dataclass_responses.request_before_url_hook import request_before_url_hook
from python_dataclass_responses.schemas import (
from python_pydantic import rest
from python_pydantic.api_response import ApiResponse, AsyncApiResponse
from python_pydantic.rest import AsyncResponseWrapper, ResponseWrapper
from python_pydantic.configuration import Configuration
from python_pydantic.exceptions import ApiTypeError, ApiValueError, MissingRequiredParametersError
from python_pydantic.request_after_hook import request_after_hook
from python_pydantic.request_before_url_hook import request_before_url_hook
from python_pydantic.schemas import (
NoneClass,
BoolClass,
Schema,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typing_extensions

from python_dataclass_responses.paths import PathValues
from python_dataclass_responses.apis.paths.simple_endpoint import SimpleEndpoint
from python_pydantic.paths import PathValues
from python_pydantic.apis.paths.simple_endpoint import SimpleEndpoint

PathToApi = typing_extensions.TypedDict(
'PathToApi',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# do not import all endpoints into this module because that uses a lot of memory and stack frames
# if you need the ability to import all endpoints from this module, import them with
# from python_dataclass_responses.apis.path_to_api import path_to_api
# from python_pydantic.apis.path_to_api import path_to_api
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from python_pydantic.paths.simple_endpoint.get import ApiForget


class SimpleEndpoint(
ApiForget,
):
pass
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typing_extensions

from python_dataclass_responses.apis.tags import TagValues
from python_dataclass_responses.apis.tags.test_api import TestApi
from python_pydantic.apis.tags import TagValues
from python_pydantic.apis.tags.test_api import TestApi

TagToApi = typing_extensions.TypedDict(
'TagToApi',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# do not import all endpoints into this module because that uses a lot of memory and stack frames
# if you need the ability to import all endpoints from this module, import them with
# from python_dataclass_responses.apis.tag_to_api import tag_to_api
# from python_pydantic.apis.tag_to_api import tag_to_api

import enum

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# coding: utf-8

"""
Python Dataclass Responses API
Python Pydantic Responses API
A simple API based on python dataclass responses.
A simple API based on python pydantic responses.
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Created by: http://example.com/support
"""

from python_dataclass_responses.paths.simple_endpoint.get import Fetch
from python_pydantic.paths.simple_endpoint.get import Fetch


class TestApi(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# coding: utf-8
"""
Python Dataclass Responses API
Python Pydantic Responses API
A simple API based on python dataclass responses.
A simple API based on python pydantic responses.
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Expand All @@ -12,15 +12,15 @@
import typing
import inspect
from datetime import date, datetime
from python_dataclass_responses.client_custom import ClientCustom
from python_dataclass_responses.configuration import Configuration
from python_dataclass_responses.api_client import ApiClient
from python_dataclass_responses.type_util import copy_signature
from python_dataclass_responses.apis.tags.test_api import TestApi
from python_pydantic.client_custom import ClientCustom
from python_pydantic.configuration import Configuration
from python_pydantic.api_client import ApiClient
from python_pydantic.type_util import copy_signature
from python_pydantic.apis.tags.test_api import TestApi



class PythonDataclassResponses(ClientCustom):
class PythonPydanticResponses(ClientCustom):

def __init__(self, configuration: typing.Union[Configuration, None] = None, **kwargs):
super().__init__(configuration, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# coding: utf-8
"""
Python Dataclass Responses API
Python Pydantic Responses API
A simple API based on python dataclass responses.
A simple API based on python pydantic responses.
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Expand All @@ -12,15 +12,15 @@
import typing
import inspect
from datetime import date, datetime
from python_dataclass_responses.client_custom import ClientCustom
from python_dataclass_responses.configuration import Configuration
from python_dataclass_responses.api_client import ApiClient
from python_dataclass_responses.type_util import copy_signature
from python_dataclass_responses.apis.tags.test_api import TestApi
from python_pydantic.client_custom import ClientCustom
from python_pydantic.configuration import Configuration
from python_pydantic.api_client import ApiClient
from python_pydantic.type_util import copy_signature
from python_pydantic.apis.tags.test_api import TestApi



class PythonDataclassResponses(ClientCustom):
class PythonPydanticResponses(ClientCustom):

def __init__(self, configuration: typing.Union[Configuration, None] = None, **kwargs):
super().__init__(configuration, **kwargs)
Expand Down
Loading

0 comments on commit 61bdd70

Please sign in to comment.