{ "info": { "author": "Alen Mujezinovic", "author_email": "alen@caffeinehit.com", "bugtrack_url": null, "classifiers": [], "description": "dendrite, social connectivity as a library\n==========================================\n\nBarebones social connection library. Tries to not do everything so you\ncan do anything. Only OAuth1 and OAuth2 currently. Python 3 compatible.\n\nUsage\n-----\n\nDendrite doesn't give you any models, URLS or finished views. It's up to\nyou to define the behaviour, URLs and models. An example using Instagram\nfollows.\n\n**``models.py``**\n\nWe copy the full Instagram profile. If you don't want the full profile,\nyou can change the behaviour of ``OAuth2CallbackView.create_profile`` in\nyour views.\n\n.. code:: python\n\n class InstagramProfile(models.Model):\n id = models.CharField(max_length=255, primary_key=True)\n username = models.CharField(max_length=255, blank=True)\n full_name = models.CharField(max_length=255, blank=True)\n profile_picture = models.URLField(blank=True)\n bio = models.TextField(blank=True)\n website = models.URLField(blank=True)\n user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='instagram_profiles')\n access_token = models.CharField(max_length=255, blank=True)\n\n def __unicode__(self):\n return self.full_name\n\n**``views.py``**\n\nCreate views to handle connection. You can customize the views to behave\ndifferently.\n\n.. code:: python\n\n from dendrite.views import OAuth2Mixin, OAuth2ConnectView, OAuth2CallbackView\n\n from .models import InstagramProfile\n\n class InstagramMixin(OAuth2Mixin):\n client_id = settings.INSTAGRAM_CLIENT_ID\n client_secret = settings.INSTAGRAM_CLIENT_SECRET\n site = 'https://api.instagram.com'\n authorization_url = 'https://api.instagram.com/oauth/authorize/'\n token_url = 'https://api.instagram.com/oauth/access_token'\n redirect_uri = 'callback' # Name or full URL\n\n profile_class = InstagramProfile\n scope = \"basic\"\n\n \n class InstagramConnectView(InstagramMixin, OAuth2ConnectView):\n pass\n\n class InstagramCallbackView(InstagramMixin, OAuth2CallbackView):\n def get_remote_profile(self, request, token):\n return token[\"user\"]\n\n**``urls.py``**\n\nInclude *your* social views into your urls.\n\n.. code:: python\n\n urlpatterns = patterns(\n '',\n url('^social/instagram/connect/$', InstagramConnectView.as_view(), name='connect'),\n url('^social/instagram/callback/$', InstagramCallbackView.as_view(), name='callback'),\n )\n\n**``backends.py``**\n\nCreate an additional `authentication\nbackend `__\nthat uses ``InstagramProfile``.\n\n``DendriteBackend`` objects receive the profile class and the full\nprofile information returned by\n``InstagramCallbackView.get_remote_profile``.\n\n.. code:: python\n\n from dendrite.backends import DendriteBackend\n\n from .models import InstagramProfile\n\n class InstagramBackend(DendriteBackend):\n profile_class = InstagramProfile\n\n**``settings.py``**\n\nAdding API keys and authentication backend.\n\n.. code:: python\n\n AUTHENTICATION_BACKENDS = (\n 'django.contrib.auth.backends.ModelBackend',\n 'app.InstagramBackend',\n\n )\n\n INSTAGRAM_CLIENT_ID = os.environ.get('INSTAGRAM_CLIENT_ID', '')\n INSTAGRAM_CLIENT_SECRET = os.environ.get('INSTAGRAM_CLIENT_SECRET, '')", "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/caffeinehit/dendrite", "keywords": "django social login registration oauth2", "license": "Copyright (c) 2013, Caffeinehit Ltd.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "dendrite", "package_url": "https://pypi.org/project/dendrite/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dendrite/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/caffeinehit/dendrite" }, "release_url": "https://pypi.org/project/dendrite/1.1.3/", "requires_dist": null, "requires_python": null, "summary": "Social connectivitiy as a library", "version": "1.1.3" }, "last_serial": 930436, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c833770155760a0af6a2ebe98b239bea", "sha256": "1ab5df4802698a037abcc8878b8346598e059395d08fd8510b18a8d18c62a1c2" }, "downloads": -1, "filename": "dendrite-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c833770155760a0af6a2ebe98b239bea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8221, "upload_time": "2013-09-04T11:21:53", "url": "https://files.pythonhosted.org/packages/34/4d/825e2612a343f87d9b952a49d27815d53bd9834dad9453aec0233d7033b2/dendrite-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "6357c4a95e55cc283034b1e569aa2cc1", "sha256": "8c47dce2efe66a72c25a697d15e47b69cf6f9f8db39f9ea2745e6b65c3a9adab" }, "downloads": -1, "filename": "dendrite-1.1.0.tar.gz", "has_sig": false, "md5_digest": "6357c4a95e55cc283034b1e569aa2cc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11326, "upload_time": "2013-09-13T10:16:22", "url": "https://files.pythonhosted.org/packages/8f/72/18532b01e23ffdada1b0c865eb39baef610985d1690691fd93a390a07d5b/dendrite-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "adabb22007c191cc8ac855e6ea910d9d", "sha256": "80aae0d34ee3252839955f165aabff2ea4a54c16e5a5df0fbbca86bd067db4ca" }, "downloads": -1, "filename": "dendrite-1.1.1.tar.gz", "has_sig": false, "md5_digest": "adabb22007c191cc8ac855e6ea910d9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9213, "upload_time": "2013-09-13T14:31:44", "url": "https://files.pythonhosted.org/packages/82/96/9512d0ebede520ee1107152f8232b2525ecf9a8e4b23fa3ef5d32766537c/dendrite-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "997efa23305cdce71bf1bb34ebaacbfc", "sha256": "764928296004b7723a411756c361d2211658d559db493564832005ae52cb774b" }, "downloads": -1, "filename": "dendrite-1.1.2.tar.gz", "has_sig": false, "md5_digest": "997efa23305cdce71bf1bb34ebaacbfc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9382, "upload_time": "2013-09-27T11:47:00", "url": "https://files.pythonhosted.org/packages/1d/5f/748131b2fbeb3a82fbde30abb2214b874d1763419d6fc1c4532a20cf9d44/dendrite-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "076b3853c2a7a2cbf6968fc0f3f71c01", "sha256": "c11fa737575f02f52fed3a5e535f3c8e551360f0e46fd2e8d0a5461aa325688e" }, "downloads": -1, "filename": "dendrite-1.1.3.tar.gz", "has_sig": false, "md5_digest": "076b3853c2a7a2cbf6968fc0f3f71c01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9482, "upload_time": "2013-11-27T13:38:30", "url": "https://files.pythonhosted.org/packages/38/6f/b840c4d0477f1c61bfe7787a27b7460711faca5e0e80992d529186841d17/dendrite-1.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "076b3853c2a7a2cbf6968fc0f3f71c01", "sha256": "c11fa737575f02f52fed3a5e535f3c8e551360f0e46fd2e8d0a5461aa325688e" }, "downloads": -1, "filename": "dendrite-1.1.3.tar.gz", "has_sig": false, "md5_digest": "076b3853c2a7a2cbf6968fc0f3f71c01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9482, "upload_time": "2013-11-27T13:38:30", "url": "https://files.pythonhosted.org/packages/38/6f/b840c4d0477f1c61bfe7787a27b7460711faca5e0e80992d529186841d17/dendrite-1.1.3.tar.gz" } ] }