Skip to main content

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

  1. Go to https://www.thingiverse.com/apps/create
  2. Fill in the form
  3. Click on "Create Application"
  4. Copy the "Client ID" and "Client Secret" to a safe place
  5. 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
  6. Click on "Allow"
  7. Copy the code from the address bar
  8. 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
  1. Copy the access_token to your .thingiverse_publisher.json file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thingiverse_publisher-0.6.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thingiverse_publisher-0.6.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

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

Hashes for thingiverse_publisher-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1c18f0104fff8746c43148ac992b9c2054c59b29c34e6147e61161309bff54ff
MD5 71c924e4910139e1ecf0eebb0e173579
BLAKE2b-256 2342bdde6d63316b006c24914a01f6103ac85bce5478c3a409edc4d4df9488b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for thingiverse_publisher-0.6.0.tar.gz:

Publisher: publish-pypi.yml on nomike/thingiverse-publisher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thingiverse_publisher-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for thingiverse_publisher-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9625acfec174d066f542ce69e6ebdd8e9406ce3f9039a8e602bd02c77f93f86
MD5 3d3f92bc19bc054459fac4716e1d4714
BLAKE2b-256 5e6f10951cce914bd86d06d17a65f028e4858bcff0079e7929f911c52ba87f97

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page