Skip to main content

Python library for using the Trackbear app API https://help.trackbear.app/api

Project description

Python 3.10 | 3.11 | 3.12 | 3.13 | 3.14 Code style: black Nox

pre-commit.ci status Python tests

trackbear-api


Deveploment in progress

Python library for using the Trackbear app API https://help.trackbear.app/api

Installation

tbd

Example use

Defining a client

The client allows you to communicate with TrackBear's API. It requires your API token and allows you to define a custom User-Agent header if desired.

See the .env.example file for which environment variables are supported.

from trackbear_api import TrackBearClient

# If TRACKBEAR_API_TOKEN is set in the environment
client = TrackBearClient()

# To provide the API token directly
client = TrackBearClient(api_token="provide your token directly")

# Default User-Agent header can be replaced directly or through the environment
client = TrackBearClient(user_agent="My Custom App/1.0 (https://...)")

# GET a list of projects: https://help.trackbear.app/api/Projects_list
# POST, PATCH, DELETE are also available with the same behaviors
response = client.get("projects")

if not response.success:
    raise ValueError(f"Error: {response.code}: {response.message}")

for project in response.data:
    print(project["title"])

Logging

All loggers use the name trackbear-api. No handlers are defined by default in this library.

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

trackbear_api-0.0.1.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

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

trackbear_api-0.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file trackbear_api-0.0.1.tar.gz.

File metadata

  • Download URL: trackbear_api-0.0.1.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for trackbear_api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 39ff2f06ddac42ca989a637e0072b64bc94fd55bd206ae2648c2590ca6bb7d8b
MD5 515200b802e5549d964586acc84e282c
BLAKE2b-256 b55f02d232bb08b16365755d9bef58be5bb51fabee948ca30e998c88b0c0f96c

See more details on using hashes here.

Provenance

The following attestation bundles were made for trackbear_api-0.0.1.tar.gz:

Publisher: pypi-publish.yml on Preocts/trackbear-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trackbear_api-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: trackbear_api-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for trackbear_api-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ead318d706fa469edf04c90ddb7ff7662ff64ce884f3d6da3f8d6c42f0971c72
MD5 85bd46a4bcff4f4d7ba4733ad5fdef21
BLAKE2b-256 aff65c2ef4e006128a2ef44bfef0e9a1ba7ca39703fd080378448740f982a014

See more details on using hashes here.

Provenance

The following attestation bundles were made for trackbear_api-0.0.1-py3-none-any.whl:

Publisher: pypi-publish.yml on Preocts/trackbear-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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