Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 1.38 KB

README.md

File metadata and controls

57 lines (33 loc) · 1.38 KB

Pritunl API client for Python 3

This is a simple api client written in Python 3. View example in example.py. Python 2 is not supported. You need to refer Pritunl api doc to get the idea on how to use this.

Basically this api client use almost same command like in the doc. For example:

Examples

  • Example 1

    (in doc) GET /server

    (this) api.server.get()

  • Example 2

    (in doc) PUT /server/:server_id/organization/:organization_id

    (this) api.server.put(srv_id='', org_id='')

  • Example 3

    (in doc) DELETE /user/:organization_id/:user_id

    (this) api.user.delete(org_id='', usr_id='')

  • Example 4

    (in doc) POST /server**

    (this) api.server.post(data={ 'name': 'new server name'})

    * If there is data available, you must pass it through data parameter.

    * Command above works well because there are template available for creating a new server.

  • Example 5

    (in doc) PUT /user/:organization_id/:user_id

    (this) api.user.put(org_id='', usr_id='', data={ 'name': 'modified org name', 'disabled': True})


This api client is not fully complete. There are some features missing, feel free to fork and pull request to add new features.

Tested working on Pritunl 1.26.1188.41.