{ "info": { "author": "Eric Davis", "author_email": "ed@npri.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet" ], "description": "=============\ndjango-carson\n=============\n\ndjango-carson makes it easy to store and display tweets from a set of\nusers or tweets about a given topic.\n\nFor an idea of how django-carson can be used, take a look at\nTweetNevada_.\n\nThe basic idea is you'll have a set of Twitter accounts you want to\nfollow (e.g., Nevada lawmakers) and a set of common hashtags and/or\nkeywords (e.g., ``#nvleg``) used by the community to engage in a\ncollective conversation about a given topic. When combined on the\nsame page, you get a very interesting and dynamic conversation taking\nplace.\n\nGetting Started\n---------------\n\n#) Install django-carson::\n\n $ mkvirtualenv --no-site-packages example_website\n $ pip install django-carson\n\n#) Add ``carson`` to your ``INSTALLED_APPS``\n\n#) Create the database tables with ``syncdb`` (or ``migrate carson`` if you\n use South_)\n\n#) To access the `Twitter Streaming API`_, you must first create the\n appropriate tokens.\n\n First, `create a new application`_. Then, click \"Create my access\n token.\"\n\n Add the following values to ``settings.py``\n\n - \"Consumer key\" \u2192 ``CONSUMER_KEY``\n - \"Consumer secret\" \u2192 ``CONSUMER_SECRET``\n - \"Access token\" \u2192 ``TOKEN_KEY``\n - \"Access token secret\" \u2192 ``TOKEN_SECRET``\n\n#) Via the `admin interface`_, add your accounts and hashtags/keywords.\n\n **Note:** You're not required to add both accounts and\n hashtags/keywords. If you want, you could design a site that only\n stored hashtag mentions or only tweets sent by your given set of\n users.\n\n#) If you added any accounts, you must either run ``./manage.py\n lookup_twitter_ids`` or use the \"Lookup Twitter IDs\" admin action\n before the next step will work. If you only added hashtags or\n keywords, you don't need to do this.\n\n#) Finally, run::\n\n $ ./manage.py get_tweets\n\n This will open a connection to the Twitter Streaming API and\n immediately after one of your accounts posts a tweet or a\n tweet is created mentioning one of your tags, that tweet will be\n stored.\n\nUsage\n-----\n\ndjango-carson is only a bridge between Django and the Twitter\nStreaming API. It is the web developer's job to wire up the views and\ntemplates needed to actually display the data.\n\nThe main entry point for any developer using ``carson`` is likely to\nbe ``carson.models.Tweet``. This model holds all tweets stored with\n``get_tweets``.\n\nEach ``carson.models.Tweet`` object has four attributes:\n\n **account**\n A ForeignKey pointing to the ``carson.models.Account`` that\n created the tweet, if applicable. Will be ``None`` if the tweet\n didn't come from an account listed in ``carson.models.Account``.\n\n **timestamp**\n The UTC timestamp of the tweet.\n\n **status_id**\n The unique status id for each tweet. This is also in data['id'],\n but this allows an index to be created for it.\n\n **data**\n Stores the complete JSON_ object associated with the tweet. You\n can see what all is included in this attribute `here `_.\n\nAttached to ``carson.models.Tweet`` are three managers:\n\n **objects**\n Returns a ``QuerySet`` of all tweets\n\n **trusted**\n Returns only the tweets associated with a\n ``carson.models.Account``. In other words, ``Tweet.account != None``.\n\n **untrusted**\n Returns only the tweets not associated with a\n ``carson.models.Account``. In other words, ``Tweet.account ==\n None``.\n\nA simple index view exists in ``carson.views.index`` which grabs the\n20 most recent trusted and untrusted tweets and renders\n``carson/index.html`` (with the context variables ``trusted`` and\n``untrusted``). Might be useful if your website isn't too complex.\n\nIf you seem to be having problems accessing the Twitter API, you can\nset ``HTTP_DEBUG`` to ``True`` in ``settings.py``. By default it is\n``False``.\n\n.. _create a new application: https://dev.twitter.com/apps/new\n.. _admin interface: http://localhost:8000/admin/carson/\n.. _Twitter Streaming API: https://dev.twitter.com/docs/streaming-api\n.. _TweetNevada: http://tweetnevada.com/\n.. _JSON: http://en.wikipedia.org/wiki/JSON\n.. _South: http://south.aeracode.org/\n\nChangelog\n---------\n\n**0.2 (October 5th, 2011)**\n - Use SSL for Streaming and REST APIs\n - Document and test some utility methods\n - Use `requests `_ for\n REST API calls\n\n**0.1 (August 9th, 2011)**\n - Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/edavis/django-carson", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-carson", "package_url": "https://pypi.org/project/django-carson/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-carson/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/edavis/django-carson" }, "release_url": "https://pypi.org/project/django-carson/0.2/", "requires_dist": null, "requires_python": null, "summary": "Easily store and display tweets from a set of users or tweets about a given topic", "version": "0.2" }, "last_serial": 748585, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "89694f25f5df9b17d26ec531cfa84e20", "sha256": "6e40bd0f765b71f97e28ff3aad289ec53506ca777fea53cbdc57331909ca43c8" }, "downloads": -1, "filename": "django-carson-0.1.tar.gz", "has_sig": false, "md5_digest": "89694f25f5df9b17d26ec531cfa84e20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10825, "upload_time": "2011-08-09T20:16:39", "url": "https://files.pythonhosted.org/packages/e2/0a/5c48568fe971fa7369ca1c78267e26da52b821c72e09cc8b35bdb2d957b1/django-carson-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "597ba54b950e425f35720a7a56d6fffd", "sha256": "118c440965c4ad97f92e8cf33df3a4513b044b4d537a0ead8d02cb21a89e8507" }, "downloads": -1, "filename": "django-carson-0.2.tar.gz", "has_sig": false, "md5_digest": "597ba54b950e425f35720a7a56d6fffd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11899, "upload_time": "2011-10-05T22:49:25", "url": "https://files.pythonhosted.org/packages/64/98/56e863626d52b0abde13b74c3a9131799d22937435dc132ef7633a71a84e/django-carson-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "597ba54b950e425f35720a7a56d6fffd", "sha256": "118c440965c4ad97f92e8cf33df3a4513b044b4d537a0ead8d02cb21a89e8507" }, "downloads": -1, "filename": "django-carson-0.2.tar.gz", "has_sig": false, "md5_digest": "597ba54b950e425f35720a7a56d6fffd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11899, "upload_time": "2011-10-05T22:49:25", "url": "https://files.pythonhosted.org/packages/64/98/56e863626d52b0abde13b74c3a9131799d22937435dc132ef7633a71a84e/django-carson-0.2.tar.gz" } ] }