Skip to main content

E-Kréta API wrapper

Project description

e-kreta-hunor-2.0

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

installation

now available on PyPI

py -m pip install e-kreta-hun0r

Usage

quick example

import os

from kreta.mobile import endpoints, models
from 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

Reccomended to use with context maneger to properly close the connection.

Reccomended to use session.invalidate() if the refresh token wont be saved as it is required in the process to revoke it.

sessiion.refresh() refreshes the access token. Usually not required as it done automatically when needed.

Important is that for the institute_code parameter the second code of the school is needed. check your schools id here

login_code

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

Project details


Download files

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

Source Distribution

e_kreta_hun0r-2.0.10.tar.gz (44.7 kB view details)

Uploaded Source

Built Distribution

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

e_kreta_hun0r-2.0.10-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file e_kreta_hun0r-2.0.10.tar.gz.

File metadata

  • Download URL: e_kreta_hun0r-2.0.10.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for e_kreta_hun0r-2.0.10.tar.gz
Algorithm Hash digest
SHA256 626fd8b2c265f5670343ad3f9fe7fd27bf5d5ebc8c7a6e1733d749eb80c56635
MD5 041eaed933b63b1e71f7f65c2c67f7e3
BLAKE2b-256 07297ab33afe712ace79f4d524abfa124107761b70020af4e949d5c6761c20c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for e_kreta_hun0r-2.0.10.tar.gz:

Publisher: Publish.yml on hun0r/e-kreta-hun0r-2.0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file e_kreta_hun0r-2.0.10-py3-none-any.whl.

File metadata

  • Download URL: e_kreta_hun0r-2.0.10-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for e_kreta_hun0r-2.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6031056c507693a49abd6470ee27dcf6417da8bfa71b6d76abec0f273095d0ae
MD5 a89d53c29f6f8cc7ce4351cf290e824d
BLAKE2b-256 aad94e7150ecc1613e76001637055cfcd8bbc69bfbe8c967548464889d1724db

See more details on using hashes here.

Provenance

The following attestation bundles were made for e_kreta_hun0r-2.0.10-py3-none-any.whl:

Publisher: Publish.yml on hun0r/e-kreta-hun0r-2.0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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