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 Distribution

opencloudtool-0.4.1.tar.gz (82.4 kB view details)

Uploaded Source

Built Distribution

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

opencloudtool-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 opencloudtool-0.4.1.tar.gz.

File metadata

  • Download URL: opencloudtool-0.4.1.tar.gz
  • Upload date:
  • Size: 82.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for opencloudtool-0.4.1.tar.gz
Algorithm Hash digest
SHA256 1fc0113524f7bbb6e70c677bcd4d9824a5b28f1d1fa35fbec9f3b73042e2c05c
MD5 89b955a7dccc6388d5fb6cba199aaba9
BLAKE2b-256 28613f3da205e0d216984c620fd9cfc097993e79b1ad9b96e7f93ddd5cc18bbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencloudtool-0.4.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 489cb5e12a6a1e725a5eb103b4a7dfd0044594ee7617e5aaa69739b94fbd147b
MD5 781d1e7107b1984b98adc8d489a0fc3d
BLAKE2b-256 295c451e9490047057325afbc7de04435c033616beaad7bee757422004eaa8cd

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