pycape is a set of Python modules for interacting with your Cape Privacy data. Using
pycape, you can:
- Create and query dataviews, or pointers to the data that you want to use to train a model using Cape's encrypted learning protocol.
- Submit and track jobs, which are computational sessions which contain instructions for how to train your model.
Access your Cape projects by creating an instance of the main
from pycape import Cape c = Cape() c.login() my_projects = c.list_projects()
Add dataviews to your project, review dataviews added by other organizations collaborating with you in the project, and submit your job.
from pycape import VerticallyPartitionedLinearRegression my_project = c.get_project("project_123") my_project.create_dataview(name="my-data", uri="s3://my-data.csv" owner_label="my-org") dvs = my_project.list_dataviews() vlr_job = VerticallyPartitionedLinearRegression( train_dataview_x=dvs, train_dataview_y=dvs, model_owner="org_123", ) my_project.submit_job(vlr_job)
- Python 3.6+
Install via pip#
We recommend that you use a Python "Virtual Environment" when running applications with
Also ensure that your developement enviroment can access the Python Package Index (PyPI) via https.
Once you've activated your virtual enviroment, use
pip to install pycape and it's dependencies:
$ pip install pycape
Licensed under Apache License, Version 2.0.