Skip to main content

Python client for Bosch eBike Connect.

Project description

ebike-connect

Python library to get rides and trips from the Bosch eBike Connect platform.

GitHub Workflow Status PyPI PyPI - License PyPI - Downloads

Installation

The package is available on PyPI. Installation can be done with your favourite package manager. For example:

pip install ebike-connect

Usage

Initialize a client with your username and password:

from ebikeconnect.client import EBikeConnectClient


client = EBikeConnectClient.login("username", "password")

The eBike Connect api provides rides and trips, where a ride is a single uninterrupted ride, and a trip is a collection of rides (all rides on a single day?).

Rides and trips can be listed with the following methods:

def find_rides(
    self, from_datetime: datetime | None = None, to_datetime: datetime | None = None
) -> Iterable[EBikeConnectRide]

This returns an iterable of EBikeConnectRide dataclasses, which have the following fields:

    id: str
    start_time: datetime
    end_time: datetime
    driving_time: timedelta
    type: str
    status: int
    total_distance: float
    title: str
    calories: float
    avg_speed: float
    max_speed: float
def find_trips(
    self, from_datetime: datetime | None = None, to_datetime: datetime | None = None
) -> Iterable[EBikeConnectTrip]:

This returns an iterable of EBikeConnectTrip dataclasses, which have the following fields:

    id: str
    start_time: datetime
    end_time: datetime
    driving_time: timedelta
    type: str
    status: int
    total_distance: float
    ride_ids: list[str]

In addition, ride details (with many additional fields) can be obtained by calling:

def get_ride(self, id: str) -> EBikeConnectRideDetails

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

ebike_connect-0.0.3.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

ebike_connect-0.0.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file ebike_connect-0.0.3.tar.gz.

File metadata

  • Download URL: ebike_connect-0.0.3.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ebike_connect-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b842f87fb6cd5d98c61648299ef8a62db21e8ff0f717f65addd4d31485ea9850
MD5 579d8dac17b6ccf47231fbb19ff90ea9
BLAKE2b-256 cdf8d3281dd4aea0e767b805ea385ad9010e14aee7249149eb586dac62fba8da

See more details on using hashes here.

File details

Details for the file ebike_connect-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: ebike_connect-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ebike_connect-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 33fe3f25ffe05ae3023c4c706ae1deb6528863e3393dbc22094de756c45b6352
MD5 c02f3e768b8e7da50595df1f805b1763
BLAKE2b-256 a4027e18fe4fa40a99f3aa8ca5ae58b4d64cd9a03ec8602ab7b83e5b1ec1938b

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