Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

activity.py

Load running activities, output into a neat JSON format.

PyPI Changelog License

Installation

Install this library using pip:

pip install activity.py

Usage

Import Activity and use the load_fit and load_gpx function to load your activities. You can access attributes on the activity at that point, or alternatively use as_json to dump your activity as a JSON object.

from activity_py import Activity

activity = Activity.load_fit('fitfile.fit')
print(activity.duration, activity.distance, activity.pace)

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd activity.py
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Using pipenv, this looks like:

pipenv install .[test]
pipenv run pytest

Activity JSON

Documentation TBC.

Download files

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

Source Distribution

activity.py-0.1b1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

activity.py-0.1b1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file activity.py-0.1b1.tar.gz.

File metadata

  • Download URL: activity.py-0.1b1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for activity.py-0.1b1.tar.gz
Algorithm Hash digest
SHA256 a6bfba9668b070975e9d84f4d9459cca40b2536862173976239f5b630fed66fc
MD5 d80ef2ab0271a6bdaf6a0bef26fc32b6
BLAKE2b-256 ece38ff87936797db0bdd087e350cf413bae02bdcbd5b93734e2d6a9e7c7086b

See more details on using hashes here.

File details

Details for the file activity.py-0.1b1-py3-none-any.whl.

File metadata

  • Download URL: activity.py-0.1b1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for activity.py-0.1b1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5dc7fc1044f3d77fc6eccd2783255f9e4250c0f9d678886e003b3d59d7bffac
MD5 e68ec4edc334901f320bc5fb5f18ff4a
BLAKE2b-256 cd300acb4ae1f33c789307a9ffdd062b065a338a9373f0dabdaefb5bf0b8cfb9

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