Skip to main content

A lightweight, typed Python SDK for the Onshape REST API

Project description

onshape-sdk-zachsharma

A lightweight, typed Python SDK for the Onshape REST API.

Install

pip install onshape-sdk-zachsharma

Quick start

from onshape_sdk import OnshapeClient, parse_onshape_url

client = OnshapeClient.from_env()
ids = parse_onshape_url("https://cad.onshape.com/documents/.../w/.../e/...")

bom = client.assemblies.get_bom(ids["did"], ids["wvm_type"], ids["wvm_id"], ids["eid"])
for row in bom.rows:
    print(row.part_number, row.name, row.quantity, row.material_name)

Authentication

Create Onshape API keys and add them to a .env file:

ONSHAPE_ACCESS_KEY=your_access_key
ONSHAPE_SECRET_KEY=your_secret_key

License

MIT

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

onshape_sdk_zachsharma-0.1.1.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

onshape_sdk_zachsharma-0.1.1-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file onshape_sdk_zachsharma-0.1.1.tar.gz.

File metadata

  • Download URL: onshape_sdk_zachsharma-0.1.1.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for onshape_sdk_zachsharma-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cffaf73fec20684ec172002e058d2e4ec5d202d740e70acca848cb99446da5ab
MD5 3128cbf0f6f5e17ca318142c58303140
BLAKE2b-256 1370855a5fdd45f68402586657186f085dedf0c9c189e4af75e911063f4dbef5

See more details on using hashes here.

File details

Details for the file onshape_sdk_zachsharma-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for onshape_sdk_zachsharma-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 84b9f0d22071eb38e1f93160c9ac16fdb893810b7fd24092e2dfe196949dd168
MD5 e3a9a2564ff1bd2f325d32df56bf06a9
BLAKE2b-256 7cf8497f4303cb7c19abee83cb1ada5080df1436c93129ccc52e04c82054c4ec

See more details on using hashes here.

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