pyrmin Package¶
pyrmin JS Module¶
-
class
pyrmin(id)¶ This is the standard PyRmin class.
Methods¶
-
pyrmin.version(version)¶ Version methods return version number if no arg
- Arguments
version (string) – Set them args like you want to.
-
pyrmin.add_vendor(vendors)¶ add_vendor let’s you import only needed JS lib and CSS for your plugin
- Arguments
of string vendors (list) – You could choose in the following list
datatables
nunjucks
odometer
fileinput
chartjs
steps
icheck
chosen
swal (Deprecated by pyrmin().notify)
-
pyrmin.notify(level, title, message, hide)¶ Send an Alert Notification
- Arguments
level (string) – Alert level (error / warning / success)
title (string) – Alert Title
message (string) – Alert Message
hide (string) – Alert Auto Hide
-
pyrmin.modal(id)¶ Create a new modal
- Arguments
id (string) – Set modal ID
-
pyrmin.switchModals(fromModal, toModal)¶ Switch a n openned modal with another one
- Arguments
fromModal (string) – modal ID to hide
toModal (string) – modal ID to show
-
pyrmin.confirm(title, message, icon, ok_function, ok_args, nok_function, nok_args)¶ Send a Confirmation Notification
- Arguments
title (string) – Alert Title
message (string) – Alert Message
icon (string) – Alert Icon
ok_function (function) – OK Callback
ok_args (dict) – Arg to pass to OK Callback
nok_function (function) – Non OK Callback
nok_args (dict) – Arg to pass to Non OK Callback
-
pyrmin.load_res(href)¶ Load Ressource Files from href location
- Arguments
href (string) – CSS or JS File Location
-
pyrmin.get(url)¶ Return Data From a GET Request on URL
- Arguments
url (string) – URL to GET