Metadata-Version: 2.5
Name: uploadcenter
Version: 0.2.4
Summary: Official Python SDK for the UploadCenter API — file uploads, processing, and delivery.
Project-URL: Homepage, https://uploadcenter.com
Project-URL: Repository, https://github.com/uploadcenter/uploadcenter
Author: UploadCenter
License-Expression: MIT
Keywords: file-upload,sdk,storage,uploadcenter
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: attrs>=22.2.0
Requires-Dist: httpx<1.0.0,>=0.23.0
Requires-Dist: python-dateutil>=2.8.0
Requires-Dist: typing-extensions>=4.0.0
Description-Content-Type: text/markdown

# uploadcenter

Official Python SDK for the [UploadCenter](https://uploadcenter.com) API — presigned uploads, file processing, transforms, webhooks, and more, fully typed and generated from UploadCenter's OpenAPI schema.

## Install

```bash
pip install uploadcenter
```

## Usage

```python
import httpx

from uploadcenter import create_client
from uploadcenter.generated.api.uploads import (
    complete_upload_endpoint_v1_uploads_complete_post as complete_upload,
)
from uploadcenter.generated.api.uploads import (
    presign_upload_endpoint_v1_uploads_presign_post as presign_upload,
)
from uploadcenter.generated.models import CompleteUploadRequest, PresignUploadRequest

client = create_client(
    base_url="https://api.uploadcenter.com",
    token="sk_live_...",  # an API key from your project settings
)

presigned = presign_upload.sync(
    client=client,
    body=PresignUploadRequest(
        project_id="project_...",
        filename="photo.jpg",
        size_bytes=len(file_bytes),
        mime_type="image/jpeg",
        visibility="private",
    ),
)

httpx.put(
    presigned.upload_url,
    content=file_bytes,
    headers={"Content-Type": "image/jpeg"},
)

complete_upload.sync(
    client=client,
    body=CompleteUploadRequest(file_id=presigned.file_id),
)
```

Async equivalents (`presign_upload.asyncio`, `complete_upload.asyncio`, ...) are available for every endpoint — use them with `httpx.AsyncClient` and `await` your own PUT request.

Every module under `uploadcenter.generated.api.<group>` mirrors an OpenAPI tag (`uploads`, `files`, `folders`, `projects`, `organizations`, `api_keys`, `domains`, `webhooks`, `notifications`, `usage`, `billing`, `auth`), and exposes four functions per endpoint: `sync`, `sync_detailed`, `asyncio`, `asyncio_detailed`. Request/response models live under `uploadcenter.generated.models` and mirror the OpenAPI schema directly.

## License

MIT
