Skipole WSGI generator.
Please note. Development has moved to GitHub, these pages are left for a brief transfer period, please go Here for the new site.
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.2 or later. It can be installed with:
pip install skipole
Or, if you are installing at a user level:
pip install --user skipole
Please note; as skipole uses python3, currently on Debian systems this requires:
pip3 install skipole
Which may need pip3 installing with:
apt-get install python3-pip
The Downloads link on the left gives the tarballs of the project, but normally you would use the pip command above.
The framework is used to create a project, this consists of a number of 'pages' generated by the framework that together with your own code will produce a wsgi application.
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 'skiadmin' facility allowing you to create template pages of various types (html, css and svg) and also 'Responders' which are script 'pages' which call your functions defined in myproj.py
The developer runs:
Then connects with a browser to localhost:8000 to view the project, and calls localhost:8000/skiadmin to open an administrative site to add and edit folders and pages.
Stop the server with ctrl-c
'pages' are of several types, the main ones being template and responder pages. Typically you populate the templates with widgets, and set up the responders to accept an incoming call, and then route data from the call to your own code. Your code sets data into a Python dictionary, which is set into a template page and returned to the caller.
The 'Widgets' link to the PythonAnywhere site in the navigation panel takes you to a test site (still under construction) which illustrates the widgets.
Multiple 'responder page' types are available, to handle cookies and incoming data.
Both creates the 'application' object, and serves it using the python standard library wsgiref.simple_server. To deploy your final application on a web server of your choice, you would edit myproj.py to remove wsgiref.simple_server.
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 wiki at the development site (see the Documentation link in the left navigation panel) gives a number of examples.