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
print_menu() include_soup [bool], include_empty [bool] None Vypise zformatovane 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
  • Lepsi datum format
  • Moznost detailnejsi 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.3.tar.gz (22.2 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.3-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: strava_cz-0.1.3.tar.gz
  • Upload date:
  • Size: 22.2 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.3.tar.gz
Algorithm Hash digest
SHA256 58375824bced6c5c63465cfe5134f4264d61338f6ae06cf44f3a45f29875017a
MD5 3efe33713bdfda25b8534f2098794dbc
BLAKE2b-256 261f8bcdb28c539fbdec6d8e5279417ba41d67bca44089f7d75aa26d3e2b1625

See more details on using hashes here.

Provenance

The following attestation bundles were made for strava_cz-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: strava_cz-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 310b4f42ee2bcd5c537f03b7a30f2f7f1477d59cae808ab4ed2fce27ff7ebb0a
MD5 b78087739fd1c0afd3c4fb8590c2b629
BLAKE2b-256 d4833b58ccb78951eb9853111bc9e12771bccd3fef0a933f3974d63735d5924f

See more details on using hashes here.

Provenance

The following attestation bundles were made for strava_cz-0.1.3-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