Skip to content

Latest commit

 

History

History
 
 

python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Python Wrapper for Puccini

This is a Python library for calling Puccini. It works by using ctypes to call a shared library (.so) built from Puccini's Go code. This is done in-process, so there's no sub-process forking.

Note that we currently only support installation on 64-bit Linux.

The setup.py is designed to fetch what it needs from the Internet: it will fetch a Go compiler, fetch the Puccini sources, and then build the shared library. So there are no special prerequisites to install it.

For example, to install the latest development version via pip:

pip install git+https://github.com/tliron/puccini#subdirectory=wrappers/python

Or, if you've cloned the repository locally:

pip install wrappers/python/

For testing it's recommended to install in a virtualenv:

python -m venv env
. env/bin/activate
pip install git+https://github.com/tliron/puccini#subdirectory=wrappers/python

To build a distribution:

cd wrappers/python
./setup.py bdist

Or an egg:

./setup.py bdist_egg

The output will be in the dist/ subdirectory here.

Also see: Python examples.