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.
- 🚀 Modern Python: Built with Python 3.11+ features (type hints, pattern matching, dataclasses)
- 🔄 Async First: Fully async API based on
asyncioandhttpx - 📝 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
- Python 3.11+
- httpx >= 0.27.0
pip install see-sdkor 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 .Set your API key as an environment variable:
export SEE_API_KEY="your-api-key-here"See examples/quickstart.py for a simple example of how to create a short URL.
The examples directory contains comprehensive usage examples for all features:
- Quick Start: examples/quickstart.py - Basic usage for Short URLs.
- Short URLs: examples/complete_example.py - Advanced Short URL features (custom slugs, tags, expiration).
- Text Sharing: examples/text_sharing.py - Creating, updating, and deleting shared text.
- File Sharing: examples/file_sharing.py - Uploading and managing files.
- Advanced Usage: examples/advanced_example.py - Complex workflows and resource management.
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 installpytest
pytest --cov=see --cov-report=html
pytest tests/test_client.pyblack src/ tests/
ruff check src/ tests/
mypy src/Main client class for API interactions.
create_short_url(request)- Create short URLupdate_short_url(request)- Update short URLdelete_short_url(request)- Delete short URLget_domains()- Get available domainsget_tags()- Get available tags
@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 = NoneSeeError- Base exceptionAPIError- API errorAuthenticationError- Authentication errorValidationError- Validation errorRateLimitError- Rate limit errorNotFoundError- Not found error
Contributions are welcome! See CONTRIBUTING.md for details.
MIT License - see LICENSE file.