Skip to main content

An interface to libprio

Project description

python-libprio

CircleCI

A python wrapper around libprio.

This library provides low-level bindings to the reference C implementation of the Prio system and a high-level Python interface.

Build

Docker (recommended)

This project contains a pre-configured build and test environment through docker.

$ docker build -t prio .
$ docker run -it prio

This will build the package and run the tests. You can mount your working directory and shell into the container for development work.

$ docker run -v `pwd`:/app -it prio bash

Local

Refer to the Dockerfile and the libprio submodule for dependencies.

$ make
$ make test

Notes

libprio is compiled with position-independent code (fPIC). This is required for the python foreign-function interface.

Test

$ docker build -t prio . && docker run -it prio

You can avoid rebuilds by mounting your working directory and testing directly within the container.

If you want to avoid the Makefile for tests, the project uses pytest.

$ pipenv sync --dev
$ pipenv run pytest

Running examples

The wrapper_example.py includes an example of the full pipeline.

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

prio-0.1.tar.gz (198.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page