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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytally_sdk-0.1.7.tar.gz
  • Upload date:
  • Size: 22.4 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.7.tar.gz
Algorithm Hash digest
SHA256 e246d45999cbcd350ae803a9c425cb1f5945e17b13a971c8ba55d95402edc4d8
MD5 f422bd1d7caa1712c8b397f7ad72db4a
BLAKE2b-256 769df761d8419f547cc8710d8b5af61b965b6fe3e328d8c402450f76f5f8db73

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytally_sdk-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 31.1 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 68810916c56ad06e866902661746fbda9d57077aa2ce86e2361a5e169583ddf3
MD5 3f3412ba4f0036d2ed5449b437878010
BLAKE2b-256 295c09b5a8e2a8da1fa90811209055c8bc8af55cea23f046af32eb5973dea963

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