Metadata-Version: 2.4
Name: tickr-client
Version: 0.1.0
Summary: Python client for the Tickr API (counters service)
Author-email: DavidMChan <david@iridescent.io>
Maintainer-email: DavidMChan <david@iridescent.io>
License: Copyright 2025 David Chan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://tickr.cc
Project-URL: Repository, https://github.com/DavidMChan/tickr-client
Project-URL: Issues, https://github.com/DavidMChan/tickr-client/issues
Keywords: api,client,tickr,counters,supabase
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.1
Dynamic: license-file

# 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

```bash
pip install -e .
```

## Usage

```python
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
