|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
WSGI server pluginIf 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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: WSGI server pluginJason Baker wrote: > 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? Not to douse your fire, but that seems an awful lot like what Paste was made for... Robert Brewer fumanchu@... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: WSGI server pluginWell, 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...@...> wrote: > Jason Baker wrote: > > 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? > > Not to douse your fire, but that seems an awful lot like what Paste was > made for... > > Robert Brewer > fuman...@... You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free Forum Powered by Nabble | Forum Help |