Beginner info
3 posts
• Page 1 of 1
Beginner info
I am trying to understand the basics for setting up a Python wsgi app under Zoo.
With some other frameworks such as the native Python one or CherryPy, there are docs
outlining all that must be done and the reserved method names for example that are
looked for.
I have not found any such docs and I am at a loss. For example, with Spyne and the
soap sample at https://github.com/arskom/spyne/blob/ma ... ld_soap.py
how would someone refactor the existing server out to allow Zoo to serve the requests?
Thanks for any guidance!
With some other frameworks such as the native Python one or CherryPy, there are docs
outlining all that must be done and the reserved method names for example that are
looked for.
I have not found any such docs and I am at a loss. For example, with Spyne and the
soap sample at https://github.com/arskom/spyne/blob/ma ... ld_soap.py
how would someone refactor the existing server out to allow Zoo to serve the requests?
Thanks for any guidance!
Re: Beginner info
Hello,
Zoo module supports standard way to run python apps - WSGI.
You must export wsgi application object in wsgi.py file:
and then set path to this application in Zoo envs in web.config:
Here is a zip with working web site based on example you provided with all dependencies (spyne, lxml) and settings (wsgi, web.config):
https://dl.dropboxusercontent.com/u/567440/helicon/ZooPythonProject1.zip
Request the url http://<your url>/?wsdl to check the soap app is working.
Thanks.
Zoo module supports standard way to run python apps - WSGI.
You must export wsgi application object in wsgi.py file:
- Code: Select all
spyne_application = Application([HelloWorldService], 'spyne.examples.hello.soap',
in_protocol=Soap11(validator='lxml'),
out_protocol=Soap11()
)
application = WsgiApplication(spyne_application)
and then set path to this application in Zoo envs in web.config:
- Code: Select all
<heliconZoo>
<application name="python.project" >
<environmentVariables>
<add name="VIRTUAL_ENV" value="%APPL_PHYSICAL_PATH%\venv" />
<add name="PATH" value="%APPL_PHYSICAL_PATH%\venv\Scripts;%PATH%" />
<add name="PYTHONPATH" value="%APPL_PHYSICAL_PATH%\venv\lib\site-packages;%APPL_PHYSICAL_PATH%\venv\lib;%APPL_PHYSICAL_PATH%;%APPL_PHYSICAL_PATH%\project" />
<!-- generic wsgi app -->
<add name="WSGI_APP" value="wsgi.application" />
</environmentVariables>
</application>
</heliconZoo>
Here is a zip with working web site based on example you provided with all dependencies (spyne, lxml) and settings (wsgi, web.config):
https://dl.dropboxusercontent.com/u/567440/helicon/ZooPythonProject1.zip
Request the url http://<your url>/?wsdl to check the soap app is working.
Thanks.
Re: Beginner info
Wow,
That filled in a lot of blanks and was more than I had hoped for.
Can't thank you enough!
That filled in a lot of blanks and was more than I had hoped for.
Can't thank you enough!
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests