Skip to main content

An API ent.iledefrance.fr

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

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

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monlycee-1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monlycee-1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file monlycee-1.0.tar.gz.

File metadata

  • Download URL: monlycee-1.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for monlycee-1.0.tar.gz
Algorithm Hash digest
SHA256 86bf4beb0e3e3f3716ff5dad18dde70f75586cb062822533f0cd63ce87c2bf85
MD5 28dc2907e4c544ccacc56a54629206bf
BLAKE2b-256 50e0e3a135a7c3195128c139a5b86a35de23c5d147fe87777db10720a6cc63ef

See more details on using hashes here.

File details

Details for the file monlycee-1.0-py3-none-any.whl.

File metadata

  • Download URL: monlycee-1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for monlycee-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 257cb46b1123f32e6bb97bdc33a07b7562e31602fbce9e3df065ffea0373ef51
MD5 2b6d7603f9991877053a04e10146832b
BLAKE2b-256 3bc3b41deee0447826f4536d1d2c99f85cfce6c23855a48932e42a6d7d152a03

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page