Skip to main content

A modern Python SDK for SEE Content Sharing services (Short URL, Text, File, etc.)

Project description

SEE Python SDK

Python Version License Code style: black Type checked: mypy

A modern Python SDK for SEE Content Sharing services (Short URL, Text, File, etc.), featuring async support, full type safety, and Python 3.11+ capabilities.

Features

  • 🚀 Modern Python: Built with Python 3.11+ features (type hints, pattern matching, dataclasses)
  • 🔄 Async First: Fully async API based on asyncio and httpx
  • 📝 Type Safe: 100% type annotated with mypy strict mode support
  • 🛡️ Reliable: Built-in retry mechanism, error handling, and rate limiting
  • 🧪 Well Tested: Comprehensive test suite with pytest
  • 📦 Standard Compliant: Follows PEP 517/518 with pyproject.toml

Requirements

  • Python 3.11+
  • httpx >= 0.27.0

Installation

pip install see-sdk

or you can visit PyPI page for more options.

Install from source:

git clone https://github.com/sdotee/sdk.py see-python-sdk
cd see-python-sdk && pip install -e .

Quick Start

Environment Setup

Set your API key as an environment variable:

export SEE_API_KEY="your-api-key-here"

Basic Usage

See examples/quickstart.py for a simple example of how to create a short URL.

Examples

The examples directory contains comprehensive usage examples for all features:

Development

Setup

git clone https://github.com/yourusername/see-sdk.git
cd see-sdk

python -m venv venv
source venv/bin/activate  # Linux/macOS

pip install -e ".[dev]"
pre-commit install

Testing

pytest
pytest --cov=see --cov-report=html
pytest tests/test_client.py

Code Quality

black src/ tests/
ruff check src/ tests/
mypy src/

API Reference

SeeClient

Main client class for API interactions.

Methods

  • create_short_url(request) - Create short URL
  • update_short_url(request) - Update short URL
  • delete_short_url(request) - Delete short URL
  • get_domains() - Get available domains
  • get_tags() - Get available tags

Models

CreateShortUrlRequest

@dataclass
class CreateShortUrlRequest:
    domain: str
    target_url: str
    title: str
    custom_slug: str | None = None
    expire_at: int | None = None
    tag_ids: list[int] | None = None

Exceptions

  • SeeError - Base exception
  • APIError - API error
  • AuthenticationError - Authentication error
  • ValidationError - Validation error
  • RateLimitError - Rate limit error
  • NotFoundError - Not found error

Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

License

MIT License - see LICENSE file.

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

see_sdk-1.2.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

see_sdk-1.2.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file see_sdk-1.2.0.tar.gz.

File metadata

  • Download URL: see_sdk-1.2.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for see_sdk-1.2.0.tar.gz
Algorithm Hash digest
SHA256 afe4a0a095084b173540a4b490ac5f0935adb8dc09d0ae679eb71b9faf34f2e3
MD5 4824da52dc7bb8d70e9e1166c64fe860
BLAKE2b-256 c41dcca631ece38a84edaad861cf26459899fb34e668bf53aa8b4f553e53e647

See more details on using hashes here.

Provenance

The following attestation bundles were made for see_sdk-1.2.0.tar.gz:

Publisher: publish.yml on sdotee/sdk.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file see_sdk-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: see_sdk-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for see_sdk-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e8f4fadcdf33728cb702ec186a4f716608f21c7a0a6b72d9a66322a652b477e
MD5 53a402d99b92108a353ab1abdd293e32
BLAKE2b-256 2f6d243445f6892d4d563c17962f1e0291836c5ca3ff3d7d35095e8b795d1e5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for see_sdk-1.2.0-py3-none-any.whl:

Publisher: publish.yml on sdotee/sdk.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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