Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
monlycee-net-api
An API wrapper for ent.iledefrance.fr
Example usage
Initialisation
>>> import ent
>>>>
>>> client = ent.ENT('username', 'password')
# ----- Mails app ----- #
# Get amount of unread messages
>>> count = client.mail.unread_amount
# Get folders
>>> folders = client.mail.get_folders()
# Get mails
>>> mails = client.mail.get_mails(limit = 10)
# OR
>>> folders[...].get_mails(limit = 10)
# Get mail data
>>> mail = mails[0]
>>> mail.date
>>> mail.attachments
>>> mail.unread
>>> mail.user.sender
>>> mail.user.to # etc.
# Reply to a mail
>>> from ent.apps.mails import PreparedMail
>>> reply = PreparedMail.new(subject = 'Re: Subject',
content = 'Hello, world!')
>>> mail.reply(reply)
# Transfer a mail
>>> from ent.apps.base import User
>>> mail.transfer(User.from_id(...))
# Send a normal mail
>>> mail = PreparedMail.new(subject = 'Subject',
content = 'Hello, world!')
>>> client.mail.send(mail)
# ----- Rack app ----- #
# Get the user rack
>>> rack = client.rack.get_rack()
# Get rack data/file
>>> rack[0].sender
>>> rack[1].receiver
>>> rack[2].file.size
>>> rack[3].file.download()
# Get repo storage usage
>>> storage = client.rack.storage
>>> storage.used
>>> storage.limit
>>> storage.usage # in percentage
# Deposit a file to someone's rack
>>> client.rack.deposit(User.from_id(...), 'path/to/file.ext')
# ----- Userbase app ----- #
# Search for users
>>> client.userbase.search_users(query = '...')
# Search for groups
>>> client.userbase.search_groups(schools = [...])
# ----- Exercises app ----- #
# Get all exercises
>>> exs = client.exercises.get()
# Get exercise data
>>> e = exs[0]
>>> e.owner
>>> e.date.created
>>> e.date.modified
>>> e.date.submited
>>> e.result.score
>>> e.result.comment
>>> e.corrected
>>> e.archived # etc.
TODO
More apps
Metadata
Release files for monlycee 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| monlycee-1.0.tar.gz | 16.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| monlycee-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.7 kB
Release files / monlycee-1.0.tar.gz
| Download URL | monlycee-1.0.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86bf4beb0e3e3f3716ff5dad18dde70f75586cb062822533f0cd63ce87c2bf85
|
|
BLAKE2b-256 checksum How to use checksums |
50e0e3a135a7c3195128c139a5b86a35de23c5d147fe87777db10720a6cc63ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / monlycee-1.0-py3-none-any.whl
| Download URL | monlycee-1.0-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
257cb46b1123f32e6bb97bdc33a07b7562e31602fbce9e3df065ffea0373ef51
|
|
BLAKE2b-256 checksum How to use checksums |
3bc3b41deee0447826f4536d1d2c99f85cfce6c23855a48932e42a6d7d152a03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|