Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python web service ...

Reply
Thread Tools

Python web service ...

 
 
nicolasg@gmail.com
Guest
Posts: n/a
 
      08-26-2006
Hi folks, I have accomplished to make a python program that make some
image manipulation to bmp files.
I now want to provide this program as a web service. A user can visit a
site and through a web interface he should upload the file to the web
server , the server then will do the image process with the python
program I have wrote and when it finish the user must get the image
file back .

My question is how difficult is to set up a web server that can run
python easy ? should I try ZOPE or there is something better in mind ?

 
Reply With Quote
 
 
 
 
Ramon Diaz-Uriarte
Guest
Posts: n/a
 
      08-26-2006
On 26 Aug 2006 04:07:35 -0700, <> wrote:
> Hi folks, I have accomplished to make a python program that make some
> image manipulation to bmp files.
> I now want to provide this program as a web service. A user can visit a
> site and through a web interface he should upload the file to the web
> server , the server then will do the image process with the python
> program I have wrote and when it finish the user must get the image
> file back .
>
> My question is how difficult is to set up a web server that can run
> python easy ? should I try ZOPE or there is something better in mind ?
>


For a one-shot thing, plain old CGI might be enough. You can have a
static HTML page with the form for the upload, have python do the
image part, and generate the return HTML with the image with a python
script. If you plan to do this a lot, or want fairly sophisticated
stuff, or DB access underneath, authentication, etc, then you might
want to look at any of the web framewoks. If you don't have the web
server part already taken care of (e.g., you already have Apache up
and running) then the web server framework can be more attractive.

As for web frameworks there is a long list in the Python web site.
Which framework fits you best might depend on what you want to
accomplish now and in the future. You can try something simple and
minimalist (and with docs that you can read in less than an afternoon)
such as Karrigell, or try something more complex, such as Django,
TurboGears, Pylons, CherryPy, etc.

And then, you might try the CGI approach to begin with, and as your
needs become more complex, move to a framework. (This has been our own
path: we've used plain CGI for over a year for the web-based
bioinformatics applications we've developed, that use R and Python for
computations, and are now moving to framework).

Good luck!

R.

--
Ramon Diaz-Uriarte
Bioinformatics Unit
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz
 
Reply With Quote
 
 
 
 
NicolasG
Guest
Posts: n/a
 
      08-26-2006
> For a one-shot thing, plain old CGI might be enough. You can have a
> static HTML page with the form for the upload, have python do the
> image part, and generate the return HTML with the image with a python
> script. If you plan to do this a lot, or want fairly sophisticated
> stuff, or DB access underneath, authentication, etc, then you might
> want to look at any of the web framewoks. If you don't have the web
> server part already taken care of (e.g., you already have Apache up
> and running) then the web server framework can be more attractive.
>
> As for web frameworks there is a long list in the Python web site.
> Which framework fits you best might depend on what you want to
> accomplish now and in the future. You can try something simple and
> minimalist (and with docs that you can read in less than an afternoon)
> such as Karrigell, or try something more complex, such as Django,
> TurboGears, Pylons, CherryPy, etc.
>
> And then, you might try the CGI approach to begin with, and as your
> needs become more complex, move to a framework. (This has been our own
> path: we've used plain CGI for over a year for the web-based
> bioinformatics applications we've developed, that use R and Python for
> computations, and are now moving to framework).
>
> Good luck!
>
> R.
>
> --
> Ramon Diaz-Uriarte


At this time right now I prefer to do something that works the quickest
possible...
I never had any experience with CGI, do I need to set up a web server
for that ?
can you point me some usefull reading material so I can get a start ?
I will post for a comment at Zope , I had installed once and it was
very easy. Don't know if it will be easy too to get my job done...

Gracias Ramon.

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      08-26-2006
> At this time right now I prefer to do something that works the quickest
> possible...
> I never had any experience with CGI, do I need to set up a web server
> for that ?
> can you point me some usefull reading material so I can get a start ?
> I will post for a comment at Zope , I had installed once and it was
> very easy. Don't know if it will be easy too to get my job done...


If you need a quick-start and short learning curve, Karrigell is the
one to go for. You can have the beginnings of your own site/web-app
running within minutes of downloading it.

It now has better CGI handling too - if you must go that route

www.karrigell.com

I recommend the Karrigell tour also, click on the icon next to each
example to see how each one is coded, and it has a file upload example
that should get you started.

http://karrigell.no-ip.info/demo/frame_tour_en.htm


 
Reply With Quote
 
Ravi Teja
Guest
Posts: n/a
 
      08-26-2006

Tim Williams wrote:
> > At this time right now I prefer to do something that works the quickest
> > possible...
> > I never had any experience with CGI, do I need to set up a web server
> > for that ?
> > can you point me some usefull reading material so I can get a start ?
> > I will post for a comment at Zope , I had installed once and it was
> > very easy. Don't know if it will be easy too to get my job done...

>
> If you need a quick-start and short learning curve, Karrigell is the
> one to go for. You can have the beginnings of your own site/web-app
> running within minutes of downloading it.
>
> It now has better CGI handling too - if you must go that route
>
> www.karrigell.com
>
> I recommend the Karrigell tour also, click on the icon next to each
> example to see how each one is coded, and it has a file upload example
> that should get you started.
>
> http://karrigell.no-ip.info/demo/frame_tour_en.htm
>
>


I second Karrigell on simplicity. Zope despite recent improvements,
still has a steep learning curve.

 
Reply With Quote
 
iapain
Guest
Posts: n/a
 
      08-26-2006
> My question is how difficult is to set up a web server that can run
> python easy ? should I try ZOPE or there is something better in mind ?


Just install Apache and run Python as CGI thats the best solution I
found for my apps. Thats the best and faster way to move python apps on
web.

 
Reply With Quote
 
Ramon Diaz-Uriarte
Guest
Posts: n/a
 
      08-26-2006
On 26 Aug 2006 09:12:50 -0700, NicolasG <> wrote:
> > For a one-shot thing, plain old CGI might be enough. You can have a
> > static HTML page with the form for the upload, have python do the
> > image part, and generate the return HTML with the image with a python
> > script. If you plan to do this a lot, or want fairly sophisticated
> > stuff, or DB access underneath, authentication, etc, then you might
> > want to look at any of the web framewoks. If you don't have the web
> > server part already taken care of (e.g., you already have Apache up
> > and running) then the web server framework can be more attractive.
> >
> > As for web frameworks there is a long list in the Python web site.
> > Which framework fits you best might depend on what you want to
> > accomplish now and in the future. You can try something simple and
> > minimalist (and with docs that you can read in less than an afternoon)
> > such as Karrigell, or try something more complex, such as Django,
> > TurboGears, Pylons, CherryPy, etc.
> >
> > And then, you might try the CGI approach to begin with, and as your
> > needs become more complex, move to a framework. (This has been our own
> > path: we've used plain CGI for over a year for the web-based
> > bioinformatics applications we've developed, that use R and Python for
> > computations, and are now moving to framework).
> >
> > Good luck!
> >
> > R.
> >
> > --
> > Ramon Diaz-Uriarte

>
> At this time right now I prefer to do something that works the quickest
> possible...
> I never had any experience with CGI, do I need to set up a web server
> for that ?


Yes, you'd need to configure a web server. I don't know whether you
are on windows or Unix/Linux, and that could seriously affect how easy
it is to set up a web server. Most Linux distros make installing
apache a piece of cake, but configuring Apache might not be trivial.

Thus, maybe the fastest and easiest is, as other posters have
suggested, to try Karrigell.


> can you point me some usefull reading material so I can get a start ?
> I will post for a comment at Zope , I had installed once and it was
> very easy. Don't know if it will be easy too to get my job done...
>


But Zope seems to have a steep learning curve and it is a big system.
It might be a huge hassle for what you want.

Best,

R.
 
Reply With Quote
 
=?iso-8859-1?q?Luis_M._Gonz=E1lez?=
Guest
Posts: n/a
 
      08-27-2006

wrote:
> My question is how difficult is to set up a web server that can run
> python easy ? should I try ZOPE or there is something better in mind ?


I also second the suggestion of using Karrigell.
It comes with its own built-in server, and the task would be as simle
as writing the script and starting the server.

If performance and scalability is an issue, you could try mod_python,
which is an Apache module for running python, but this would require
installing and configuring Apache and mod_python separately.

luis

 
Reply With Quote
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      08-28-2006
a écrit :
> Hi folks, I have accomplished to make a python program that make some
> image manipulation to bmp files.
> I now want to provide this program as a web service. A user can visit a
> site and through a web interface he should upload the file to the web
> server , the server then will do the image process with the python
> program I have wrote and when it finish the user must get the image
> file back .
>
> My question is how difficult is to set up a web server that can run
> python easy ? should I try ZOPE or there is something better in mind ?


Unless you have other compelling reasons to use Zope, you would be
better IMHO with either CGI, apache+mod_python, or a standalone Python
web server like CherryPy.

 
Reply With Quote
 
Jorge Vargas
Guest
Posts: n/a
 
      08-28-2006
On 26 Aug 2006 04:07:35 -0700, <> wrote:
> Hi folks, I have accomplished to make a python program that make some
> image manipulation to bmp files.
> I now want to provide this program as a web service. A user can visit a
> site and through a web interface he should upload the file to the web
> server , the server then will do the image process with the python
> program I have wrote and when it finish the user must get the image
> file back .
>
> My question is how difficult is to set up a web server that can run
> python easy ? should I try ZOPE or there is something better in mind ?


is that webservice or webserver?
if webservice try ZSI of it's a webserver why don't you try CherryPy?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does timer in Web Service Global.asax block my Web Service from processing web-site requests? Leo Violette ASP .Net Web Services 0 04-17-2009 12:39 AM
'web service call failed: 500' using ajax hovermenu and web service Not Me ASP .Net 1 06-05-2007 03:09 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM
Web Service that calls an external Web Service Isaias Formacio Serna ASP .Net Security 5 02-02-2004 07:38 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57