caffi is the Channel Access Foreign Function Interface. It uses CFFI to call EPICS channel access library.
This package provides direct low level interface to channel access, alike the C API.
Install
EPICS dynamic libraries have been shipped with the package for Windows, Linux and macOS. But if the environment variables EPICS_BASE and EPICS_HOST_ARCH are set on macOS and Linux, those libraries under path ${EPICS_BASE}/lib/${EPICS_HOST_ARCH} will be used.
Either use pip,
$ pip install caffi
or checkout source code from the git repository,
$ git clone https://github.com/CaChannel/caffi.git $ cd caffi $ python setup.py install
Package
RPM
The SPEC file python-caffi.spec is included. Get the source tarball either from PyPI or create it by python setup.py sdist, and run:
$ rpmbuild -ta caffi-1.0.0.tar.gz
The binary and source RPM will be created. The package name is python-caffi.
Anaconda
The recipe is included.:
$ conda build conda-recipe
Documents
Latest documents are hosted at Read the Dcos.
Example
import caffi.ca as ca
status = ca.create_context()
assert status == ca.ECA.NORMAL
status, chid = ca.create_channel('catest')
assert status == ca.ECA.NORMAL
status = ca.pend_io(3)
assert status == ca.ECA.NORMAL
status = ca.put(chid, 123)
status = ca.flush_io()
status, value = ca.get(chid)
assert status == ca.ECA.NORMAL
status = ca.pend_io(3)
assert status == ca.ECA.NORMAL
assert value.get() == 123
Release files for caffi 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| caffi-1.0.4.tar.gz | 3.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| caffi-1.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 6.9 MB
Release files / caffi-1.0.4.tar.gz
| Download URL | caffi-1.0.4.tar.gz |
|---|---|
| Size | 3.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45dcb301cca98bf90f56b3d3eda4e9a2c0c1e27d47ff2761bc56db434bafd4c0
|
|
BLAKE2b-256 checksum How to use checksums |
fee2beeefde9e7d69c76ccc049fd7e593395372c8794dd57faaa8fc52013ebd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Release files / caffi-1.0.4-py2.py3-none-any.whl
| Download URL | caffi-1.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 3.5 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
befcc2618966fceac519a2933d6d984a70a1206be64a03a48642c73fe73100e3
|
|
BLAKE2b-256 checksum How to use checksums |
8948cc1115bd491ba15e0facd16bb500781d63835fcc79cc218e4399a95545da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|