Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uclouvain/osis-reference-sdk
A set of API endpoints that allow you to get information about reference tables
https://github.com/uclouvain/osis-reference-sdk
Last synced: 10 days ago
JSON representation
A set of API endpoints that allow you to get information about reference tables
- Host: GitHub
- URL: https://github.com/uclouvain/osis-reference-sdk
- Owner: uclouvain
- Created: 2021-10-13T09:16:26.000Z (over 3 years ago)
- Default Branch: build-1.0.1
- Last Pushed: 2024-01-03T15:39:04.000Z (about 1 year ago)
- Last Synced: 2024-11-14T21:11:47.456Z (2 months ago)
- Language: Python
- Size: 1.27 MB
- Stars: 0
- Watchers: 15
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# osis-reference-sdk
A set of API endpoints that allow you to get reference data.This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.12
- Package version: 1.0.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen## Requirements.
Python >= 3.5
## Installation & Usage
### pip installIf the python package is hosted on a repository, you can install directly using:
```sh
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:
```python
import osis_reference_sdk
```### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)Then import the package:
```python
import osis_reference_sdk
```## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
import time
import osis_reference_sdk
from pprint import pprint
from osis_reference_sdk.api import cities_api
from osis_reference_sdk.model.accepted_language_enum import AcceptedLanguageEnum
from osis_reference_sdk.model.array_of_city import ArrayOfCity
from osis_reference_sdk.model.error import Error
# Defining the host is optional and defaults to https://dev.osis.uclouvain.be/api/v1/reference
# See configuration.py for a list of all supported configuration parameters.
configuration = osis_reference_sdk.Configuration(
host = "https://dev.osis.uclouvain.be/api/v1/reference"
)# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.# Configure API key authorization: Token
configuration.api_key['Token'] = 'YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'# Enter a context with an instance of the API client
with osis_reference_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cities_api.CitiesApi(api_client)
limit = 1 # int | (optional)
offset = 1 # int | (optional)
search = "search_example" # str | (optional)
zip_code = "zip_code_example" # str | (optional)
name = "name_example" # str | (optional)
country_iso_code = "country_iso_code_example" # str | (optional)
accept_language = AcceptedLanguageEnum("en") # AcceptedLanguageEnum | The header advertises which languages the client is able to understand, and which locale variant is preferred. (By languages, we mean natural languages, such as English, and not programming languages.) (optional)
x_user_first_name = "X-User-FirstName_example" # str | (optional)
x_user_last_name = "X-User-LastName_example" # str | (optional)
x_user_email = "X-User-Email_example" # str | (optional)
x_user_global_id = "X-User-GlobalID_example" # str | (optional)try:
api_response = api_instance.cities_list(limit=limit, offset=offset, search=search, zip_code=zip_code, name=name, country_iso_code=country_iso_code, accept_language=accept_language, x_user_first_name=x_user_first_name, x_user_last_name=x_user_last_name, x_user_email=x_user_email, x_user_global_id=x_user_global_id)
pprint(api_response)
except osis_reference_sdk.ApiException as e:
print("Exception when calling CitiesApi->cities_list: %s\n" % e)
```## Documentation for API Endpoints
All URIs are relative to *https://dev.osis.uclouvain.be/api/v1/reference*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CitiesApi* | [**cities_list**](docs/CitiesApi.md#cities_list) | **GET** /cities/ |
*CountriesApi* | [**countries_list**](docs/CountriesApi.md#countries_list) | **GET** /countries/ |
*CountriesApi* | [**countries_read**](docs/CountriesApi.md#countries_read) | **GET** /countries/{uuid} |
*LanguagesApi* | [**languages_list**](docs/LanguagesApi.md#languages_list) | **GET** /languages |
*StudyDomainsApi* | [**study_domains_list**](docs/StudyDomainsApi.md#study_domains_list) | **GET** /study-domains |## Documentation For Models
- [AcceptedLanguageEnum](docs/AcceptedLanguageEnum.md)
- [ArrayOfCity](docs/ArrayOfCity.md)
- [ArrayOfCountry](docs/ArrayOfCountry.md)
- [ArrayOfLanguages](docs/ArrayOfLanguages.md)
- [ArrayOfStudyDomain](docs/ArrayOfStudyDomain.md)
- [City](docs/City.md)
- [Country](docs/Country.md)
- [Error](docs/Error.md)
- [Language](docs/Language.md)
- [StudyDomain](docs/StudyDomain.md)## Documentation For Authorization
## Token
- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header## Author
## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in osis_reference_sdk.apis and osis_reference_sdk.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 osis_reference_sdk.api.default_api import DefaultApi`
- `from osis_reference_sdk.model.pet import Pet`Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import osis_reference_sdk
from osis_reference_sdk.apis import *
from osis_reference_sdk.models import *
```