This library is deprecated, as Fire Eagle no longer exists
django_fireeagle package contains code to handle the Fire Eagle authorisation process within Django. You can use it to manage connections between Django users and their respective Fire Eagle access tokens.
To install, check the code out using this and place django_fireeagle somewhere on your Python path.
The Django Fire Eagle package consists of:
- Views to handle instigation and completion of Fire Eagle authorisation.
- A database model to persist Fire Eagle access tokens.
The package also depends on the availability of Django’s session support.
Having ensured the
django_fireeagle packages are available on your Python path, you can add Fire Eagle interaction to your application by doing the following:
- Run the command
manage.py syncdbto create the necessary tables.
- Add the following views to your urlconf:
( r'fire-eagle/$', 'django_fireeagle.views.begin' ), ( r'fire-eagle/finalise/$', 'django_fireeagle.views.finalise' ),
- Set the callback URL in Fire Eagle to point to
You will then be able to browse to
yoursite.com/fire-eagle/ to associate your logged-in Django user to a Fire Eagle account
Accessing Fire Eagle
To interact with Fire Eagle on behalf of the current user:
// Retrieve the current user's Fire Eagle OAuth token fe_user = FireEagleUser.objects.get( user=request.user ) request_token = fe_user.get_fire_eagle_token() // Instantiate a Fire Eagle instance using our app's token fe = FireEagle( getattr( settings, 'FIREEAGLE_CONSUMER_KEY' ), getattr( settings, 'FIREEAGLE_CONSUMER_SECRET' ) ) // Make calls to the Fire Eagle API! fe_user = fe.user( request_token )
To use the included example:
- Create a test application on Fire Eagle, with the callback URL pointing to
- Fill the
settings.pywith the values for your Fire Eagle application.
python manage.py syncdbin the project’s directory, and create a user.
python manage.py runserverto start the app.
- Navigate to
http://127.0.0.1:8000/, and follow the steps.