Metadata-Version: 2.4
Name: e-kreta-hun0r
Version: 2.0.1
Summary: E-Kréta API wrapper
Project-URL: Homepage, https://github.com/hun0r/e-kreta-hun0r-2.0
Project-URL: Issues, https://github.com/hun0r/e-kreta-hun0r-2.0/issues
Author-email: hun0r <kiskukac1024@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# e-kreta-hunor-2.0

e-kreta-hunor-2.0 is an api wrapper for the e-kreta system

## installation

for now download the repo and install requirements.txt

```bash
py -m pip install -r requirements.txt
```

later i plan to add it on pypi

## Usage

```python
import os

from src.kreta.mobile import endpoints, models
from src.kreta.idp import Auth_Session

username = os.getenv("username")
pwd = os.getenv("pwd")
institiute_code = os.getenv("institute_code")

with Auth_Session.login(username, pwd, institiute_code) as session:
    response = endpoints.get_notes(session)
    print(response)

    session.refresh() # it's automatically done when needed
  
    response = endpoints.get_device_state(session)
    print(response)
  
    session.invalidate() # invalidates the refresh token so remove if login is saved


```

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

tests would be appreaciated

## License

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