Intervals.icu API
Project description
python-intervals-icu-client
A Python client library for the Intervals.icu API.
NOTE: This client is in early development and not published to PyPI yet. You can install it directly from the GitHub repository as described below. Most functionality should work, but most of the endpoints have not been tested yet. Check
tests/functionalandtests/integrationfor examples of usage.
Requirements.
Python 3.9+
Installation & Usage
pip install
Install directly from the GitHub repository using pip:
pip install git+https://github.com/LeonardHd/python-intervals-icu-client.git
Then import the package:
import intervals_icu_client
Example usage
Please follow the installation procedure and then run the following:
import intervals_icu_client
from intervals_icu_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://intervals.icu
# See configuration.py for a list of all supported configuration parameters.
configuration = intervals_icu_client.Configuration(
host = "https://intervals.icu"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: APIKey
configuration = intervals_icu_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization: AccessToken
configuration = intervals_icu_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with intervals_icu_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = intervals_icu_client.ActivitiesApi(api_client)
id = 'id_example' # str |
activity = intervals_icu_client.Activity() # Activity |
try:
# Create a manual activity
api_response = api_instance.create_manual_activity(id, activity)
print("The response of ActivitiesApi->create_manual_activity:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ActivitiesApi->create_manual_activity: %s\n" % e)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file intervals_icu_client-0.0.1.tar.gz.
File metadata
- Download URL: intervals_icu_client-0.0.1.tar.gz
- Upload date:
- Size: 176.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e09bcea531af336fb8707858588b5bd55f8f907390e1a6e7377a5cb514882f02
|
|
| MD5 |
a7e9b77361e86ebc7dcbefe65a03002a
|
|
| BLAKE2b-256 |
549c3ded84ba82f6977638e3bb69076646d8ec3aa15274f17fd2b9a4211524e2
|
Provenance
The following attestation bundles were made for intervals_icu_client-0.0.1.tar.gz:
Publisher:
release.yml on LeonardHd/python-intervals-icu-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intervals_icu_client-0.0.1.tar.gz -
Subject digest:
e09bcea531af336fb8707858588b5bd55f8f907390e1a6e7377a5cb514882f02 - Sigstore transparency entry: 731609601
- Sigstore integration time:
-
Permalink:
LeonardHd/python-intervals-icu-client@f336e17962af6e452834ce669a9020c076d987f9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/LeonardHd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f336e17962af6e452834ce669a9020c076d987f9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file intervals_icu_client-0.0.1-py3-none-any.whl.
File metadata
- Download URL: intervals_icu_client-0.0.1-py3-none-any.whl
- Upload date:
- Size: 285.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c949856aa062d7a09d3466adeb66089bc3ed620b7b03e740d3729c78e8780b6f
|
|
| MD5 |
b5c1bff0bc101660b724d8834b788aec
|
|
| BLAKE2b-256 |
109816a6ae6430183d039c58be6218b72dab8e3939a9c3ce333d1563cc164bb5
|
Provenance
The following attestation bundles were made for intervals_icu_client-0.0.1-py3-none-any.whl:
Publisher:
release.yml on LeonardHd/python-intervals-icu-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intervals_icu_client-0.0.1-py3-none-any.whl -
Subject digest:
c949856aa062d7a09d3466adeb66089bc3ed620b7b03e740d3729c78e8780b6f - Sigstore transparency entry: 731609606
- Sigstore integration time:
-
Permalink:
LeonardHd/python-intervals-icu-client@f336e17962af6e452834ce669a9020c076d987f9 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/LeonardHd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f336e17962af6e452834ce669a9020c076d987f9 -
Trigger Event:
push
-
Statement type: