Coder Social home page Coder Social logo

quyetnguyen0989 / pritunl-api-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ijat/pritunl-api-python

0.0 1.0 0.0 26 KB

A simple Pritunl API wrapper based on https://pritunl.com/api.html

License: MIT License

Shell 4.81% Python 95.19%

pritunl-api-python's Introduction

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.

pritunl-api-python's People

Contributors

ijat avatar quyetnguyen0989 avatar xenonpk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.