Python bindings for SyNAP
Project description
Overview
The SyNAP Python API provides Python bindings that closely mirror our SyNAP C++ API, enabling seamless integration for inference in Python. The Python bindings offer a straightforward yet flexible approach to deep learning workflows, allowing users to incorporate custom pre-processing and post-processing functionalities.
[!NOTE] SyNAP Python API serves as the primary interface for low-level access to SyNAP C++ Framework, enabling seamless integration for inference in Python.
[!TIP] For a rapid AI development experience, we recommend using SynapRT, which provides ready-to-use AI pipelines.
Available Modules and Classes
The SyNAP Python API provides access to the following classes and functions:
Core Module (synap)
NetworkTensorsTensor
Preprocessing Module (synap.preprocess)
PreprocessorInputData
Postprocessing Module (synap.postprocess)
DetectorClassifier- (Additional auxiliary helper classes)
Data Type Definitions (synap.types)
DataTypeDim2dLandmarkLayoutMaskRectShape
Building the Python Wheel
Follow the steps below to set up your development environment and build the Python wheel. You can build this on a Linux machine, WSL2, or locally on the Astra board.
Prerequisites
Ensure you have necessary build dependencies installed:
Linux/WSL2
sudo apt update
sudo apt install python3.10 python3.10-venv python3.10-dev
sudo apt install -y build-essential cmake ninja-build
Astra
The python3-dev debian package for Astra is required. Install with:
wget https://synaptics-synap.github.io/examples-prebuilts/packages/python3-dev_3.10.13-r0_arm64.deb
dpkg -i python3-dev_3.10.13-r0_arm64.deb
Setup Virtual Environment
Create and activate a virtual environment to manage dependencies:
python3.10 -m venv venv
source venv/bin/activate
Build Package:
To build the Python wheel, just run:
./build.sh
Use --verbose for detailed build steps and --clean for a clean build.
The build process generates a wheel file stored in the dist folder. The output should resemble the following:
Successfully built synap_python-0.9.0-cp310-cp310-manylinux_2_35_aarch64.whl
Building Python extensions ... Success!
Build completed successfully, wheel located at /home/../synap-python/dist/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 synap_python-0.9.0.tar.gz.
File metadata
- Download URL: synap_python-0.9.0.tar.gz
- Upload date:
- Size: 444.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
793b73852628a7053c32202afb34c261a40434756406807ed9e0b28724777305
|
|
| MD5 |
28daf2b05b6d248136b0fff817c57622
|
|
| BLAKE2b-256 |
ad67968eb021710ae663c53834ec89711fb7136dec6cc4d937c0060058793332
|
Provenance
The following attestation bundles were made for synap_python-0.9.0.tar.gz:
Publisher:
pip-build-publish-pypi.yml on synaptics-synap/synap-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synap_python-0.9.0.tar.gz -
Subject digest:
793b73852628a7053c32202afb34c261a40434756406807ed9e0b28724777305 - Sigstore transparency entry: 534275245
- Sigstore integration time:
-
Permalink:
synaptics-synap/synap-python@d1e2be54f7745924cdda5538b59176e1691c065d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/synaptics-synap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip-build-publish-pypi.yml@d1e2be54f7745924cdda5538b59176e1691c065d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file synap_python-0.9.0-cp313-cp313-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: synap_python-0.9.0-cp313-cp313-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 423.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da2357dcbd4404cee9af1106c18805689d5f4a4ee67ca7cd737728a8ac94f51
|
|
| MD5 |
a2415b512310bfb710d1e2cb887875f5
|
|
| BLAKE2b-256 |
0416b783c93afcde8a27508707eb1de0d6f80ff6a6999c780915a943618a306f
|
Provenance
The following attestation bundles were made for synap_python-0.9.0-cp313-cp313-manylinux_2_35_aarch64.whl:
Publisher:
pip-build-publish-pypi.yml on synaptics-synap/synap-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synap_python-0.9.0-cp313-cp313-manylinux_2_35_aarch64.whl -
Subject digest:
3da2357dcbd4404cee9af1106c18805689d5f4a4ee67ca7cd737728a8ac94f51 - Sigstore transparency entry: 534275271
- Sigstore integration time:
-
Permalink:
synaptics-synap/synap-python@d1e2be54f7745924cdda5538b59176e1691c065d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/synaptics-synap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip-build-publish-pypi.yml@d1e2be54f7745924cdda5538b59176e1691c065d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file synap_python-0.9.0-cp312-cp312-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: synap_python-0.9.0-cp312-cp312-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 424.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f478fee9b32c14d75fa66ff5d13c3d3b17597c67ac78a186fa58344aad87627
|
|
| MD5 |
64aaa1fc6c434399194df03ae081ad1e
|
|
| BLAKE2b-256 |
f45e12dc0be20c4de6f5384ae51149a0ce0ed23690d3ca006d45749220a1cc59
|
Provenance
The following attestation bundles were made for synap_python-0.9.0-cp312-cp312-manylinux_2_35_aarch64.whl:
Publisher:
pip-build-publish-pypi.yml on synaptics-synap/synap-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synap_python-0.9.0-cp312-cp312-manylinux_2_35_aarch64.whl -
Subject digest:
6f478fee9b32c14d75fa66ff5d13c3d3b17597c67ac78a186fa58344aad87627 - Sigstore transparency entry: 534275374
- Sigstore integration time:
-
Permalink:
synaptics-synap/synap-python@d1e2be54f7745924cdda5538b59176e1691c065d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/synaptics-synap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip-build-publish-pypi.yml@d1e2be54f7745924cdda5538b59176e1691c065d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file synap_python-0.9.0-cp311-cp311-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: synap_python-0.9.0-cp311-cp311-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 423.9 kB
- Tags: CPython 3.11, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
042a79e1a05022b98cfa7e20a4220d2a349e5226b2bd7e5c040cb0fdb8ab8550
|
|
| MD5 |
35154ebb3a250722213c0282423643a0
|
|
| BLAKE2b-256 |
082dd6a0e8d11fb2205140cbfde71f5874e3c7dd8206ff553a2da29d27eb0893
|
Provenance
The following attestation bundles were made for synap_python-0.9.0-cp311-cp311-manylinux_2_35_aarch64.whl:
Publisher:
pip-build-publish-pypi.yml on synaptics-synap/synap-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synap_python-0.9.0-cp311-cp311-manylinux_2_35_aarch64.whl -
Subject digest:
042a79e1a05022b98cfa7e20a4220d2a349e5226b2bd7e5c040cb0fdb8ab8550 - Sigstore transparency entry: 534275341
- Sigstore integration time:
-
Permalink:
synaptics-synap/synap-python@d1e2be54f7745924cdda5538b59176e1691c065d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/synaptics-synap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip-build-publish-pypi.yml@d1e2be54f7745924cdda5538b59176e1691c065d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file synap_python-0.9.0-cp310-cp310-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: synap_python-0.9.0-cp310-cp310-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 422.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0035c910e9c5025d12da48921cbf8af2e176f432845867da05a6b9bb61d7888
|
|
| MD5 |
6c975d03f1fe8be80a2148da9622b7ce
|
|
| BLAKE2b-256 |
ef751a635faaf88c40bf2e97a27a0671b9a5fc4dd5fd262231249179ed90ae0f
|
Provenance
The following attestation bundles were made for synap_python-0.9.0-cp310-cp310-manylinux_2_35_aarch64.whl:
Publisher:
pip-build-publish-pypi.yml on synaptics-synap/synap-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synap_python-0.9.0-cp310-cp310-manylinux_2_35_aarch64.whl -
Subject digest:
d0035c910e9c5025d12da48921cbf8af2e176f432845867da05a6b9bb61d7888 - Sigstore transparency entry: 534275304
- Sigstore integration time:
-
Permalink:
synaptics-synap/synap-python@d1e2be54f7745924cdda5538b59176e1691c065d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/synaptics-synap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip-build-publish-pypi.yml@d1e2be54f7745924cdda5538b59176e1691c065d -
Trigger Event:
workflow_dispatch
-
Statement type: