semvec/pypi-packages huggingface dataset:
pupilpathapi 0.0.3
The one and only PupilPath website wrapper

# PupilPath API

The only and only PupilPath API.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install the api.

```bash
pip install pupilpathapi
```

## Basic Usage

```python
import pupilpathapi as PupilPath

from pupilpathapi.common.exceptions import PasswordIncorrectError

try:
    user = PupilPath.User({
        "Username" : "Username",
        "Password" : "Password"
    })
except PasswordIncorrectError:
    print("The password of this account may be incorrect")
else:
    print("Successfully logged on!")
```

```python
user.Name # Returns the full name on the account
user.Classes # Returns the number of classes assigned on the account

user.GetClassData() # Returns a dictionary containing multiple lists e.g {"Title": [], "Teacher": [], "Department": [], "Average": []}
user.GetGradeData() # Returns a dictionary containing the average and overall e.g {"Average" : 97, "Overall" : "honors"}

user.SaveGrades(directory) # Saves a screenshot of the grades in specified directory

user.SendEmail([recipents], {format}) # sends an email to all the users in a list. The format should must contain a subject and optional description. e.g {"Subject" : "Hey there!", "Content" : "Description here"} 
```

* Be prepared for many other cool things in upcoming versions!

# New feature is here! Emailing!

```python
from pupilpathapi.common.exceptions import FailedToSendEmailError

try:
    user.SendEmail(["bestfriend1@skedula.net", "bestfriend2@skedula.net"], { #only skedula.net emails (pupilpath emails)
        "Subject" : "Important Email!",

        "Content" : "Can you send me the homework from yesterday? Thank you!"
    })
except FailedToSendEmailError:
    print("There was an error when sending email!")
else:
    print("Successfully sent email!")
```

* In this updated I added exceptions and cleaned up some code. Stay tuned for new features coming very soon!

## Contributing To The Development
I want to see cool things you can do with this! To get in contact with me send me a DM on discord `Light.#0528`. It would mean the world to me!

## License
[MIT](https://choosealicense.com/licenses/mit/)