Skip to main content

Unofficial Python SDK for the Tally.so API

Project description

pytally-sdk

PyPI version Python Versions License

Unofficial Python SDK for the Tally.so API.

Early Development: This SDK is currently in early development and does not yet cover the entire Tally API. We're actively working on adding more endpoints and features.

Installation

Install the package using pip:

pip install pytally-sdk

Or using uv:

uv add pytally-sdk

Quick Start

from tally import Tally

# Initialize the client with your API key
client = Tally(api_key="tly-your-api-key-here")

# Get current user information
user = client.users.me()
print(f"Hello, {user.full_name}!")
print(f"Email: {user.email}")
print(f"Plan: {user.subscription_plan.value}")

With Context Manager

from tally import Tally

with Tally(api_key="tly-your-api-key-here") as client:
    user = client.users.me()
    print(f"Organization ID: {user.organization_id}")

Features

Currently Implemented

  • Authentication: Bearer token authentication with API versioning support
  • Users Resource:
    • client.users.me() - Get current authenticated user information
  • Error Handling: Comprehensive exception handling for all HTTP error codes
  • Type Safety: Full type hints support for better IDE experience
  • Context Manager: Automatic resource cleanup

Coming Soon

  • Forms Resource: List, retrieve, and manage forms
  • Submissions Resource: Access and filter form submissions
  • Webhooks Resource: Manage webhooks and events
  • Organizations Resource: Manage organization users and invites
  • Workspaces Resource: List and manage workspaces

API Versioning

The Tally API uses date-based versioning. You can specify a specific API version when initializing the client:

from tally import Tally

client = Tally(
    api_key="tly-your-api-key-here",
    api_version="2025-02-01"  # Optional: specify API version
)

If not specified, the client will use the version tied to your API key.

Error Handling

The SDK provides specific exceptions for different API errors:

from tally import Tally, UnauthorizedError, RateLimitError, TallyAPIError

client = Tally(api_key="tly-your-api-key-here")

try:
    user = client.users.me()
except UnauthorizedError:
    print("Invalid API key!")
except RateLimitError:
    print("Rate limit exceeded. Please wait before retrying.")
except TallyAPIError as e:
    print(f"API error: {e.message} (status code: {e.status_code})")

Configuration

The client accepts the following configuration options:

from tally import Tally

client = Tally(
    api_key="tly-your-api-key-here",       # Required: Your Tally API key
    api_version="2025-02-01",              # Optional: API version
    timeout=30.0,                           # Optional: Request timeout in seconds
    base_url="https://api.tally.so"        # Optional: Custom base URL
)

Getting Your API Key

  1. Go to Tally Settings > API Keys
  2. Click "Create API key"
  3. Copy and store your API key securely

Security Note: Never commit your API key to version control. Use environment variables or a secure secrets manager.

Development

This project uses uv for dependency management.

# Clone the repository
git clone https://github.com/felipeadeildo/pytally.git

# Install dependencies
uv sync

# Run tests (coming soon)
uv run pytest

Contributing

Contributions are welcome! This SDK is in early development, and we'd love your help to:

  • Add missing API endpoints
  • Improve documentation
  • Report bugs
  • Suggest new features

Please feel free to open an issue or submit a pull request.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Acknowledgments

This is an unofficial SDK and is not affiliated with or endorsed by Tally. Tally and the Tally logo are trademarks of Tally B.V.

Links


Made with ❤️ by Felipe Adeildo

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

pytally_sdk-0.1.2a1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

pytally_sdk-0.1.2a1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file pytally_sdk-0.1.2a1.tar.gz.

File metadata

  • Download URL: pytally_sdk-0.1.2a1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pytally_sdk-0.1.2a1.tar.gz
Algorithm Hash digest
SHA256 e67ed11e3179886e834dfb82d0cba10e54f7c1eb5ad05aa833a6a196529877ca
MD5 55030f43628e174907e49f56b015ef91
BLAKE2b-256 85ca2a9652dfb18fe7966bd3032fd7cc8da5c1bc6936dc110f138df847bd29fc

See more details on using hashes here.

File details

Details for the file pytally_sdk-0.1.2a1-py3-none-any.whl.

File metadata

  • Download URL: pytally_sdk-0.1.2a1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pytally_sdk-0.1.2a1-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb3dba0f361ad527e40052bd67f11c7bf67f303849eea0c623ea9e14438a7b0
MD5 bab41d37934ba5b2b59e3208670f59a3
BLAKE2b-256 c6458ba5bc4a7d763bc8497bda5952c7937dfeda564b2ff787b161f8fcbd3edf

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