|
|
django-syncr
Synchronize Django with the web
This project supplies everything needed to sync a Django project with several web APIs. It currently supports 4 services:
- Flickr (http://flickr.com)
- Youtube (http://youtube.com)
- del.icio.us (http://del.icio.us)
- Twitter (http://twitter.com)
UPDATE 4/17/2008 New version available in svn and in archive file format (0.35). This should fix, hopefully, all of the problems people have been having with Flickr. Please test and let me know and thanks for the feedback! Also note that you should be running Beej's flickrapi version 1.1 for flickr support.
UPDATE 4/15/2008: Sorry for the lack of updates. I have made several fixes from issues people reported and update the subversion repository. I suggest using the svn checkout instead of the packaged zip files for now. Thanks for the feedback, feel free to email me or look me up on twitter with suggestions.
DEPENDENCIES
Each syncr app has different dependencies, but generally you need Element Tree. ET is included in Python 2.5, but for older versions you need to download it from http://effbot.org/zone/element-index.htm. You also need to have django-tagging installed in your INSTALLED_APPS and on PYTHONPATH. See http://code.google.com/p/django-tagging/
The twitter app depends on python-twitter, available at: http://code.google.com/p/python-twitter/
The flickr app depends on Beej's Python flickrapi v1.1, available at: http://flickrapi.sourceforge.net/
INSTALLATION / USAGE
- Download the most recent tar file or check out the code:
- Add the syncr app to your PYTHONPATH.
- Modify your Django settings file by adding the appropriate modules to your INSTALLED_APPS. Available Django apps are:
- 'syncr.flickr'
- 'syncr.youtube'
- 'syncr.twitter'
- 'syncr.delicious'
- Use the interfaces provided in syncr.app to write scripts for synchronizing your web service data with the Django backend.
- Explore the results in the Django admin interface.
svn checkout http://django-syncr.googlecode.com/svn/trunk/ syncr
For example:
from syncr.app.flickr import FlickrSyncr
f = FlickrSyncr(API_KEY, API_SECRET)
# sync all my photos from the past week...
f.syncRecentPhotos('username', days=7)
# sync my favorite photos list
f.syncPublicFavorites('username')Pydocs of the methods available in these interfaces are here.
CHANGELOG
v0.31 (Mar 18, 2008)
- Bug fixes; now works with Python 2.3
- Changed User models for Twitter and Youtube, now users TwitterUser and YoutubeUser
v0.30 (March 18, 2008)
- Added support for Flickr EXIF data (Thanks Yash!)
- Added Flickr Geo data (latitutde, longitude and accuracy)
- These two changes will break your Flickr Photo models (ie. syncr reset flickr or use SQL to ALTER TABLE)
- Changed Twitter User model to allow Followers and Friends to be null
- Added syncPhoto method to FlickrSyncr to sync an individual photo
- Added ability to refresh individual photos by passing refresh=True to the new syncPhoto method
v0.21 (Feb 20, 2008)
- Bug fixes with FlickrSyncr and YoutubeSyncr
v0.20 (Feb 19, 2008)
- Initial release
More details and contact info on my blog announcement
