Skip to main content

No project description provided

Project description

Deploy as Python library

This guide explains how to set up the environment and use the oct Python library.

How it works: Python-Rust binding

The connection between Python and Rust is managed by maturin and PyO3

  1. maturin compiles the Rust code in the oct-py crate into a native Python module.
  2. We configure the name of this compiled module in pyproject.toml to be oct._internal.
  3. The leading underscore (_) is a standard Python convention that signals that _internal is a low-level module not meant for direct use.
  4. Our user-facing Python code in oct/py_api.py imports functions from _internal and presents them as a clean, stable API.

1. Navigate to the Python Directory

cd crates/oct-py

2. Create and activate the Virtual environment

uv venv

source .venv/bin/activate # Windows: .venv\Scripts\activate

3. Install dependencies

uv sync --group dev

4. Build the Library

maturin develop

5. Run the example

cd ../../examples/projects/single-host-python-lib

Deploy

python deploy.py

Destroy

python destroy.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oct_py-0.4.1-cp312-abi3-macosx_11_0_arm64.whl (11.7 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

File details

Details for the file oct_py-0.4.1-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oct_py-0.4.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f29b3a344ef0461ce6f95126477e8111f3b87745190480fcdf89a238e663ff0
MD5 c4884d54bb6acfbd5eecaed41ed42d69
BLAKE2b-256 16537b948e7febb5ec40b4fe860bad2986d78840c0a87f6ba5da480ee707d3b7

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