Skip to main content

Logo


An API for ISEN-OUEST


⚠️ Unofficial !!

pypi version python version license

Description

A python API wrapper for ISEN-OUEST, with webAurion information like calendar, grades, absences...

Dependencies

  • requests
  • bs4
  • lxml

Usage

  • pip3 install ISENpy -U

Here is an example script:

import ISENpy

# Create a new instance of the ISENpy class
client = ISENpy.Client(
                        username="<username>", 
                        password="<password>",
                    )

#Check if the user is logged in
if not client.logged_in:
    print("Identifiant ou mot de passe incorect !!")
    exit()


my_class_name = client.getMyClass()
print(my_class_name) 

Example for get your grades

...


grades = client.grades()

print(grades.average)
for grade in grades.data:
    print(f"{grade.date} : {grade.grade} ({grade.name} | {grade.instructors}), {grade.appreciation}, {grade.absence}")

# Or more simply

# print(grades)
# print(grades["data"][0]["date"]) # ... (use like a dict)

Example for get your absences

...


absences = client.absences()

print(absences.nbAbsences)
print(absences.time)
for absence in absences.data:
    print(f" \
            {absence.date} : {absence.reason} \
            ({absence.duration} | {absence.schedule} | {absence.course} | \
            {absence.instructor} | {absence.subject}) \
        ")
  
# Or more simply

# print(absences)
# print(absences["data"][0]["date"]) # ... (use like a dict)

Example for get your planning

...

planning = client.planning()

for event in planning.data:
    print(f" \
            {event.subject} ({event.start} | {event.end} , \
            {event.start_time} | {event.end_time},  {event.instructor} | {event.room}), \
            {event.type}, {event.class_name}, {event.description}, {event.class_info} \
        ")
  
# Or more simply

# print(planning)
# print(planning["data"][0]["subject"]) # ... (use like a dict)

Example for get your school report

...

schoolReport = client.getSchoolReport()

print(schoolReport.nbReports)
for report in schoolReport.data:
    print(f"{report.name} : {report.id}")

# Or more simply

# print(schoolReport)
# print(schoolReport["data"][0]["name"]) # ... (use like a dict)

And for download your school report

...


client.downloadReport() #Download all your school report with the default name

# if you want only one report

# webAurion.downloadReport(idReport="report_id") 
# Download the report with the id "report_id" with the default name (you have the id with the schoolReport object Ex. schoolReport = webAurion.getSchoolReport() ) 

Other example if you want to get your planning in the calendar of your computer

  • This script uses the 'ics' and 'datetime' modules
  • pip3 install ics datetime
import ISENpy
from ics import Calendar, Event
from datetime import datetime


client = ISENpy.Client(
                        username="<username>", 
                        password="<password>",
                    )

if not client.logged_in:
    print("Identifiant ou mot de passe incorect !!")
    exit()

planning = client.planning() #Get your planning of the week. Argument(Optional) : 'start_date' (format : "dd-mm-yyyy") and 'end_date' (format : "dd-mm-yyyy")

c = Calendar()

for event in planning.data:
    e = Event()
    e.name = event.subject + " - " + event.type
    e.description = event.description + " - intervenants: " + event.instructors + " - classe: " + event.class_info
    e.location = event.room
    e.begin = datetime.fromisoformat(event.start[:-2] + ':00')
    e.end = datetime.fromisoformat(event.end[:-2] + ':00')
    c.events.add(e)

with open('week.ics', 'w') as my_file:
    my_file.writelines(c.serialize_iter())
  • And now double click on the new 'week.ics' file

LICENSE

Copyright (c) 2022-2024 CorentinMre

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for ISENpy 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ISENpy 0.7.0
File Size Uploaded
ISENpy-0.7.0.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ISENpy 0.7.0
File Interpreter ABI Platform
ISENpy-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.2 kB

Release files / ISENpy-0.7.0.tar.gz

Download URL ISENpy-0.7.0.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b725453a894acdb075f3f28424a90ef0ba19ec822f84eade6536fd5c939e2aea
BLAKE2b-256 checksum
How to use checksums
1b50c64fca91208d2e9ae86a4f1895519b9a630876070c2c419e34e1cf4057d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / ISENpy-0.7.0-py3-none-any.whl

Download URL ISENpy-0.7.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21e64781ee5115838166c4f34b0fb38a18d49ee3b23c4b2dd81f63bc2e360faf
BLAKE2b-256 checksum
How to use checksums
4b7be7a9f9552937fc08b85184d6a049b079823d42a34bee801783587e2cb52f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page