Skipole WSGI generator.
skipole.py is a framework for creating wsgi applications.
A web admin interface allows the developer to create web pages containing widgets.
The developer supplies appropriate python functions to receive data and populate the widget parameters.
Skipole requires python 3.6 or later. It would normally be installed with pip, usually into a virtual environment.
If you are using Debian, you may need the Python3 version of pip to obtain packages from Pypi.
apt-get install python3-pip
If you need further information on pip and virtual environments, try:https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
Then install skipole from pypi with:
python3 -m pip install skipole
Or - if you just want to install it with your own user permissions only:
python3 -m pip install --user skipole
The framework is used to create a project, this consists of a number of template pages and Responders that together with your own code will produce a wsgi application. Responders call your functions, which populate and then return a template page consisting of HTML code and widgets.
To create a new project you would normally run:
python3 -m skipole myproj /path/to/projectfiles
You should replace 'myproj' with your preferred name for a new project. A projectfiles directory will be created with your new project 'myproj' within it.
The framework provides a web 'skiadmin' subdirectory of your project which allows you to create template pages of various types (html, css and svg) and Responders which call your Python functions defined in myproj.py
You would then run:
Then connect with a browser to localhost:8000 to view the project, and call localhost:8000/skiadmin to open an administrative site.
The main admin page.
Stop the server with ctrl-c
Typically you use the skiadmin graphical functions to create and populate your project templates with widgets, and set up the responders to accept an incoming call and route data from the call to your own code. Your code sets data into a Python object, which populates the widget fields of a target template page which is then returned to the caller.
Multiple 'responder' types are available, to handle cookies and incoming data.
You would normally copy the projectfiles directory to your server, and then the script:
Both creates the 'application' object, and serves it using a development server. To deploy your final application on a web server of your choice, you would edit myproj.py to remove the development server, and also remove the the code which adds the skiadmin project.
Deploying a web server with the application depends on your server, usually the web server has some means of importing myproj.py, and running 'application'. The Serving wsgi link on the left gives a number of examples.