Python binding for the pls4all C ABI — a portable PLS / NIRS engine.
Project description
Python binding
The current Python package ships a minimal ctypes-only binding that:
- loads
libp4a.{so,dll,dylib}viactypes.CDLL, - exposes the version / status / dtype / backend introspection queries,
- exposes a Pythonic
ContextandConfigwrapper for the lifecycle calls, - raises a typed exception (
Pls4allError) on any non-OK status, capturing the per-contextlast_errormessage.
A real wheel with NumPy zero-copy p4a_matrix_view_t conversion + a
sklearn-compatible estimator lands in Phase 2 on top of the live C core.
Build the underlying library
cmake --preset dev-release
cmake --build --preset dev-release --parallel
This produces build/dev-release/cpp/src/libp4a.so (or .dylib / .dll).
The binding looks for it on disk via the loader rules below.
Loader rules
In order:
$PLS4ALL_LIB_PATH— explicit path tolibp4a(most direct).pls4all/lib/libp4a*next to the installed package (wheel layout).<repo-root>/build/dev-release/cpp/src/libp4a*(developer convenience).- The standard system search path (
LD_LIBRARY_PATH, macOS rpath, WindowsPATH).
Smoke test
import pls4all
print(pls4all.version()) # "0.96.0+abi.1.13.0"
print(pls4all.abi_version()) # (1, 13, 0)
with pls4all.Context() as ctx:
ctx.seed = 42
print(ctx.last_error) # ""
try:
ctx.backend = pls4all.Backend.CUDA
except pls4all.Pls4allError as e:
print(e) # 'backend 5 is not compiled into this build of libp4a'
with pls4all.Config() as cfg:
cfg.algorithm = pls4all.Algorithm.PCR
cfg.solver = pls4all.Solver.SVD
cfg.deflation = pls4all.Deflation.REGRESSION
assert cfg.algorithm == pls4all.Algorithm.PCR
assert cfg.solver == pls4all.Solver.SVD
assert cfg.deflation == pls4all.Deflation.REGRESSION
cfg.algorithm = pls4all.Algorithm.PLS_SVD
cfg.deflation = pls4all.Deflation.CANONICAL
assert cfg.algorithm == pls4all.Algorithm.PLS_SVD
assert cfg.deflation == pls4all.Deflation.CANONICAL
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
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 pls4all-0.97.1.tar.gz.
File metadata
- Download URL: pls4all-0.97.1.tar.gz
- Upload date:
- Size: 59.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cabcc2e1244e22f52cdbf5453225c7b13efa2230c5d8e4ee409089515a7e3660
|
|
| MD5 |
d9e4bcd0cb63ace6fd41b16ea2333a73
|
|
| BLAKE2b-256 |
8a243a5e5095aaecf7780fc4ec91edf09653c6fcc093f23f0374352dd6332040
|
Provenance
The following attestation bundles were made for pls4all-0.97.1.tar.gz:
Publisher:
release-python.yml on GBeurier/pls4all
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pls4all-0.97.1.tar.gz -
Subject digest:
cabcc2e1244e22f52cdbf5453225c7b13efa2230c5d8e4ee409089515a7e3660 - Sigstore transparency entry: 1573281743
- Sigstore integration time:
-
Permalink:
GBeurier/pls4all@b12d7408b72bac8682d6839f6181dc83d5300362 -
Branch / Tag:
refs/tags/v0.97.1 - Owner: https://github.com/GBeurier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b12d7408b72bac8682d6839f6181dc83d5300362 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pls4all-0.97.1-py3-none-win_amd64.whl.
File metadata
- Download URL: pls4all-0.97.1-py3-none-win_amd64.whl
- Upload date:
- Size: 766.9 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ea54ca2ebf1e6a4c06f9b62a7781fd897c57c7a28ef5c8bec0356ee487ceaa8
|
|
| MD5 |
38f625c207e00d6489fa14c58f98d434
|
|
| BLAKE2b-256 |
778521776cda3bdee01c47d69143d2728e1a97d074b9d75423f6ae726db534b5
|
Provenance
The following attestation bundles were made for pls4all-0.97.1-py3-none-win_amd64.whl:
Publisher:
release-python.yml on GBeurier/pls4all
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pls4all-0.97.1-py3-none-win_amd64.whl -
Subject digest:
0ea54ca2ebf1e6a4c06f9b62a7781fd897c57c7a28ef5c8bec0356ee487ceaa8 - Sigstore transparency entry: 1573281803
- Sigstore integration time:
-
Permalink:
GBeurier/pls4all@b12d7408b72bac8682d6839f6181dc83d5300362 -
Branch / Tag:
refs/tags/v0.97.1 - Owner: https://github.com/GBeurier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b12d7408b72bac8682d6839f6181dc83d5300362 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pls4all-0.97.1-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pls4all-0.97.1-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1bcc092f83b79b2b84b61b09c72b35a5a2da858d50e188f772f5ec99649499d
|
|
| MD5 |
0c58aa42a9e8a592d21bf9747fe6e337
|
|
| BLAKE2b-256 |
53e2995e2236c7eefcb6ad22d408dc60089241557edf1c2927f0152c17cfa623
|
Provenance
The following attestation bundles were made for pls4all-0.97.1-py3-none-musllinux_1_2_x86_64.whl:
Publisher:
release-python.yml on GBeurier/pls4all
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pls4all-0.97.1-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
e1bcc092f83b79b2b84b61b09c72b35a5a2da858d50e188f772f5ec99649499d - Sigstore transparency entry: 1573281833
- Sigstore integration time:
-
Permalink:
GBeurier/pls4all@b12d7408b72bac8682d6839f6181dc83d5300362 -
Branch / Tag:
refs/tags/v0.97.1 - Owner: https://github.com/GBeurier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b12d7408b72bac8682d6839f6181dc83d5300362 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pls4all-0.97.1-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: pls4all-0.97.1-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b1639e310e5225ac717825a5e7473bc9e3dd88095e37efebb081b9d7fd67459
|
|
| MD5 |
70a5270ac875dfa6db5048a37c46d279
|
|
| BLAKE2b-256 |
8d99abea47a5589af0ca96c3a95c7d6debeb7f4c0bad209db5114e1433ee73ef
|
Provenance
The following attestation bundles were made for pls4all-0.97.1-py3-none-musllinux_1_2_aarch64.whl:
Publisher:
release-python.yml on GBeurier/pls4all
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pls4all-0.97.1-py3-none-musllinux_1_2_aarch64.whl -
Subject digest:
2b1639e310e5225ac717825a5e7473bc9e3dd88095e37efebb081b9d7fd67459 - Sigstore transparency entry: 1573281935
- Sigstore integration time:
-
Permalink:
GBeurier/pls4all@b12d7408b72bac8682d6839f6181dc83d5300362 -
Branch / Tag:
refs/tags/v0.97.1 - Owner: https://github.com/GBeurier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b12d7408b72bac8682d6839f6181dc83d5300362 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pls4all-0.97.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pls4all-0.97.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b6685006821c7a445679732ffb79274d0f3c4b7f955a8e7eea13997f6281691
|
|
| MD5 |
5ad5746681cf32005e22e98f3fd4b0d7
|
|
| BLAKE2b-256 |
9197cb5b971178dab136f6f205f1710bb8e16304a4062a7613e201e98232b8f3
|
Provenance
The following attestation bundles were made for pls4all-0.97.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release-python.yml on GBeurier/pls4all
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pls4all-0.97.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
9b6685006821c7a445679732ffb79274d0f3c4b7f955a8e7eea13997f6281691 - Sigstore transparency entry: 1573281769
- Sigstore integration time:
-
Permalink:
GBeurier/pls4all@b12d7408b72bac8682d6839f6181dc83d5300362 -
Branch / Tag:
refs/tags/v0.97.1 - Owner: https://github.com/GBeurier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b12d7408b72bac8682d6839f6181dc83d5300362 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pls4all-0.97.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pls4all-0.97.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ab37177f340a509cf1f48d11c5c234a5ed87c7c5f3f994dfe0949eaa7a9f393
|
|
| MD5 |
946da650a86ad560e6a7b9e0013825c4
|
|
| BLAKE2b-256 |
1d58c8f576946c9c7c9cdab9fbfceb7343f09208647687e461ba54dec0bc9d2c
|
Provenance
The following attestation bundles were made for pls4all-0.97.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release-python.yml on GBeurier/pls4all
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pls4all-0.97.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
7ab37177f340a509cf1f48d11c5c234a5ed87c7c5f3f994dfe0949eaa7a9f393 - Sigstore transparency entry: 1573281868
- Sigstore integration time:
-
Permalink:
GBeurier/pls4all@b12d7408b72bac8682d6839f6181dc83d5300362 -
Branch / Tag:
refs/tags/v0.97.1 - Owner: https://github.com/GBeurier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b12d7408b72bac8682d6839f6181dc83d5300362 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pls4all-0.97.1-py3-none-macosx_11_0_universal2.whl.
File metadata
- Download URL: pls4all-0.97.1-py3-none-macosx_11_0_universal2.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7a79b5507fc0c194ca4b3a20ea31c3b0f3dc28b515d0f9726b90c970b256a17
|
|
| MD5 |
4a6dbae179c501baa902676251bd1b1e
|
|
| BLAKE2b-256 |
ca57ff14af731dba8bf291414147c7830f1fd85d62122cbfcea3a430918d0559
|
Provenance
The following attestation bundles were made for pls4all-0.97.1-py3-none-macosx_11_0_universal2.whl:
Publisher:
release-python.yml on GBeurier/pls4all
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pls4all-0.97.1-py3-none-macosx_11_0_universal2.whl -
Subject digest:
c7a79b5507fc0c194ca4b3a20ea31c3b0f3dc28b515d0f9726b90c970b256a17 - Sigstore transparency entry: 1573281895
- Sigstore integration time:
-
Permalink:
GBeurier/pls4all@b12d7408b72bac8682d6839f6181dc83d5300362 -
Branch / Tag:
refs/tags/v0.97.1 - Owner: https://github.com/GBeurier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b12d7408b72bac8682d6839f6181dc83d5300362 -
Trigger Event:
push
-
Statement type: