background preloader

Google AppEngine

Facebook Twitter

Mail Python API Overview - Google App Engine. App Engine applications can send email messages on behalf of the app's administrators, and on behalf of users with Google Accounts.

Mail Python API Overview - Google App Engine

Apps can receive email at various addresses. Apps send messages using the Mail service and receive messages in the form of HTTP requests initiated by App Engine and posted to the app. Sending mail in Python The mail.send_mail() function sends an email message from the application. The From: address can be the email address of a registered administrator (developer) of the application, the current user if signed in with Google Accounts, or any valid email receiving address for the app (that is, an address of the form string@appid.appspotmail.com). The following example sends an email message to the user as confirmation that the user created a new account with the application: import webapp2from google.appengine.api import mail class ConfirmUserSignup(webapp2.RequestHandler): def post(self): user_address = self.request.get("email_address") %s""" % confirmation_url.

Using Google App Engine as Your Own Content Delivery Network. Do you remember, years ago, when hosting was expensive, domain names were the province of the rich, and you hosted your web pages on Geocities?

Using Google App Engine as Your Own Content Delivery Network

It seems odd to me now that there was a time when each and every geek didn’t have his own top-level domain and super hosting setup. But as the parts became more and more affordable a man could become an outcast if he didn’t have his own slightly surreal-sounding TLD. And so it will be in the future when people realise with surprise there was a time before affordable content delivery networks. A content delivery network, or CDN, is a system of servers spread around the world, serving files from the nearest physical location.

Instead of waiting for a file to find its way from a server farm in Silicon Valley 8,000 kilometres away, I can receive it from London, Dublin, or Paris, cutting down the time I wait. There’s a service out there ready for you to use as your very own CDN. Creating your first Google App Engine project Done that? Version: 1. RESTful File Upload for AppEngine. Google's AppEngine is an awesome platform for simple web apps.

RESTful File Upload for AppEngine

Unfortunately one of the more glaring limitations is the lack of filesystem access. Fortunately, their robust data storage API can make up for the omission in many cases. The Use Case I wanted to have integrated image hosting for this blog so I wrote a REST handler to upload and serve image files for GAE's Python API. The Code Google's Appengine documentation actually provides the meat of the datastore code.

First, a simple data model, very similar to the AppEngine documentation example: Handling file uploads in App Engine. Posted by Nick Johnson | Filed under tech, app-engine, cookbook, coding This is the ninth in a series of 'Cookbook' posts describing useful strategies and functionality for writing better App Engine applications.

Handling file uploads in App Engine

One issue that comes up frequently on the App Engine groups is how to handle file uploads from users. Part of the confusion arises from the fact that App Engine apps cannot write to the local filesystem. Fortunately, the Datastore comes to the rescue: We can easily write an app that accepts file uploads and stores them in the datastore, then serves them back to users. To start, we need an HTML form users can upload files through: <html><head> <title>File Upload</title></head><body> <form method="post" action="/"> <input type="file" name="file" /> <input type="submit" value="Upload" /> </form></body></html> We'll also need a datastore model we can store the uploaded file in: And finally, a Request Handler that can handle the uploads: def main(): run_wsgi_app(application)

App-Engine (Java) File Upload. Java Padawan on J2ME and Android: GWT: Creating a simple File hosting site.