Note: This solution is since Tastypie 0.9.13 dated, take a look at mkubenka's solution instead. I was developing a mobile app and wanted to take advantage of tastypies apikey authentication, and had a hard time finding a example implmenentation. So here it goes, a quick example of a api resource for apikey, using Basic Auth for authentication. Request url looks something like this (bare in mind everything except /token/auth/ is matter of your settings).
The json response will look like this.
  "key" : "128dhsabh2jbyhasd91uundsa1"
Got any ideas on improvement? Fork it. Update: It seems like GitHub has for some reason set all my gist files to private mode. I will get to the bottom of this!