PyPICT
Python binding library for Microsoft PICT (Pairwise Independent Combinatorial Tool).
Requirements
Microsoft PICT 3.7.1
Python 3.7 / 3.8 / 3.9 / 3.10
Installation
Wheels (binary distribution) are available for Linux (x86_64). The PICT shared library is included in wheels.
$ pip install pypict
On other platforms, you need to build from source. PICT source tree is registered as a submodule of this repository. python setup.py build_pict will run make command to build PICT shared library inside the tree. You need to manually install the shared library and command, or set path of the tree to the appropriate environment variables (PATH, LD_LIBRARY_PATH, etc.)
$ git clone --recursive https://github.com/kmaehashi/pypict.git pypict
$ cd pypict
$ python setup.py build_pict
$ pip install -U .
$ export PATH=${PWD}/pict:${PATH}
$ export LD_LIBRARY_PATH=${PWD}/pict:${LD_LIBRARY_PATH}
APIs
There are different layers of API provided in this library.
Low-level API (pypict.capi)
Low-level API provides Python functions that map to each PICT C API function.
>>> import pypict.capi
>>> task = pypict.capi.createTask()
>>> print(task)
14042112
>>> pypict.capi.deleteTask(task)
CLIDLL API (pypict.capi.execute), which accepts a PICT command line arguments and returns the output, is also available.
>>> import pypict.capi
>>> output = pypict.capi.execute(['example/example.model', '/o:2'])
>>> print(output)
Type Size Format method File system Cluster size Compression
Mirror 100 Quick FAT 2048 Off
...
Note that CLIDLL API directly writes to the stderr when warnings are generated.
You can use pypict module as a command that behaves like PICT command line tool (e.g., python -m pypict example/example.model /o:2).
High-level API (pypict.api)
High-level API wraps the low-level API to provide automatic memory management with RAII API.
>>> import pypict.api
>>> task = pypict.api.Task()
>>> task.model.add_parameter(2)
19976288
>>> task.model.add_parameter(3)
20013488
>>> list(task.generate())
[[1, 0], [0, 1], [1, 1], [0, 2], [1, 2], [0, 0]]
Command API (pypict.cmd)
Command API wraps the CLIDLL API.
>>> import pypict.cmd
>>> pypict.cmd.from_model('''
... X: 1, 2
... Y: 3, 4
... ''')
(['X', 'Y'], [['2', '4'], ['2', '3'], ['1', '4'], ['1', '3']])
Metadata
Release files for pypict 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| pypict-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64 | Details for pypict-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| pypict-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.17+ x86-64 | Details for pypict-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| pypict-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details for pypict-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| pypict-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.17+ x86-64 | Details for pypict-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
Total release size: 2.6 MB
Release files / pypict-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pypict-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 657.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
18b661f6afda9774335cd6b2ff427c85f056a9ad9c48a29973dc2670e7e16777
|
|
BLAKE2b-256 checksum How to use checksums |
6c38b0c30b5bb0d9417cfa37187ea1f84e1479ab216cb794e266b6bb6a38bd28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / pypict-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pypict-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 656.9 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6bf8ae87ec1d46d7a540070a3fea09c949906879dd2265d401c343f8879f3576
|
|
BLAKE2b-256 checksum How to use checksums |
3a2e00dc84c193d329398ed8fdb6b6ce08547bd4fd473f649e9ec81566e7ec25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / pypict-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pypict-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 659.8 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
366f775c5b17be76d946cf5efed1397cfb94105164c62a7c884823d8dfe66fa4
|
|
BLAKE2b-256 checksum How to use checksums |
5a7cecc852e203fdf39f0a7905ac727662f1c0b6f44cd30619d6d36e4a794a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / pypict-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pypict-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 624.8 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
90434b9e5acd71aa907b73e30b91010cffcfa899e6747f03c219fbc9c120c6b6
|
|
BLAKE2b-256 checksum How to use checksums |
ab1f40caa186615a5e3791d71633b818897bd02c9f5e68acbb29e8c05a70a4de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Security for pypict 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.