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

Uploaded Python 3

File details

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

File metadata

  • Download URL: see_sdk-1.1.1.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for see_sdk-1.1.1.tar.gz
Algorithm Hash digest
SHA256 fe523ee08c85f20f49477982cea9153775230e27a82bc4fefda4e17f725d03e5
MD5 5fbdd6462eec6064cbf6f371c7af4ba5
BLAKE2b-256 04a81c446534978c361867a65ee6935cef0e29436531fe20a30a628d0ef7b2e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: see_sdk-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for see_sdk-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a189fe938058a9812079ced49832020155425d6006e01d1e63e2de08cf1e327
MD5 78ca19a445feab5a2b1326ed935d2ca9
BLAKE2b-256 dd00e76a3045ece621434617d42535b066c4fc76b6866ab0056da466b6130a19

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