Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions garmin_fit_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand All @@ -23,4 +23,4 @@
from garmin_fit_sdk.stream import Stream
from garmin_fit_sdk.util import FIT_EPOCH_S, convert_datetime_to_timestamp, convert_timestamp_to_datetime, BASE_TYPE_TO_FIELD_TYPE, FIELD_TYPE_TO_BASE_TYPE

__version__ = '21.208.0'
__version__ = '21.212.0'
30 changes: 30 additions & 0 deletions garmin_fit_sdk/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


from .accumulator import Accumulator as Accumulator
from .bitstream import BitStream as BitStream
from .crc_calculator import CrcCalculator as CrcCalculator
from .decoder import Decoder as Decoder
from .encoder import Encoder as Encoder
from .fit import BASE_TYPE as BASE_TYPE, BASE_TYPE_DEFINITIONS as BASE_TYPE_DEFINITIONS
from .hr_mesg_utils import expand_heart_rates as expand_heart_rates
from .profile import Profile as Profile
from .stream import Stream as Stream
from .util import (
FIT_EPOCH_S as FIT_EPOCH_S,
convert_datetime_to_timestamp as convert_datetime_to_timestamp,
convert_timestamp_to_datetime as convert_timestamp_to_datetime,
BASE_TYPE_TO_FIELD_TYPE as BASE_TYPE_TO_FIELD_TYPE,
FIELD_TYPE_TO_BASE_TYPE as FIELD_TYPE_TO_BASE_TYPE,
)

__version__: str
4 changes: 2 additions & 2 deletions garmin_fit_sdk/accumulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand Down
20 changes: 20 additions & 0 deletions garmin_fit_sdk/accumulator.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


class AccumulatedField:
def __init__(self, value: int = 0) -> None: ...
def accumulate(self, value: int, bits: int) -> int: ...

class Accumulator:
def __init__(self) -> None: ...
def createAccumulatedField(self, mesg_num: int, field_num: int, value: int) -> AccumulatedField: ...
def accumulate(self, mesg_num: int, field_num: int, value: int, bits: int) -> int: ...
4 changes: 2 additions & 2 deletions garmin_fit_sdk/bitstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand Down
21 changes: 21 additions & 0 deletions garmin_fit_sdk/bitstream.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


from typing import Any

class BitStream:
def __init__(self, data: Any, base_type: int) -> None: ...
def bits_available(self) -> int: ...
def has_bits_available(self) -> bool: ...
def reset(self) -> None: ...
def read_bit(self) -> int: ...
def read_bits(self, num_bits: int) -> int: ...
4 changes: 2 additions & 2 deletions garmin_fit_sdk/crc_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand Down
20 changes: 20 additions & 0 deletions garmin_fit_sdk/crc_calculator.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


from typing import Union

class CrcCalculator:
def __init__(self) -> None: ...
def get_crc(self) -> int: ...
def add_bytes(self, buffer: Union[bytes, bytearray], start: int, end: int) -> int: ...
@staticmethod
def calculate_crc(buffer: Union[bytes, bytearray], start: int, end: int) -> int: ...
4 changes: 2 additions & 2 deletions garmin_fit_sdk/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand Down
57 changes: 57 additions & 0 deletions garmin_fit_sdk/decoder.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


from enum import Enum
from typing import Any, Callable, Dict, List, Optional, Tuple

from .stream import Stream
from .mesgs import FitMessages

class DecodeMode(Enum):
NORMAL = 1
SKIP_HEADER = 2
DATA_ONLY = 3

MesgListener = Callable[[int, Dict[str, Any]], None]
MesgDefinitionListener = Callable[[Dict[str, Any]], None]
FieldDescriptionListener = Callable[[int, Dict[str, Any], Dict[str, Any]], None]

class FileHeader:
header_size: int
protocol_version: int
profile_version: int
data_size: int
data_type: List[bytes]
header_crc: int
file_total_size: int
def get_dict(self) -> Dict[str, Any]: ...

class Decoder:
def __init__(self, stream: Stream) -> None: ...
def is_fit(self) -> bool: ...
def check_integrity(self) -> bool: ...
def read(
self,
apply_scale_and_offset: bool = True,
convert_datetimes_to_dates: bool = True,
convert_types_to_strings: bool = True,
enable_crc_check: bool = True,
expand_sub_fields: bool = True,
expand_components: bool = True,
merge_heart_rates: bool = True,
mesg_listener: Optional[MesgListener] = None,
mesg_definition_listener: Optional[MesgDefinitionListener] = None,
field_description_listener: Optional[FieldDescriptionListener] = None,
decode_mode: DecodeMode = ...,
) -> Tuple[FitMessages, List[Exception]]: ...
def read_file_header(self, reset: bool, decode_mode: DecodeMode = ...) -> FileHeader: ...
def get_num_messages(self) -> int: ...
4 changes: 2 additions & 2 deletions garmin_fit_sdk/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand Down
32 changes: 32 additions & 0 deletions garmin_fit_sdk/encoder.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


from typing import Any, Dict, Optional, Union

from .mesgs import DeveloperDataIdMesg, FieldDescriptionMesg

FieldDescription = Dict[str, Union[DeveloperDataIdMesg, FieldDescriptionMesg]]

class Encoder:
def __init__(
self,
field_descriptions: Optional[Dict[int, FieldDescription]] = None,
) -> None: ...
def close(self) -> bytes: ...
def write_mesg(self, mesg: Dict[str, Any]) -> "Encoder": ...
def on_mesg(self, mesg_num: int, mesg: Dict[str, Any]) -> "Encoder": ...
def add_developer_field(
self,
key: int,
developer_data_id_mesg: DeveloperDataIdMesg,
field_description_mesg: FieldDescriptionMesg,
) -> "Encoder": ...
4 changes: 2 additions & 2 deletions garmin_fit_sdk/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand Down
40 changes: 40 additions & 0 deletions garmin_fit_sdk/fit.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


from typing import Any, Dict, List

BASE_TYPE: Dict[str, int]

BASE_TYPE_DEFINITIONS: Dict[int, Dict[str, Any]]

FIELD_TYPE_TO_BASE_TYPE: Dict[str, int]

BASE_TYPE_TO_FIELD_TYPE: Dict[int, str]

LOCAL_MESG_NUM_MASK: int
MESG_DEFINITION_MASK: int
DEV_DATA_MASK: int
ARCH_LITTLE_ENDIAN: int
MAX_FIELD_SIZE: int
FIELD_DEFAULT_SCALE: int
FIELD_DEFAULT_OFFSET: int
BASE_TYPE_MASK: int

NUMERIC_FIELD_TYPES: List[str]

def is_none(value: Any) -> bool: ...
def is_boolean(value: Any) -> bool: ...
def is_numeric(value: Any) -> bool: ...
def is_date(value: Any) -> bool: ...
def is_string(value: Any) -> bool: ...
def is_number_string_date_or_boolean(value: Any) -> bool: ...
def is_not_number_string_date_or_boolean(value: Any) -> bool: ...
4 changes: 2 additions & 2 deletions garmin_fit_sdk/hr_mesg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand Down
22 changes: 22 additions & 0 deletions garmin_fit_sdk/hr_mesg_utils.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


from typing import List

from .mesgs import HrMesg, RecordMesg

def merge_heart_rates(
hr_mesgs: List[HrMesg],
record_mesgs: List[RecordMesg],
) -> None: ...

def expand_heart_rates(hr_mesgs: List[HrMesg]) -> List[RecordMesg]: ...
4 changes: 2 additions & 2 deletions garmin_fit_sdk/mesg_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.208.0Release
# Tag = production/release/21.208.0-0-g5209d509
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


Expand Down
31 changes: 31 additions & 0 deletions garmin_fit_sdk/mesg_definition.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
###########################################################################################
# Copyright 2026 Garmin International, Inc.
# Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
# may not use this file except in compliance with the Flexible and Interoperable Data
# Transfer (FIT) Protocol License.
###########################################################################################
# ****WARNING**** This file is auto-generated! Do NOT edit this file.
# Profile Version = 21.212.0Release
# Tag = production/release/21.212.0-0-g0676a0e3
############################################################################################


from typing import Any, Dict, List, Optional

from .encoder import FieldDescription
from .output_stream import _OutputStream

class _MesgDefinition:
global_message_number: int
local_mesg_num: int
field_definitions: List[Dict[str, Any]]
developer_field_definitions: List[Dict[str, Any]]

def __init__(
self,
mesg_num: int,
mesg: Dict[str, Any],
field_descriptions: Optional[Dict[int, FieldDescription]] = None,
) -> None: ...
def write(self, output: _OutputStream) -> None: ...
def equals(self, other: "_MesgDefinition") -> bool: ...
Loading
Loading