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.5.tar.gz (8.7 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.5-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytally_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 8.7 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.5.tar.gz
Algorithm Hash digest
SHA256 e3c9050326897ab8f48d2b0aad6add5ff5d792b819bf75e784f8ec87f07c750a
MD5 162c0590e19147546eb4b994d84f2945
BLAKE2b-256 51a92ec7fcb187bbf932031fb3f3fe9c57e08e3ba418aa80076d779429829a3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytally_sdk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 13.3 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 66f58ed1f7e584a4d6db8554ad8c70475583de82c9fa0da8ad209a6c6dad14c3
MD5 4f96418281d899afe4647aa4c9ca74a4
BLAKE2b-256 60f450da7f7e4e3a00e02b05e53a1d256f206414f637534d472026f7e3b8ce05

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