A simple tool to publish things to Thingiverse using the Thingiverse API
Project description
Thingiverse Publisher
A small tool for publishig things to Thingiverse.
The tool is very rudimentary and needs some code-clenup, but it does it's job, which is to upload a 3D model to Thingiverse. It is in a very early stage of development, so expect breaking changes.
Pre-requisites
- Python 3.10 or later
- A Thingiverse account
- A Thingiverse Bearer token
Installing
From the project directory:
pip install .
For an editable install (development):
pip install -e .
This installs the thingiverse-publisher command on your PATH.
Configuring
Place a file .thingiverse_publisher.json in your home directory with the following content (see below on how to get a bearer token):
{
"bearer_token": "123456789abcdef123456789abcdef12"
"username": "nomike"
}
Place a file .thingiverse_publisher.json in the directory of your 3D model. The file should look like this:
{
"thing": {
"name": "i3 PTFE tube cutting measure",
"category": "Art",
"tags": [
"foo",
"bar",
"baz"
],
"instructions": "Print and enjoy",
"is_wip": true,
"license": "gpl3",
},
"files": [
"i3-ptfe-tube-cutting-measure.scad",
"i3-ptfe-tube-cutting-measure.stl"
],
"images": []
}
Available license options
Thingiverse currently does not document which licenses you can use in the API. This interface does not seem to be symetric though. What you get as a value for "license" in a response, is not accepted as a value in a request. I've created a support case for getting a list of valid options with thingiverse, and I'm currently waiting for a response.
Valid options I have found so far are:
cc: Creative Commons - Attribution
Getting a Bearer Token
- Go to https://www.thingiverse.com/apps/create
- Fill in the form
- Click on "Create Application"
- Copy the "Client ID" and "Client Secret" to a safe place
- Open a browser and go to
https://www.thingiverse.com/login/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code - Click on "Allow"
- Copy the code from the address bar
- Open a terminal and run the following command:
curl -X POST -d "client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&code=YOUR_CODE&grant_type=authorization_code" https://www.thingiverse.com/login/oauth/access_token
- Copy the
access_tokento your.thingiverse_publisher.jsonfile
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 thingiverse_publisher-0.6.0.tar.gz.
File metadata
- Download URL: thingiverse_publisher-0.6.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c18f0104fff8746c43148ac992b9c2054c59b29c34e6147e61161309bff54ff
|
|
| MD5 |
71c924e4910139e1ecf0eebb0e173579
|
|
| BLAKE2b-256 |
2342bdde6d63316b006c24914a01f6103ac85bce5478c3a409edc4d4df9488b8
|
Provenance
The following attestation bundles were made for thingiverse_publisher-0.6.0.tar.gz:
Publisher:
publish-pypi.yml on nomike/thingiverse-publisher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thingiverse_publisher-0.6.0.tar.gz -
Subject digest:
1c18f0104fff8746c43148ac992b9c2054c59b29c34e6147e61161309bff54ff - Sigstore transparency entry: 1107734091
- Sigstore integration time:
-
Permalink:
nomike/thingiverse-publisher@c433f31e1e19243300fa88d02ac0c38951a22e6a -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/nomike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@c433f31e1e19243300fa88d02ac0c38951a22e6a -
Trigger Event:
release
-
Statement type:
File details
Details for the file thingiverse_publisher-0.6.0-py3-none-any.whl.
File metadata
- Download URL: thingiverse_publisher-0.6.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9625acfec174d066f542ce69e6ebdd8e9406ce3f9039a8e602bd02c77f93f86
|
|
| MD5 |
3d3f92bc19bc054459fac4716e1d4714
|
|
| BLAKE2b-256 |
5e6f10951cce914bd86d06d17a65f028e4858bcff0079e7929f911c52ba87f97
|
Provenance
The following attestation bundles were made for thingiverse_publisher-0.6.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on nomike/thingiverse-publisher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thingiverse_publisher-0.6.0-py3-none-any.whl -
Subject digest:
b9625acfec174d066f542ce69e6ebdd8e9406ce3f9039a8e602bd02c77f93f86 - Sigstore transparency entry: 1107734092
- Sigstore integration time:
-
Permalink:
nomike/thingiverse-publisher@c433f31e1e19243300fa88d02ac0c38951a22e6a -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/nomike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@c433f31e1e19243300fa88d02ac0c38951a22e6a -
Trigger Event:
release
-
Statement type: