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.4.tar.gz (8.2 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.4-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file pytally_sdk-0.1.4.tar.gz.

File metadata

  • Download URL: pytally_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 8.2 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.4.tar.gz
Algorithm Hash digest
SHA256 b51f15de727a2c682f7f86acf816d434611a2316684472a555239d21704e4546
MD5 df1e14dda3abfbe8e7bac046463764ca
BLAKE2b-256 b75e9fc1855aaa5e65900a7a035ba566479a2fa1927b01e2f620624b32cf7f9a

See more details on using hashes here.

File details

Details for the file pytally_sdk-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pytally_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 12.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a55cadbff41834f091ee7e400fbac600b0560880265810846bd5501771eaf3cf
MD5 8a019d6f4a2dc44d49839bbf98471770
BLAKE2b-256 8ce1b5e13bbab30bfa9adc1f439400e08a938578f7ffd34730b5c9b73bbaa410

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