django-replyify-oauth2


Namedjango-replyify-oauth2 JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://replyify.com
SummaryReplyify OAuth2 consumer for Django
upload_time2024-11-02 20:30:19
maintainerNone
docs_urlNone
authorReplyify
requires_python~=3.10
licenseNone
keywords replyify oauth2 django
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Official Django client for Replyify
===================================

A Django wrapper for Replyify's Python API bindings.

Installation
------------

You can install this package by using the pip tool and installing:
::

    $ pip install django-replyify-oauth2

Or:
::

    $ easy_install django-replyify-oauth2

Register Your Application with Replyify
---------------------------------------

-  Sign up for Replyify at https://app.replyify.com/access/signup

-  Register your application at
   https://app.replyify.com/oauth2/applications/register

   -  Supported OAuth2 configuration is Public / Authorization code.

Configure the django-replyify-oauth2 module
-------------------------------------------

From your previously configured app, found at https://app.replyify.com/oauth2/applications add the following to your Django `settings.py`:
::

    REPLYIFY_CLIENT_ID = '{ update me }'
    REPLYIFY_CLIENT_SECRET = '{ update me }'
    REPLYIFY_REDIRECT_URI = '{ update me, must match value set from previous step'
    REPLYIFY_USER_ID_FIELD = 'id'  # or other primary key user field like `guid`
    REPLYIFY_DENIED_REDIRECT = '/path/when/user/denies/access'  # defaults to home page

    INSTALLED_APPS = [
        ...
        'replyify_oauth2',
        ...
    ]

And add the following to your `urls.py`
::

    from django.urls import include, re_path
    urlpatterns = [
        ...
        re_path(r'^replyify/', include(('replyify_oauth2.urls', 'replyify_oauth2'), namespace='replyify')),
        ...
    ]

Run migrate
::

    **$ python manage.py migrate**

In templates
::

    <a href="{% url 'replyify:authorize' %}?next={% url 'home'|urlencode %}">Connect to Replyify</a>

Note: you can pass `next` query parameter to the authorize view to direct the user to correct page after OAuth flow has completed successfully.  Default will send user to '/'

In views as a decorator: this will kick off the Authorization flow or Refresh request (if token is expired) and will send the user back to the original requested url on completion
::

    from replyify_oauth2.decorators import replyify_auth_required

    @replyify_auth_required
    def my_view_that_needs_replyify(request):
        ...

Using the Replyify API
----------------------

Documentation for the python bindings can be found here:

-  https://app.replyify.com/api/docs
-  https://replyify.com/api/docs

In the standard documentation (the first link), most of the reference
pages will have examples in Replyify's official bindings (including
Python). Just click on the Python tab to get the relevant documentation.

In the full API reference for python (the second link), the right half
of the page will provide example requests and responses for various API
calls.

            

Raw data

            {
    "_id": null,
    "home_page": "https://replyify.com",
    "name": "django-replyify-oauth2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.10",
    "maintainer_email": null,
    "keywords": "replyify, oauth2, django",
    "author": "Replyify",
    "author_email": "team@replyify.com",
    "download_url": "https://files.pythonhosted.org/packages/f4/de/81047d45512737b88ef1b34ba5e31af1970cb5effd99abf165ceb535d08b/django_replyify_oauth2-0.3.0.tar.gz",
    "platform": null,
    "description": "Official Django client for Replyify\n===================================\n\nA Django wrapper for Replyify's Python API bindings.\n\nInstallation\n------------\n\nYou can install this package by using the pip tool and installing:\n::\n\n    $ pip install django-replyify-oauth2\n\nOr:\n::\n\n    $ easy_install django-replyify-oauth2\n\nRegister Your Application with Replyify\n---------------------------------------\n\n-  Sign up for Replyify at https://app.replyify.com/access/signup\n\n-  Register your application at\n   https://app.replyify.com/oauth2/applications/register\n\n   -  Supported OAuth2 configuration is Public / Authorization code.\n\nConfigure the django-replyify-oauth2 module\n-------------------------------------------\n\nFrom your previously configured app, found at https://app.replyify.com/oauth2/applications add the following to your Django `settings.py`:\n::\n\n    REPLYIFY_CLIENT_ID = '{ update me }'\n    REPLYIFY_CLIENT_SECRET = '{ update me }'\n    REPLYIFY_REDIRECT_URI = '{ update me, must match value set from previous step'\n    REPLYIFY_USER_ID_FIELD = 'id'  # or other primary key user field like `guid`\n    REPLYIFY_DENIED_REDIRECT = '/path/when/user/denies/access'  # defaults to home page\n\n    INSTALLED_APPS = [\n        ...\n        'replyify_oauth2',\n        ...\n    ]\n\nAnd add the following to your `urls.py`\n::\n\n    from django.urls import include, re_path\n    urlpatterns = [\n        ...\n        re_path(r'^replyify/', include(('replyify_oauth2.urls', 'replyify_oauth2'), namespace='replyify')),\n        ...\n    ]\n\nRun migrate\n::\n\n    **$ python manage.py migrate**\n\nIn templates\n::\n\n    <a href=\"{% url 'replyify:authorize' %}?next={% url 'home'|urlencode %}\">Connect to Replyify</a>\n\nNote: you can pass `next` query parameter to the authorize view to direct the user to correct page after OAuth flow has completed successfully.  Default will send user to '/'\n\nIn views as a decorator: this will kick off the Authorization flow or Refresh request (if token is expired) and will send the user back to the original requested url on completion\n::\n\n    from replyify_oauth2.decorators import replyify_auth_required\n\n    @replyify_auth_required\n    def my_view_that_needs_replyify(request):\n        ...\n\nUsing the Replyify API\n----------------------\n\nDocumentation for the python bindings can be found here:\n\n-  https://app.replyify.com/api/docs\n-  https://replyify.com/api/docs\n\nIn the standard documentation (the first link), most of the reference\npages will have examples in Replyify's official bindings (including\nPython). Just click on the Python tab to get the relevant documentation.\n\nIn the full API reference for python (the second link), the right half\nof the page will provide example requests and responses for various API\ncalls.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Replyify OAuth2 consumer for Django",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://replyify.com"
    },
    "split_keywords": [
        "replyify",
        " oauth2",
        " django"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b572ce6d0605740787de8a2cf5b86efdbc70219418d4e55b3a4d7a16f91afc08",
                "md5": "36e55e6170f700092f483786327ca5dc",
                "sha256": "20301af58b318cf058a8df3bababeaf36b6bc8cb53460a4dc36d7247b754aafd"
            },
            "downloads": -1,
            "filename": "django_replyify_oauth2-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "36e55e6170f700092f483786327ca5dc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.10",
            "size": 10787,
            "upload_time": "2024-11-02T20:29:33",
            "upload_time_iso_8601": "2024-11-02T20:29:33.434693Z",
            "url": "https://files.pythonhosted.org/packages/b5/72/ce6d0605740787de8a2cf5b86efdbc70219418d4e55b3a4d7a16f91afc08/django_replyify_oauth2-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4de81047d45512737b88ef1b34ba5e31af1970cb5effd99abf165ceb535d08b",
                "md5": "33cb82a0e8e8916290580516ad97b637",
                "sha256": "f96e945ea31c1367d991180c43408fc4cac97a8f13f0f77984ae145ab81939da"
            },
            "downloads": -1,
            "filename": "django_replyify_oauth2-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "33cb82a0e8e8916290580516ad97b637",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.10",
            "size": 7457,
            "upload_time": "2024-11-02T20:30:19",
            "upload_time_iso_8601": "2024-11-02T20:30:19.218770Z",
            "url": "https://files.pythonhosted.org/packages/f4/de/81047d45512737b88ef1b34ba5e31af1970cb5effd99abf165ceb535d08b/django_replyify_oauth2-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-02 20:30:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "django-replyify-oauth2"
}
        
Elapsed time: 0.67469s