tartrazine/python
Alex Bezzubov e6c8cf49c2 ci: fix python on macos
* bump cffi
 * add Go
2024-05-11 20:21:36 +02:00
..
enry Remove unneded todos 2020-08-11 00:29:33 +03:00
tests test: fix Python tests 2023-09-22 14:42:44 +02:00
.gitignore Cover the rest of python bindings from shared library, add tests, add docstrings, add setup.py. 2020-08-11 00:12:43 +03:00
build_enry.py Cover the rest of python bindings from shared library, add tests, add docstrings, add setup.py. 2020-08-11 00:12:43 +03:00
enry.py implement IsGenerated helper to filter out generated files 2020-05-28 08:55:13 +02:00
README.md Fix typo in the pip command in README.md 2020-11-14 23:29:53 +02:00
requirements.dev.txt ci: fix python tests on ubuntu 2024-05-11 20:09:12 +02:00
requirements.txt ci: fix python on macos 2024-05-11 20:21:36 +02:00
setup.py py: use readme as pypy description 2020-08-12 15:22:55 +02:00

Python bindings for enry

Python bindings through cFFI (API, out-of-line) for calling enry Go functions exposed by CGo wrapper.

Build

$ pushd .. && make static && popd
$ pip install -r requirements.txt
$ python build_enry.py

Will build a static library for Cgo wrapper libenry, then generate and build enry.c - a CPython extension that provides actual bindings.

Run

Example for single exposed API function is provided.

$ python enry.py

TODOs

  • helpers for sending/receiving Go slices to C
  • read libenry.h and generate ffibuilder.cdef(...) content
  • cover the rest of enry API
  • add setup.py
  • build/release automation on CI (publish on pypi)
  • try ABI mode, to avoid dependency on C compiler on install (+perf test?)