Skip to main content

Outerport Python SDK

Installation

pip install "outerport>=0.13"

or

uv add "outerport>=0.13"

Version 0.13 is the first to install the outerport command (see below); earlier versions hold only the client.

Usage

from outerport import OuterportClient

client = OuterportClient(
    api_key="your_api_key",
    base_url="https://api.outerport.com"
)

The outerport command

Installing version 0.13 or later installs outerport, which builds engineering models on Outerport from a folder on your machine: you (or a coding agent such as Claude Code) write the model's Python files there, and Outerport compiles, draws, reviews, simulates and tests them, then hosts the project at a link that opens in a browser.

outerport login --url https://api.outerport.com --key <your API key>
outerport skill                      # how to write a model: give this to your coding agent
outerport examples                   # the example models: panels and plants, boards, 3D assemblies
outerport example hpu                # writes a folder example's files under ./hpu/
outerport library                    # the modeling library, to import and type-check models against here
outerport compile panels/pump.py     # its documents, sheets and errors; an assembly's problems and motions
outerport render panels/pump.py --sheet 2 -o control.png
outerport review panels/pump.py      # the design rules a panel, plant, board or 3D assembly does not pass
outerport simulate scenarios/start.toml  # one scenario file against the project's models
outerport test                       # every scenario under scenarios/
outerport deploy --name pump-panel   # prints the project's link

OUTERPORT_API_URL and OUTERPORT_API_KEY take the place of login. A failed compile, review or scenario exits with status 1, a refused request with 2. outerport --help lists every command.

A coding agent that can run shell commands runs the build loop with this command, not with the Outerport MCP server's tools: the command reads the project's files from disk, where each tool call has to carry them.

For a 3D assembly, compile prints each motion (the parts it turns or slides, its travel, and the connector whose axis it turns about or slides along) and each problem Outerport found: assembly order, mate and design problems. These do not change its exit status, and compile does not sweep motions for collisions. review holds a 3D assembly only to the rules that need no geometry (every part states a process or is a bought part with a specification, and an assembly that states mates names its ground part), and its last line names what it does not check.

outerport example <name> prints a single-file example, or writes it to the file -o names. A folder example is a package of several files: they are written at their paths under the current folder, or under the folder -o names.

outerport library writes the modeling library, op_simulation with op_simulation.model, under the project's .outerport/python folder, or under the folder -o names, and prints the Python version and the pip install line it needs. With that folder on PYTHONPATH and on your editor's extra paths, models import, complete and type-check on your machine; they still simulate only on Outerport. The folder is hidden, so no command sends it with the project. Running it again replaces an op_simulation folder it wrote, and refuses one it did not.

Development

Setting Up Development Environment

# Clone the repository
git clone https://github.com/outerport/outerport.git
cd outerport/outerport-python

# Install development dependencies
pip install -e ".[dev]"

Running Tests

# Run all tests
pytest

# Run only unit tests
pytest tests/unit

# Run with coverage report
pytest --cov=outerport

Integration tests need an API key:

export OUTERPORT_API_KEY="your_api_key"
pytest tests/integration

See tests/README.md for more on testing.

Metadata

Release files for outerport 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for outerport 0.13.0
File Size Uploaded Provenance Actions
outerport-0.13.0.tar.gz 422.2 kB Without provenance Details for outerport-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for outerport 0.13.0
File Interpreter ABI Platform Actions
outerport-0.13.0-py3-none-any.whl Python 3 none any Details for outerport-0.13.0-py3-none-any.whl

Total release size: 469.2 kB

Release files / outerport-0.13.0.tar.gz

Download URL outerport-0.13.0.tar.gz
Size 422.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4a7d3c93c7eff132d8e014bd822ae1ddee7c5c62c3fd3169512f15ed7fe83dc3
BLAKE2b-256 checksum
How to use checksums
f7b6e84f8fce0d5c52f591a27c60a830e7834ad65d672cff7b75fd3943b46354
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / outerport-0.13.0-py3-none-any.whl

Download URL outerport-0.13.0-py3-none-any.whl
Size 46.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25cc3a91af38a7dc96ca6304cd3e2f8a024bd0c6f15022e0216421b4d6dc987f
BLAKE2b-256 checksum
How to use checksums
f90a61b46aed50c433c8608d7c13d5283f27f398b64c5874d3ff7f92f631e168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for outerport 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.13.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page