Paul's Programming Notes     Archive     Feed     Github

Eventbrite "Application Key Error"

The error message looks like this:
{u'status': {u'http_code': 200}, u'contents': {u'error': {u'error_type': u'Application Key Error', u'error_message': u'Please provide your Application Key in the URL as "?app_key=<APP_KEY>".'}}}

After a few hours of trying to get past the Eventbrite API's "Application Key Error". I finally figured out that I needed to switch my request URL from:
"https://developer.eventbrite.com/json/event_new"
to:
"https://www.eventbrite.com/json/event_new"

Override get_query based on GET parameter - Flask-Admin

This will change the results in a flask-admin index view based on GET parameters. In most cases, using filters to do this is probably a better idea.

Changing A Single GET Parameter In Request - Flask

SQLAlchemy Performance Tip

http://www.mobify.com/blog/sqlalchemy-memory-magic/

"If you can process the results of database queries iteratively (and very often you can), stream the results"

"Since the data needs to travel over the network from the database whether it's streamed or not, this doesn't add a huge overhead, but we'll see that it reduces memory requirements."

Example (using Flask-SQLAlchemy):
db.engine.execution_options(stream_results=True).execute(query)

However, that's not the full story when it comes to MySQLdb (MySQL-python). http://stackoverflow.com/a/3699677

If you're going to do this with mysql, I recommend using oursql: https://pypi.python.org/pypi/oursql