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.

Documentation: https://zachariahsharma.github.io/onshape-sdk/

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.2.tar.gz (18.2 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.2-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onshape_sdk_zachsharma-0.1.2.tar.gz
  • Upload date:
  • Size: 18.2 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.2.tar.gz
Algorithm Hash digest
SHA256 72875d425380d8c2e34a2158e5ef809caa18a4a3024e1121b82a06edf46db424
MD5 6d3f76fa4951a7dfef9ea1ca85476e7b
BLAKE2b-256 9b48fdb06e805b7f78f2112744213df27f714430fa26f43e9cbf0c0f9dab84af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for onshape_sdk_zachsharma-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf3cc4b02cd5f1d9f94bd1b7d5700b77a71592f2274faea8851158ec6fbb4c0f
MD5 cc7473f0aa951f9475f0c41e4f691ee5
BLAKE2b-256 bbd8233d8a51e71cbe5bb1fb48122c302099931246fb46ca23bac81844d75952

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