Skip to main content

A weather app for SRF

Project description

SRF Weather

Wrapper around the SRF freemium API (https://developer.srgssr.ch/api-catalog/srf-weather/srf-weather-description) For api definition see also https://developer.srgssr.ch/api-catalog/srf-weather

Installation

pip install srf-weather

Development

In order to develop this package, you need to install the following tools:

poetry is used to manage the dependencies and to build the package. tox is used to run automated tests.

Build

poetry build

Test

Tox is used to run automated tests. Tox is configured to run tests for python 3.8 and 3.10 To run tests, install tox and run tox in the root directory of the project. In order to run the tests, the following environment variables must be set in the poetry environment:

  • SRF_WEATHER_API_KEY: The api key to use for the tests
  • SRF_WEATHER_API_SECRET: The api secret to use for the tests
pip install tox
export SRF_WEATHER_API_KEY=<api_key>
export SRF_WEATHER_API_SECRET=<api_secret>
tox

Publish

To publish the package, you need to have an account on pypi.org. You also need to have a token for the account. To create a token, go to the account settings and create a new token.

The token must be stored in the poetry config. To do so, run the following command:

poetry config pypi-token.pypi <token>
poetry publish

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

srf_weather-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

srf_weather-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file srf_weather-0.1.0.tar.gz.

File metadata

  • Download URL: srf_weather-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.14.0-1048-oem

File hashes

Hashes for srf_weather-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08d484387029a1920857080103d3d4ce0ddb947064ab36007ed253af952bf774
MD5 9e64c20f3f132c65f5d6f7eb000c44fe
BLAKE2b-256 26aa249fe4514653aef5e930035388325b836790f606634861b7517549d3e7be

See more details on using hashes here.

File details

Details for the file srf_weather-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: srf_weather-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.14.0-1048-oem

File hashes

Hashes for srf_weather-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3576ea972bfc62dd90851af554a34dd7dfd9f2bbc9e829fe44c045becb2f7b33
MD5 a39fc235dc9a54ad0b7d70e3fe2ffbaf
BLAKE2b-256 9e92156cc07d747aa77349391d36b64652affbc6821a8f984e1764d6d5062fb1

See more details on using hashes here.

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