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.11.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.11-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: e_kreta_hun0r-2.0.11.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.11.tar.gz
Algorithm Hash digest
SHA256 c6e352718e39a0dabc59f25b04a6999dde672df46d7101390598f0a03a8540d9
MD5 caf1fd850683c38f4953e644c8ca5ed3
BLAKE2b-256 4960df4caa132e1eb42b71138f5b17074cb2dd990375e81e3d4406b65b7dd008

See more details on using hashes here.

Provenance

The following attestation bundles were made for e_kreta_hun0r-2.0.11.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.11-py3-none-any.whl.

File metadata

  • Download URL: e_kreta_hun0r-2.0.11-py3-none-any.whl
  • Upload date:
  • Size: 20.5 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 d54e762249d1e0052f42ccf8dd9b43feb69baac60a2ca2b417aa917d02860d32
MD5 2bbf12c77802d668a55f0d4457dac222
BLAKE2b-256 797d34c30034fb4f285d7b06b5158288d80442381c2154d2674ce4f0d223f9c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for e_kreta_hun0r-2.0.11-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