/pritunl-python-sdk

Unofficial Pritunl Client Library that allows to easily interact with Pritunl API in Python.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Pritunl Python SDK

Unofficial Pritunl SDK written in Python that allows to easily interacts with Pritunl API.

Install

From dev upstream

pip install -e git+git@github.com:chaordic/pritunl-python-sdk.git@master#egg=pritunlsdk

From PyPi

pip install pritunlsdk

Dependencies

  • Self hosted pritunl
  • Valid administrator user
  • Valid token authentication

Export the following variables in environment:

export PRITUNL_API_TOKEN=<API_TOKEN>
export PRITUNL_API_SECRET=<API_SECRET>
export PRITUNL_API_URL=<PRITUNL_URL>

Usage

from pritunlsdk import pritunl

pritunl.post_pritunl_user("organization","username",user_groups=['devops','developer'])