semvec/pypi-packages huggingface dataset:
pytopomojo 0.1.6
Python wrapper for TopoMojo API
License: MIT
Requires Python: >=3.8

# PyTopoMojo

This project is a Python API Client that can be used to interact with [TopoMojo](https://github.com/cmu-sei/TopoMojo).  It is a work in progress, so not all TopoMojo API endpoints are implemented yet.

## Installation

```
pip install pytopomojo
```

## Uplaod Workspace Example

```python
from pytopomojo import Topomojo

topomojo = Topomojo("<topomojo_url>", "<topomojo_api_key>")
topomojo.get_workspaces()

# Upload a workspace archive
topomojo.upload_workspace("/path/to/workspace.zip")

# Upload multiple workspace archives
topomojo.upload_workspaces(["/path/one.zip", "/path/two.zip"])
```

## Workspace Update Example

```python
from pytopomojo import Topomojo

tm = Topomojo("<topomojo_url>", "<api_key>")

# Update workspace name and description
tm.update_workspace(
    workspace_id="<workspace-guid>",
    changed_workspace_data={
        "name": "New Name",
        "description": "New Description"
        # 'id' is optional; the client will include it automatically
    }
)
```