This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


Skitai WSGI App Engine (SWAE) is an daemonizer using Skitai.

SWAE is a kind of branch of Medusa Web Server - A High-Performance Internet Server Architecture.

Medusa is different from most other servers because it runs as a single process, multiplexing I/O with its various client and server connections within a single process/thread.

  • Working as Web, XML-RPC and Reverse Proxy Loadbancing Server
  • HTML5 Websocket & HTTP/2.0 Implemeted
  • Multiple Worker Processes (Posix Only)

Installation / Startup

On Posix

sudo pip install skitaid
sudo -v &
sudo stop

;if everythig is OK,

sudo service skitaid start

#For auto run on boot,
sudo update-rc.d skitaid defaults
sudo chkconfig skitaid on

On Win32

pip install skitaid
cd c:\skitaid\bin -v stop (in another command prompt)

;if everythig is OK, install

#For auto run on boot, --startup auto install start

Mounting WSGI Apps and Static Directories

Here’s three WSGI app samples:

WSGI App at /var/wsgi/

def app (env, start_response):
  start_response ("200 OK", [("Content-Type", "text/plain")])
  return ['Hello World']

Flask App at /var/wsgi/

from flask import Flask
app = Flask(__name__)

def index ():
  return "Hello World"

Skitai-Saddle App at /var/wsgi/

from skitai.saddle import Saddle
app = Saddle (__name__)

def index (was):
  return "Hello World"

For mounting to SWAE, modify config file in /etc/skitaid/servers-enabled/sample.conf


; for files like images, css
/ = /var/wsgi/static

; app mount syntax is path/module:callable
/ = /var/wsgi/wsgiapp:app
/aboutus = /var/wsgi/flaskapp:app
/services = /var/wsgi/skitaiapp:app

You can access Flask app from and other apps are same.

Note: Mount point & App routing

If app is mounted to ‘/flaskapp’,

from flask import Flask
app = Flask (__name__)

@app.route ("/hello")
def hello ():
  return "Hello"

Above /hello can called,

Also app should can handle mount point. In case Flask, it seems ‘url_for’ generate url by joining with env[“SCRIPT_NAME”] and route point, so it’s not problem. Skitai-Saddle can handle obiously. But I don’t know other WSGI middle wares will work properly.

Configuration / Management

Now let’s move on to new subject about server configuration amd mainternance.


Configuration files are located in ‘/etc/skitaid/servers-enabled/*.conf’, and on win32, ‘c:\skitaid\etc\servers-enabled/*.conf’.

Basic configuration is relatively simple, so refer commets of config file. Current config file like this:

processes = 1
threads = 4
ip =
port = 5000
ssl = no
; default path is /etc/skitaid/cert
certfile =
keyfile =
passphrase = passphrase

enable_proxy = yes
static_max_age = 300
num_result_cache_max = 2000
response_timeout = 10
keep_alive = 10


/ = /apps/skipub/devel/static
/ = /apps/skipub/devel/unitest:app

Here’s configs required your carefulness.

  • processes: number of workers but on Win32, only 1 is valid
  • threads: generally not up to 4 per CPU. If set to 0, Skitai run with entirely single thread. so be careful if your WSGI function takes long time or possibly will be delayed by blocking operation.
  • num_result_cache_max: number of cache for HTTP/RPC/DBMS results
  • response_timeout: transfer delay timeout caused by network problem

Mounting With Virtual Host

New in version 0.10.5

App can be mounted with virtual host.


/ = /home/user/www/static
/ = /home/user/www/wsig:app

# exactly matching host

/ = /home/user/mydomain.www/static
/service = /home/user/mydomain.www/wsgi:app

# matched * include

/ = home/user/mydomain.any/static
/ = home/user/mydomain.any/wsgi:app

# matched * except
@ *

/ = home/user/mydomain2.any/static
/ = home/user/mydomain2.any/wsgi:app

As a result, the app location ‘/home/user/mydomain.www/’ is mounted to ‘’ and ‘’

Log Files

If Skitai run with, there’re several processes will be created.

Sample ps command’s result is:

ubuntu:~/skitai$ ps -ef | grep skitaid
root     19146 19145  0 Mar03 pts/0    00:00:11 /usr/bin/python /usr/local/bin/
root     19147 19146  0 Mar03 pts/0    00:00:05 /usr/bin/python /usr/local/bin/
root     19148 19146  0 Mar03 pts/0    00:00:03 /usr/bin/python /usr/local/bin/
root     19150 19146  0 Mar03 pts/0    00:00:00 /usr/bin/python /usr/local/bin/ --conf=sample
  • /usr/local/bin/ : Skitaid Daemon manages all Skitais sub processes
  • /usr/local/bin/ : Skitai Instance with sample.conf
  • /usr/local/bin/ : SMTP Delivery Agent
  • /usr/local/bin/ : Cron Agent

Skitai Daemon log file is located at:

  • posix: /var/log/skitaid/skitaid.log
  • win32: c:\skitaid\log\skitaid.log

To view latest 16Kb log, log

SMTP Delivery Agent log is located at:

  • posix: /var/log/skitaid/daemons/smtpda/smtpda.log
  • win32: c:\skitaid\log\daemons\smtpda\smtpda.log
  • -f smtpda log

Cron Agent log is located at:

  • posix: /var/log/skitaid/daemons/cron/cron.log
  • win32: c:\skitaid\log\daemons\cron\cron.log
  • -f cron log

If Skitai App Engine Instances config file is ‘sample.conf’, log file located at:

  • posix: /var/log/skitaid/instances/sample/[server|request|app].log
  • win32: c:\skitaid\log\instances\sample\[server|request|app].log
  • -f cron -s [server|request|app] log

To view lateset log, -f sample log

Above log is like this:

2016.03.03 03:37:41 [info] called index
2016.03.03 03:37:41 [error] exception occured
2016.03.03 03:37:41 [expt:bp1] <type 'exceptions.TypeError'>\
  index() got an unexpected keyword argument 't'\
2016.03.03 03:37:41 [info] done index

Batch Task Scheduler

New in version 0.14.5

Sometimes app need batch tasks for minimum response time to clients. At this situateion, you can use taks scheduling tool of OS - cron, taks scheduler - or can use Skitai’s batch task scheduling service for consistent app management. for this, add jobs configuration to skitaid.conf (/etc/skitaid/skitaid.conf or c:\skitaid\etc\skitaid.conf) like this.


*/2 */2 * * * /home/apps/  > /home/apps/monitor.log 2>&1
9 2/12 * * * /home/apps/ > /dev/null 2>&1

Taks configuarion is same with posix crontab.

Cron log file is located at /var/log/skitaid/daemons/cron/cron.log or c:skitaidlogdaemonscroncron.log

Running Skitai as HTTPS Server

Simply config your certification files to config file (ex. /etc/skitaid/servers-enabled/sample.conf).

ssl = yes
; added new key
certfile = server.pem
; you can combine to certfile
; keyfile = private.key
; passphrase =

To genrate self-signed certification file:

openssl req -new -newkey rsa:2048 -x509 -keyout server.pem -out server.pem -days 365 -nodes

For more detail please read REAME.txt in /etc/skitaid/cert/README.txt

Note For Python 3 Users


SWAE will be executed with /usr/bin/python (mostly symbolic link for /usr/bin/python2).

For using Python 3.x, change skitaid scripts’ - /usr/local/bin/sktaid*.py - first line from #!/usr/bin/python to #!/usr/bin/python3. Once you change, it will be kept, even upgrade or re-install skitai.

In this case, you should re-install skitai and requirements using ‘pip3 install …’.


Change python key value to like c:\python34\python.exe in c:\skitaid\etc\skitaid.conf.

Skitai with Nginx / Squid

From version 0.10.5, Skitai supports virtual hosting itself, but there’re so many other reasons using with reverse proxy servers.

Here’s some helpful sample works for virtual hosting using Nginx / Squid.

If you want 2 different and totaly unrelated websites:


And make two config in /etc/skitaid/servers-enabled

  • jeans.conf using port 5000
  • carsales.conf using port 5001

Then you can reverse proxying using Nginx, Squid or many others.

Example Squid config file (squid.conf) is like this:

http_port 80 accel

cache_peer parent 5000 0 no-query originserver name=jeans
acl jeans-domain dstdomain
http_access allow jeans-domain
cache_peer_access jeans allow jeans-domain

cache_peer parent 5001 0 no-query originserver name=carsales
acl carsales-domain dstdomain
http_access allow carsales-domain
cache_peer_access carsales allow carsales-domain

For Nginx might be 2 config files (I’m not sure):

; /etc/nginx/sites-enabled/
server {
        listen 80;
  location / {

; /etc/nginx/sites-enabled/
server {
        listen 80;
  location / {

Change Log


Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
skitaid-0.1.tar.gz (60.8 kB) Copy SHA256 Checksum SHA256 Source Sep 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting