Google Groups Home
Help | Sign in
WSGI server plugin
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Jason Baker  
View profile
 More options Jun 27, 11:31 am
From: Jason Baker <jason.ba...@ttu.edu>
Date: Fri, 27 Jun 2008 08:31:22 -0700 (PDT)
Local: Fri, Jun 27 2008 11:31 am
Subject: WSGI server plugin
If this would be better posted to the dev list let me know.  :)

I'm working on a WSGI server for my GSOC program for the Kamaelia
project (you can find more information here:
http://edit.kamaelia.org/Developers/Projects/KamaeliaPublish).  One
thing that I was wanting to do with my server was make a few plugins
for easy integration with the various frameworks.  The idea being that
a user can make a URLs file to determine which URL should be directed
to which framework, pass a few options about where their app is
located, and then be able to run their app with a minimum of trouble.

The plugin is basically just a WSGI app that will locate the users'
app and then run it (possibly passing some configuration info).  Thus,
if a user enters something like this in their URLs file:

[cherrypy]
regex: hello
import_path: plugins.WsgiApps.cpy_app
cpy_import_path: hello
cpy_root_attribute: Root
cpy_http_path: /hello

...all the information will be passed to my plugin with "kp."
prepended in front of it in the environ variable (so that you would
have kp.regex, kp.import_path, etc.).  At any rate, here is the WSGI
app that I've got so far:  http://jason.baker.pastebin.com/d10c56e15.

All I really would like to know is if there's anything that needs to
be added, changed, removed... you get the idea.

The CherryPy specific stuff are the entries in the URLs file beginning
with cpy.  cpy_import_path represents the actual location of the
module the user wants to load, cpy_root_attribute represents the name
of the Root object in the tree, and cpy_http_path is the value to be
passed as the second argument to cherrypy.tree.mount.

This was really made to run with a basic CherryPy "hello world" type
app that was given to me by Sylvain (one of the mentors on my
project), so it's probably overly simplistic.  At any rate, back to my
original question:  what do you guys think about this?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Brewer  
View profile
 More options Jun 27, 2:07 pm
From: "Robert Brewer" <fuman...@aminus.org>
Date: Fri, 27 Jun 2008 11:07:07 -0700
Local: Fri, Jun 27 2008 2:07 pm
Subject: RE: [cherrypy-users] WSGI server plugin

Not to douse your fire, but that seems an awful lot like what Paste was
made for...

Robert Brewer
fuman...@aminus.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Baker  
View profile
 More options Jun 28, 3:34 pm
From: Jason Baker <jason.ba...@ttu.edu>
Date: Sat, 28 Jun 2008 12:34:44 -0700 (PDT)
Local: Sat, Jun 28 2008 3:34 pm
Subject: Re: WSGI server plugin
Well, the config file part yes.  And I do also have a WSGI plugin for
paste so that users may use it if they want.  But one of the primary
focuses for my project is on usability, so I wanted to take it a step
further than just having a config file for URL routing and also
include a pre-made WSGI app that will load the user's CherryPy file
without any fuss.  At least as far as I know, there isn't a way to do
that in paste.  But if I'm totally wrong, let me know.  :)

On Jun 27, 1:07 pm, "Robert Brewer" <fuman...@aminus.org> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google