Skip to main content

Thingiverse Python SDK

A Python SDK for the Thingiverse API.

Installation

pip install thingiverse-client

Or from source:

pip install .
# or for development
pip install -e ".[dev]"

Quick start

from thingiverse import AuthenticatedClient, BASE_URL_PRODUCTION
from thingiverse.api.thing import get_things_thing_id

client = AuthenticatedClient(
    base_url=BASE_URL_PRODUCTION,
    token="YOUR_ACCESS_TOKEN",
)

response = get_things_thing_id.sync_detailed(thing_id=123, client=client)

Using the staging API

Use BASE_URL_STAGING to target the staging environment:

from thingiverse import AuthenticatedClient, BASE_URL_STAGING

client = AuthenticatedClient(base_url=BASE_URL_STAGING, token="...")

Authentication

The Thingiverse API uses Bearer token authentication. You can obtain a token from Thingiverse app settings or from browser network requests to api.thingiverse.com.

File uploads

File uploads (designs and images) use a specific flow. See the Thingiverse upload guide for details. The SDK exposes the generated uploadFile and FinalizeFiles endpoints; you may use a thin helper for the full upload flow (see docs).

Development setup

  1. Clone the repository and create a virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate  # or .venv\Scripts\activate on Windows
    pip install -e ".[dev]"
    
  2. Install pre-commit hooks (including commit message format):

    pre-commit install
    pre-commit install --hook-type commit-msg
    
  3. Commit messages must follow Conventional Commits (e.g. feat: add X, fix: Y). The commit-msg hook enforces this.

Running tests

Use the virtual environment’s Python so that dependencies (e.g. httpx) are found. Either activate the venv first (source .venv/bin/activate then pytest) or run:

.venv/bin/python -m pytest tests/unit tests/integration -v
  • Unit tests (default, no API calls):

    pytest tests/unit -v
    
  • Integration tests (read-only, real API). Set THINGIVERSE_TOKEN; optionally set THINGIVERSE_BASE_URL for staging:

    THINGIVERSE_TOKEN=... pytest tests/unit tests/integration -v
    
  • Destructive tests (optional; modify data). Not run in CI. Use a dedicated test account and prefer staging:

    THINGIVERSE_BASE_URL=https://api-staging.thingiverse.com THINGIVERSE_TOKEN=... pytest -m destructive
    

Updating the API spec

To refresh the SDK from the upstream Thingiverse OpenAPI spec:

  1. Run the fetch script (downloads the full spec; the docs URL may be behind Cloudflare—see script docstring):

    python scripts/fetch_openapi_spec.py
    
  2. Bundle, run the upstream-spec fix script, and regenerate the client (see OpenAPI upstream notes):

    ./scripts/generate_client.sh
    
  3. Commit changes and open a PR; merging can trigger a new release via release-please.

Documentation

Documentation is built with Zensical (reads mkdocs.yml) and published to GitHub Pages. Build locally:

pip install -e ".[dev]"
zensical serve

Publishing to PyPI

Publishing is automated via the Publish to PyPI workflow. When a GitHub release is published (e.g. by merging a release-please release PR), the workflow builds the package and uploads it to PyPI.

One-time setup:

  1. Create a PyPI account and register the project name thingiverse-client if needed.
  2. Configure trusted publishing for this repository:
    • PyPI: Add a new trusted publisher for the project.
    • Set Owner and Repository name to this repo, Workflow name to publish-pypi.yml.
    • No secrets or API tokens are required; PyPI uses OIDC to verify the workflow.

After that, each new release will be published to PyPI automatically. Optionally, add a GitHub Actions environment (e.g. pypi) and set environment: pypi in the workflow for approval or protection rules.

License

MIT.

Metadata

Release files for thingiverse-client 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thingiverse-client 1.1.1
File Size Uploaded Provenance
thingiverse_client-1.1.1.tar.gz 169.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for thingiverse-client 1.1.1
File Interpreter ABI Platform
thingiverse_client-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / thingiverse_client-1.1.1.tar.gz

Download URL thingiverse_client-1.1.1.tar.gz
Size 169.3 kB
Tags Source
SHA-256 checksum
How to use checksums
58a207cedb3c0c73cfedbbcd70acafb88cac01cb00be5bffe066788b4eee3dbf
BLAKE2b-256 checksum
How to use checksums
5f64310853c9b77a8f56fcbc0a73e3c90fb34c1da2e825c0ee19fa0076680725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / thingiverse_client-1.1.1-py3-none-any.whl

Download URL thingiverse_client-1.1.1-py3-none-any.whl
Size 983.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43e81a759fb39c5091c467d9adb4c7d455a60d1a893b5b406b80e22c283472c8
BLAKE2b-256 checksum
How to use checksums
3325461ce4a7f74d063da20d065ef55e8c5013fb0429d6f7229e981173f767f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Security for thingiverse-client 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for thingiverse_client-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page