Metadata-Version: 2.4
Name: onshape-sdk-zachsharma
Version: 0.1.2
Summary: A lightweight, typed Python SDK for the Onshape REST API
Author-email: Zach Sharma <zachariah.sharma@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/zachariahsharma/onshape-sdk
Project-URL: Documentation, https://zachariahsharma.github.io/onshape-sdk/
Project-URL: Issues, https://github.com/zachariahsharma/onshape-sdk/issues
Keywords: onshape,cad,api,sdk,rest
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-dotenv>=1.0
Requires-Dist: requests>=2.28
Dynamic: license-file

# onshape-sdk-zachsharma

A lightweight, typed Python SDK for the [Onshape REST API](https://onshape-public.github.io/docs/).

Documentation: [https://zachariahsharma.github.io/onshape-sdk/](https://zachariahsharma.github.io/onshape-sdk/)

## Install

```bash
pip install onshape-sdk-zachsharma
```

## Quick start

```python
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:

```env
ONSHAPE_ACCESS_KEY=your_access_key
ONSHAPE_SECRET_KEY=your_secret_key
```

## License

MIT
