Skip to main content

High level API pro interakci s webovou aplikaci Strava.cz

Project description

Strava.cz Python API

High level API pro interakci s webovou aplikaci Strava.cz udelane v Pythonu ciste pomoci request knihovny.

Ve slozce notes muzete najit veskere moje poznatky, ktere jsem zjistil o internim fungovani aplikace Strava.cz.

Features

  • Prihlaseni/odhlaseni
  • Vypsani prefiltrovaneho jidelnicku
  • Objednavani jidel podle ID jidla

Usage

pip install strava-cz
from strava_cz import StravaCZ

# Vytvoreni objektu strava a prihlaseni uzivatele
strava = StravaCZ(
    username="your.username", 
    password="YourPassword123", 
    canteen_number="your canteen number"
    )

# Vypsani informaci o uzivateli
print(strava.user)

# Ziskani jidelnicku; ulozi list do strava.menu
print(strava.get_menu())

# Zjisti, jestli je jidlo s meal_id 4 objednano (True/False)
print(strava.is_ordered(4))

# Objedna jidla s meal_id 3 a 6
strava.order_meals(3, 6)

# Odhlasi uzivatele
strava.logout()

meal_id je unikatni identifikacni cislo jidla v celem jidelnicku. neni ovsem stale vazane na konkretni jidlo a meni se se zmenami jidelnicku

funkce parametry return type popis
__init__() (=StravaCZ()) username=None, password=None, canteen_number=None None Inicializuje objekt StravaCZ a automaticky prihlasi uzivatele, pokud jsou vyplnene parametry username a password
login() username (str), password (str), canteen_number=None (str) User Prihlasi uzivatele pomoci uzivatelskeho jmena a hesla; pokud neni vyplnene cislo jidelny, automaticky pouzije 3753
get_menu() None list Vrati jidelnicek jako seznam podle dni; zaroven ho ulozi do promenne menu
is_ordered() meal_id (int) bool Zjisti, jestli je dane jidlo objednano
order_meals() *meal_ids (int) None Objedna vice jidel podle meal_id
logout() None bool Odhlasi uzivatele

to-do

  • Nahrat jako knihovnu na PyPi
  • Lepe zorganizovat kod
  • Univerzalni datum
  • Moznost detailni filtrace jidelnicku
  • Lepe zdokumentovat pouziti

Co bude dal?

Planuji udelat aplikaci, ktera bude uzivateli automaticky objednavat obedy podle jeho preferenci.

Prosim, nepouzivejte tuto aplikaci k nekalym ucelum. Pouzivejte ji pouze s dobrymi zamery.

Pomoz mi pls

Nasel jsi chybu nebo mas navrh na zlepseni? Skvele! Vytvor prosim bug report nebo feature request, hodne mi tim muzes pomoct.

Udelal jsi sam nejake zlepseni? Jeste lepsi! Kazdy pull request je vitan.

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

strava_cz-0.1.2.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

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

strava_cz-0.1.2-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file strava_cz-0.1.2.tar.gz.

File metadata

  • Download URL: strava_cz-0.1.2.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for strava_cz-0.1.2.tar.gz
Algorithm Hash digest
SHA256 54bdbc00583f22c3367a5c5d5ce5af420b6f252f2966721bd3640b28d54137c3
MD5 c4593387a6f0d2a811bf64381649ed8b
BLAKE2b-256 bf9c5ed6b1fc2cf9e8933c7643dbc3671155a417fd205c68203019daa49f2bd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for strava_cz-0.1.2.tar.gz:

Publisher: publish.yml on jsem-nerad/strava-cz-python

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

File details

Details for the file strava_cz-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: strava_cz-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for strava_cz-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a36596b7366efe60aed0f1d50a2ec0d4c151f7b9fa5fbae34b6807a9db241744
MD5 4438fd1ed07222732cc1fec098a22b08
BLAKE2b-256 644e16a44eab5f0dc12f378ff49e7bd6c6fff2b12e26ee5673f9c2eceb372ca3

See more details on using hashes here.

Provenance

The following attestation bundles were made for strava_cz-0.1.2-py3-none-any.whl:

Publisher: publish.yml on jsem-nerad/strava-cz-python

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