Skip to main content

null

Project description

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.

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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page