FenixEdu / fenixedu-python-sdk

8 stars 6 forks source link

fenix_python_sdk

Installation

pip install fenixedu

Usage

Instantiating the client

import fenixedu

Instantiating a configuration object

Using a configuration file

cp fenixedu.sample.ini FILENAME

config = fenixedu.FenixEduConfiguration.fromConfigFile('FILENAME')

Without a configuration file

config = fenixedu.FenixEduConfiguration('CLIENT_ID, 'REDIRECT_URI', 'CLIENT_SECRET', 'BASE_URL')

Instantiating the client

client = fenixedu.FenixEduClient(config)

Authentication

url = client.get_authentication_url()

redirect_uri?code=CODE

user = client.get_user_by_code(CODE)

person = client.get_person(user)

Examples of usage

Get degrees

degrees = client.get_degrees()

Get spaces

spaces = client.get_spaces()

Get information about the user

person = client.get_person(user)

Get user's classes calendar

classes = client.get_person_calendar_classes(user)

Get user's payments

payments = client.get_person_payments(user)

Full endpoint list

Public methods

Private methods (You need to get an access token before calling one of these methods)

More info about all available endpoints in FenixEdu API website