hajinryu / livinglab_codegen

openapi generator을 사용하여 python client 생성

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openapi-client

Api Documentation

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >=3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import openapi_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import openapi_client

Getting Started

Please follow the installation procedure and then run the following:

import time
import openapi_client
from pprint import pprint
from openapi_client.api import api_controller_api
from openapi_client.model.livestock_api_response_vo import LivestockApiResponseVO
from openapi_client.model.seamless_forecast_api_response_vo import SeamlessForecastApiResponseVO
from openapi_client.model.short_term_live_api_response_vo import ShortTermLiveApiResponseVO
# Defining the host is optional and defaults to http://poultryheatstress.co.kr
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "http://poultryheatstress.co.kr"
)



# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = api_controller_api.ApiControllerApi(api_client)
    user_name = "userName_example" # str | 에스이랩

    try:
        # livestockList 요청
        api_response = api_instance.get_livestock_list_api_response_using_get(user_name)
        pprint(api_response)
    except openapi_client.ApiException as e:
        print("Exception when calling ApiControllerApi->get_livestock_list_api_response_using_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://poultryheatstress.co.kr

Class Method HTTP request Description
ApiControllerApi get_livestock_list_api_response_using_get GET /api/livestockList livestockList 요청
ApiControllerApi get_seamless_forecast_api_test_response_using_get GET /api/ShortTermLiveData ShortTermLiveData 기상청 초단기실황 데이터 요청
ApiControllerApi get_seamless_forecast_api_test_response_using_get1 GET /api/seamlessForecast SeamlessForecast 요청
ForecastDataControllerApi access_jupyter_notebook_using_post POST /api/forecast/mergence accessJupyterNotebook
JupyterCallBackApiControllerApi jupyter_log_using_get GET /api/jupyterCallBack jupyterLog
NiceApiControllerApi get_nice_token_using_post POST /api/niceCryptoToken getNiceToken

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in openapi_client.apis and openapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from openapi_client.api.default_api import DefaultApi
  • from openapi_client.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import openapi_client
from openapi_client.apis import *
from openapi_client.models import *

About

openapi generator을 사용하여 python client 생성


Languages

Language:Python 99.4%Language:Shell 0.6%