A set of API endpoints that allow you to get information about learning unit
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.08
- Package version: 1.8.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python >= 3.5
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_learning_unit_sdk
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_learning_unit_sdk
Please follow the installation procedure and then run the following:
import time
import osis_learning_unit_sdk
from pprint import pprint
from osis_learning_unit_sdk.api import learning_units_api
from osis_learning_unit_sdk.model.accepted_language_enum import AcceptedLanguageEnum
from osis_learning_unit_sdk.model.education_group_root import EducationGroupRoot
from osis_learning_unit_sdk.model.effective_class import EffectiveClass
from osis_learning_unit_sdk.model.error import Error
from osis_learning_unit_sdk.model.inline_response200 import InlineResponse200
from osis_learning_unit_sdk.model.learning_unit_achievement import LearningUnitAchievement
from osis_learning_unit_sdk.model.learning_unit_attribution import LearningUnitAttribution
from osis_learning_unit_sdk.model.learning_unit_prerequisite import LearningUnitPrerequisite
from osis_learning_unit_sdk.model.learning_unit_summary_specification import LearningUnitSummarySpecification
from osis_learning_unit_sdk.model.learning_unit_teaching_material import LearningUnitTeachingMaterial
# Defining the host is optional and defaults to https://dev.osis.uclouvain.be/api/v1/learning_unit
# See configuration.py for a list of all supported configuration parameters.
configuration = osis_learning_unit_sdk.Configuration(
host = "https://dev.osis.uclouvain.be/api/v1/learning_unit"
)
# 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_learning_unit_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = learning_units_api.LearningUnitsApi(api_client)
year = 1 # int |
acronym = "acronym_example" # str |
lang = "lang_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.get_learning_unit_classes(year, acronym, lang=lang, 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_learning_unit_sdk.ApiException as e:
print("Exception when calling LearningUnitsApi->get_learning_unit_classes: %s\n" % e)
All URIs are relative to https://dev.osis.uclouvain.be/api/v1/learning_unit
Class | Method | HTTP request | Description |
---|---|---|---|
LearningUnitsApi | get_learning_unit_classes | GET /learning_units/{year}/{acronym}/classes | |
LearningUnitsApi | learningunitachievements_read | GET /learning_units/{year}/{acronym}/achievements | |
LearningUnitsApi | learningunitattributions_read | GET /learning_units/{year}/{acronym}/attributions | |
LearningUnitsApi | learningunitprerequisites_read | GET /learning_units/{year}/{acronym}/prerequisites | |
LearningUnitsApi | learningunits_list | GET /learning_units | |
LearningUnitsApi | learningunits_read | GET /learning_units/{year}/{acronym} | |
LearningUnitsApi | learningunitstitle_read | GET /learning_units/{year}/{acronym}/title | |
LearningUnitsApi | learningunitsummaryspecification_read | GET /learning_units/{year}/{acronym}/summary_specification | |
LearningUnitsApi | learningunitteachingmaterials_read | GET /learning_units/{year}/{acronym}/teaching_materials | |
LearningUnitsApi | learningunitutilization_read | GET /learning_units/{year}/{acronym}/education_group_roots |
- AcceptedLanguageEnum
- AttributionFunctionEnum
- ComponentTypeEnum
- DecreeCategoryEnum
- DurationUnitEnum
- EducationGroupRoot
- EducationGroupTypeEnum
- EffectiveClass
- Error
- ExternalLearningUnit
- ExternalLearningUnitAllOf
- InlineResponse200
- LearningUnit
- LearningUnitAchievement
- LearningUnitAttribution
- LearningUnitAttributionSubstitute
- LearningUnitCampus
- LearningUnitComponent
- LearningUnitDetailed
- LearningUnitDetailedAllOf
- LearningUnitDetailedAllOfProposal
- LearningUnitPrerequisite
- LearningUnitSubtypeEnum
- LearningUnitSummarySpecification
- LearningUnitTeachingMaterial
- LearningUnitTypeEnum
- Pagination
- PeriodicityEnum
- QuadrimesterEnum
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
If the OpenAPI document is large, imports in osis_learning_unit_sdk.apis and osis_learning_unit_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_learning_unit_sdk.api.default_api import DefaultApi
from osis_learning_unit_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_learning_unit_sdk
from osis_learning_unit_sdk.apis import *
from osis_learning_unit_sdk.models import *