Metadata-Version: 2.1
Name: kerfed.client
Version: 0.1.9
Summary: Library for analyzing CAD geometry.
Author: Kerfed, Inc.
License: The MIT License (MIT)
        
        Copyright (c) 2024 Kerfed, Inc.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/kerfed/client
Keywords: manufacturing
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: authlib
Requires-Dist: httpx

# kerfed.client

A client for the Kerfed Engine which reliably analyzes 2D or 3D CAD geometry into a well-defined data structure. It can be used for many applications, including e-commerce, robotic automation, and process analysis.

Check out an API demo which converts a mesh into a full milling plan with G-code at [CarveWizard](https://carvewizard.com).

### Install

```
pip install kerfed.client
```

### Quick Start

```python
import os
import kerfed.client as ke

if __name__ == "__main__":

   # create a client
    client = ke.EngineClient(api_key="kerfed_api_key_here")


    # Generate a GeometryRequest
    filename = "tray.stl.zip"
    with open(filename, "rb") as f:
        request = ke.GeometryRequest(
            source=ke.FileBlob(
                name=filename,
                data=f.read(),
            ),
            source_units="inches",
        )

    # Start the geometry request running in the cloud.
    task_id = client.geometry_start(request, upload=True)

    # This will either return a `GeometryReponse` or raise an error.
    response = client.geometry_result(task_id=task_id)
```
