For more info on:
The data store
Python on the app engine
It all sounds great up until you ask how much does this all cost to the app developers? Nothing this good grows on trees, and that is definitely the case as shown below here:
Fixed Quotas
Quota | Limit |
Apps per Developer | 3 |
Storage per App | 500MB |
Quota | Limit |
Emails per Day | 2,000 |
Bandwidth In per Day | 10,000 MB |
Bandwidth Out per Day | 10,000 MB |
CPU Megacycles per Day | 200,000,000 |
HTTP Requests per Day | 650,000 |
Datastore API Calls per Day | 2,500,000 |
URLFetch API Calls per Day | 160,000 |
Not too bad for a small little site! The only gripe I seem to have involves getting your data out if you want to leave Google. How do you do this?! Well, at the moment you can't, and that means your completely locked in! The pricing structure goes up...too bad! Your screwed. But, it is Beta and I am willing to give them the benefit of the doubt...with dummy applications.
We've heard all about the overview, and the pricing, but what about the freakin code?! You develop these applications with SDK Google provides.
class Stock(db.Model):
ticker = db.StringProperty()
name = db.StringProperty()
price = db.FloatProperty()
class MainPage(webapp.RequestHandler):
def get(self):
stocks = Stock.all().order('-name')
if users.get_current_user():
url = users.create_logout_url(self.request.uri)
url_linktext = 'Logout'
else:
url = users.create_login_url(self.request.uri)
url_linktext = 'Login'
template_values = {
'stocks': stocks,
'url': url,
'url_linktext': url_linktext,
}
path = os.path.join(os.path.dirname(__file__), 'index.html')
self.response.out.write(template.render(path, template_values))
class StockTransaction(webapp.RequestHandler):
def post(self):
stock = Stock()
stock.ticker = self.request.get('ticker')
stock.name = self.request.get('companyname')
stock.price = float(self.request.get('price'))
stock.put()
self.redirect('/')
def main():
application = webapp.WSGIApplication(
[('/', MainPage),
('/transaction', StockTransaction)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == "__main__":
main()
{{ url_linktext }}
<table>
<thead>
<tr>
<td>Ticker</td>
<td>Name</td>
<td>Price</td>
</tr>
</thead>
<tbody>
{% for stock in stocks %}
<tr>
<td>{{stock.ticker}}</td>
<td>{{stock.name}}</td>
<td>{{stock.price}}</td>
</tr>
{% endfor %}
</tbody>
</table>
1 comment:
Hmm, very bad if you cannot get your own data back if/when you want to leave Google.
Post a Comment