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
maturincompiles the Rust code in theoct-pycrate into a native Python module.- We configure the name of this compiled module in
pyproject.tomlto beoct._internal. - The leading underscore (
_) is a standard Python convention that signals that_internalis a low-level module not meant for direct use. - Our user-facing Python code in
oct/py_api.pyimports functions from_internaland 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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fc0113524f7bbb6e70c677bcd4d9824a5b28f1d1fa35fbec9f3b73042e2c05c
|
|
| MD5 |
89b955a7dccc6388d5fb6cba199aaba9
|
|
| BLAKE2b-256 |
28613f3da205e0d216984c620fd9cfc097993e79b1ad9b96e7f93ddd5cc18bbe
|
File details
Details for the file opencloudtool-0.4.1-cp312-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: opencloudtool-0.4.1-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.7 MB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
489cb5e12a6a1e725a5eb103b4a7dfd0044594ee7617e5aaa69739b94fbd147b
|
|
| MD5 |
781d1e7107b1984b98adc8d489a0fc3d
|
|
| BLAKE2b-256 |
295c451e9490047057325afbc7de04435c033616beaad7bee757422004eaa8cd
|