How to write a Web Service for Google App Engine? [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am really new to Python and I have been looking for an example on how to write a Web Service (XML - SOAP) in Python with Google App Engine with no luck.
Can anyone point me to an article or give me an example on how to do this?

I was curious about this myself and not finding anything I decided to try to get something to work. The short answer is that it turns out a SOAP service can actually be done using the latest alpha ZSI library. However it isn't simple and I didn't do much more than a simple request so it could fall apart with a complex type. I'll try to find time to write a tutorial on how to do it and edit this answer with more detail.
Unless this is a hard requirement I would do what jamtoday says and go with a REST or RPC service. The SOAP way could be filled with trouble.
Update: For anyone interested I've written a tutorial on how to deploy a SOAP service to the Google App Engine. It is long process so I'm just linking to it instead of pasting it all here.

If you want to do something with App Engine specifically, there are libraries that will make it much faster on your end. I'd recommend looking at the XML-RPC and REST examples.
http://appengine-cookbook.appspot.com/recipe/xml-rpc-server-using-google-app-engine/
http://github.com/fczuardi/gae-rest/tree/master

I know this is an old thread but just in case if someone happens to read this.
I have just start an open source project for creating web services on GAE.
Project site: http://code.google.com/p/webserviceservlet/
Hope this is helpful.
EDIT:
Just noticed that this is a python question and the link project is java project....

Here is a Python Web Services project that might be helpful.
EDIT
And here is a SOAP consuming demonstration....

You could take a look at the Bottle framework. It's a Python framework which with you can easily create a REST api.
In my opinion, REST is definitely better than SOAP. It can be easily consumed by any software able to speak http, and it's faster to implement.

Related

mysql to pdf - python or ruby [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
i have a mysql database that i'd like to query. i would like to format the results a certain way, then turn it into a pdf. in the past, i used PHP and FPDF, while it worked, it was a pain and tedious. i don't think PHP can handle this sort of thing. i don't have much experience in python or ruby but this would be a great project to do in either language so i can get more familiar. it doesn't have to be web based. it can be desktop script that i could run with a cron or manually. hope someone can point me to some resources. thanks.
In Ruby you have a number of options for your PDF authoring, and your DB management is very easy if you use the ActiveRecord library (comes with Rails) or Sequel to read or write data.
Complete and heavy duty PDF authoring can be done using Prawn... it requires some studying, but it's an amazing library.
You can also create HTML web pages and convert them into PDF using the wicked_pdf gem, which is quite simple to use.
Or, you can combine it all, or write simple PDF's with simple tables and text using the combine_pdf, which is as easy as it gets and also allows you to use PDF templates (so you can have a well designed template and just add the text you need).
I love Ruby and I think it's very easy to learn. Plus, it has more applications than just web programming - there's even a project called RubyMotion which lets you program native applications for iOS and Android using Ruby!
I'm sure you'll love Ruby.
In Python, you can use pyPdf to create PDF files. As for the querying a mySQL DB, you can use mySQLdb. Installing it is slightly harder than other modules, but once you have done so, it's just like any other sql package. Hope it helped.

Is there any URL info / meta data webservice API? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there any known URL info API which will provide data like title, description, content-type, image etc? I researched a bit but have not come across any such API. Eventually, I have ventured out creating something like from scratch.
The consumption of such API can be for various web apps which need to display URL information. A typical real world example is Facebook using something similar when you share / attach a link in a status update.
Suggestions welcomed as it will save me the effort of maintaining such a webservice myself.
Edit:
Found two good sources which can be helpful
Protonet - The Art Of Turning URLs Into A User Readable Preview
Using YQL to do a quick fetch
Iframely web service
Edit:
After much research and to address my specific use-case, I created my own API that is hosted on Google App Engine for this. Someone looking for this, may get in touch.
There's no such API to the best of my knowledge, simply because accessing such an API wouldn't be much simpler than just fetching the page itself.
I like the idea and I think you should try to implement it and "sell" it to other web developers. Of course there will be a trust issue -- will they trust you not to lie?

python RESTful webservice framework: roll my own or is there a recommended library? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
I need to write a python webservice, but I would rather use a LIGHT WEIGHT framework (no one mention Django please), so that I can cater for more complicated scenarios in the future.
Is there a (peer) recommended library that I can use or at least can provide a good starting point?
[Edit]
To clarify, I am talking about a RESTful web service here - nothing to do with SOAP and/or WSDL
Try Pyramid, which is the result of a merger between the Pylons and repoze.bfg frameworks. It's relatively lightweight, yet robust and well-documented.
For RESTful services in Pyramid, you might find this blog post interesting.
I suggest you look at Cherry Py. http://cherrypy.org/
I was in a similar situation looking for lightweight, and tired of Django. I came across web.py, which seems to be as lightweight as it can get.
web.py main site: http://webpy.org/
web.py github: https://github.com/webpy/webpy
web2py may be of interest. It includes support for web services and has recently added RESTful API functionality, described here (video) and here. If you have any questions, ask on the mailing list.
Eve is an open source Python REST API Framework powered by Flask, MongoDB and Redis. It allows you to effortlessly build and deploy highly customizable, fully featured RESTful Web Services.
[disclaimer: I am the project author]

Open source Twitter clone (in Ruby/Python) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there any production ready open source twitter clones written in Ruby or Python ?
I am more interested in feature rich implementations, not just bare bones twitter like messages (e.g.: APIs, FBconnect, Notifications, etc)
Thanks !
I know of twissandra which is an open source clone. Of course I doubt it meets your need of feature rich implementations.
http://github.com/rnielsen/twetter
From their readme:
Twetter is an implementation of the twitter.com API, designed for use in situations where internet access is not available but a large number of people have twitter clients and want to tell each other what they are doing, for example a RailsCamp, where it was first developed.
The current goal is to have it work with as many third party twitter clients as possible. It has currently been tested with Twitterific, TwitterFox, and Spaz on OSX.
The following open source alternative to twitter : http://identi.ca/ is written using the the software http://status.net/ . It looks like it is written in PHP too.
Also there is http://code.google.com/p/jaikuengine/ which is a microblogging platform for google app engine. This should serve as an example for python implementation.
Also look at http://www.typepad.com/go/motion/
Found two relevant projects:
http://github.com/insoshi/insoshi
http://github.com/dmitryame/echowaves/wiki
Sadly both appear discontinued

HOWTO: Write Python API wrapper? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'd like to write a python library to wrap a REST-style API offered by a particular Web service. Does anyone know of any good learning resources for such work, preferably aimed at intermediate Python programmers?
I'd like a good article on the subject, but I'd settle for nice, clear code examples.
CLARIFICATION: What I'm looking to do is write a Python client to interact with a Web service -- something to construct HTTP requests and parse XML/JSON responses, all wrapped up in Python objects.
I can't point you to any article on how to do it, but I think there are a few libraries that can be good models on how to design your own.
PyAws for example. I didn't see the source code so I can't tell you how good it is as code example, but the features and the usage examples in their website should be a useful design model
Universal Feed Parser is not a wrapper for a webservice (it's an RSS parser library), but it's a great example of a design that prioritizes usage flexibility and hiding implementation details. I think you can get very good usage ideas for your wrapper there.
My favorite combination is httplib2 (or pycurl for performance) and simplejson. As REST is more "a way of design" then a real "protocol" there is not really a reusable thing (that I know of). On Ruby you have something like ActiveResource. And to be honest, even that would just expose some tables as a webservice, whereas the power of xml/json is that they are more like "views" that can contain multiple objects optimized for your application. I hope this makes sense :-)
This tutorial page could be a good starting place (but it doesn't contain everything you need).
You should take a look at PyFacebook. This is a python wrapper for the Facebook API, and it's one of the most nicely done API's I have ever used.
You could checkout pythenic jobs, a nice, simple, but well-formed "Python wrapper around the Authentic Jobs ... API" as a good example. That's what I'm doing now :)

Categories

Resources