A modern Python SDK for SEE Content Sharing services (Short URL, Text, File, etc.)
Project description
SEE Python SDK
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
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
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:
- 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.
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 URLupdate_short_url(request)- Update short URLdelete_short_url(request)- Delete short URLget_domains()- Get available domainsget_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 exceptionAPIError- API errorAuthenticationError- Authentication errorValidationError- Validation errorRateLimitError- Rate limit errorNotFoundError- Not found error
Contributing
Contributions are welcome! See CONTRIBUTING.md for details.
License
MIT License - see LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe523ee08c85f20f49477982cea9153775230e27a82bc4fefda4e17f725d03e5
|
|
| MD5 |
5fbdd6462eec6064cbf6f371c7af4ba5
|
|
| BLAKE2b-256 |
04a81c446534978c361867a65ee6935cef0e29436531fe20a30a628d0ef7b2e4
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a189fe938058a9812079ced49832020155425d6006e01d1e63e2de08cf1e327
|
|
| MD5 |
78ca19a445feab5a2b1326ed935d2ca9
|
|
| BLAKE2b-256 |
dd00e76a3045ece621434617d42535b066c4fc76b6866ab0056da466b6130a19
|