Skip to content

uclouvain/osis-dissertation-sdk

Repository files navigation

osis-dissertation-sdk

A set of API endpoints that allow you to get information about dissertation

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

  • API version: 1.00
  • Package version: 1.00
  • 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 osis_dissertation_sdk

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 osis_dissertation_sdk

Getting Started

Please follow the installation procedure and then run the following:

import time
import osis_dissertation_sdk
from pprint import pprint
from osis_dissertation_sdk.api import proposition_dissertation_api
from osis_dissertation_sdk.model.accepted_language_enum import AcceptedLanguageEnum
from osis_dissertation_sdk.model.error import Error
from osis_dissertation_sdk.model.proposition_dissertation_detail import PropositionDissertationDetail
# Defining the host is optional and defaults to https://dev.osis.uclouvain.be/api/v1/dissertation
# See configuration.py for a list of all supported configuration parameters.
configuration = osis_dissertation_sdk.Configuration(
    host = "https://dev.osis.uclouvain.be/api/v1/dissertation"
)

# 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_dissertation_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = proposition_dissertation_api.PropositionDissertationApi(api_client)
    uuid = "uuid_example" # str | 
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)

    try:
        api_response = api_instance.proposition_detail(uuid, accept_language=accept_language)
        pprint(api_response)
    except osis_dissertation_sdk.ApiException as e:
        print("Exception when calling PropositionDissertationApi->proposition_detail: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://dev.osis.uclouvain.be/api/v1/dissertation

Class Method HTTP request Description
PropositionDissertationApi proposition_detail GET /propositions/{uuid}/
PropositionDissertationApi propositions_list GET /propositions

Documentation For Models

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_dissertation_sdk.apis and osis_dissertation_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_dissertation_sdk.api.default_api import DefaultApi
  • from osis_dissertation_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_dissertation_sdk
from osis_dissertation_sdk.apis import *
from osis_dissertation_sdk.models import *

About

SDK package for dissertation api communication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published