Skip to main content

Python client for the Tickr API (counters service)

Project description

Tickr Python Client

A Python client library for interacting with the Tickr API (counters service).

Features

  • Fetch all your counters (requires authentication)
  • Create a new counter (requires authentication)
  • Fetch a public counter by slug
  • Increment a counter (public or private, depending on API config)
  • Update a counter (requires authentication and ownership)
  • Delete a counter (requires authentication and ownership)

Installation

pip install -e .

Usage

from tickr_client import TickrClient

# Create a client instance (JWT is optional, for authenticated endpoints)
# You can get your API JWT from the Tickr API docs page: https://tickr.cc/api-docs
client = TickrClient(jwt="YOUR_API_JWT")

# Fetch all counters (authenticated)
counters = client.get_counters()

# Create a new counter (authenticated)
new_counter = client.create_counter(name="My Counter", initial_value=10)

# Fetch a public counter by slug
public_counter = client.get_counter(slug="abc123xyz")

# Increment a counter (public or private)
updated_counter = client.increment_counter(slug="abc123xyz", increment_by=2)

# Update a counter (authenticated, owner only)
updated = client.update_counter(slug="abc123xyz", name="Renamed", current_value=42)

# Delete a counter (authenticated, owner only)
client.delete_counter(slug="abc123xyz")

Authentication

For authenticated endpoints, obtain a API JWT and pass it to the client. Public endpoints do not require authentication.

License

MIT

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

tickr_client-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

tickr_client-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file tickr_client-0.1.0.tar.gz.

File metadata

  • Download URL: tickr_client-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for tickr_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 07785c729ccc8264bd8de28e147c5a9b00af485e3aceb25888a1d4dea884e472
MD5 9278eca8977bf3e1404176178336d611
BLAKE2b-256 bb961533fb231c8221e13dee3d056b6a7a5d8cda14f5ed66fbdbd8f87cc2abfc

See more details on using hashes here.

File details

Details for the file tickr_client-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tickr_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for tickr_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c761d00d89f7fca129a2f91f9c242cde5825d2e4ef3a9c8c12b35af0d4d727f
MD5 0584674cbf198ff569cf62c6edc8902a
BLAKE2b-256 930826e80f79a1ebd8e80d6e4f78ae37bed12dc12908ff252d2ba2bc503bc3c0

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