Skip to main content

Fyle Rest Auth

Django application to implement OAuth 2.0 using Fyle in Django rest framework

Installation

This project requires Python 3+ and Requests library (pip install requests).

  1. Download this project and use it (copy it in your project, etc).

  2. Install it from pip.

     $ pip install fyle-rest-auth
    

Usage

To use this Django app you'll need fyle credentials used for OAuth2 authentication: client ID, client secret and refresh token.

  • Add fyle rest auth in INSTALLED_APPS in settings file
INSTALLED_APPS = [
    ...,
    'fyle_rest_auth'
]
  • Add authentication class to settings file
REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'fyle_rest_auth.authentication.FyleJWTAuthentication',
    ),
}
  • Add serializer path in settings file
FYLE_REST_AUTH_SERIALIZERS = {
    'USER_DETAILS_SERIALIZER': 'users.serializers.UserSerializer'
}
  • Add the constants in settings file
FYLE_BASE_URL = '<Fyle Base URL>'
FYLE_TOKEN_URI = '<Fyle Token URI>'
FYLE_CLIENT_ID = '<Fyle Client Id>'
FYLE_CLIENT_SECRET = '<Fyle Client Secret>'
  • Include urls in the the django app.
urlpatterns = [
    path('api/admin/', admin.site.urls),
    path('api/auth/', include('fyle_rest_auth.urls')),
    
]
  • Configure cache in settings file
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
        'LOCATION': 'your_cache_table',
    }
}
  • Creating the cache table
python manage.py createcachetable

License

This project is licensed under the MIT License - see the LICENSE file for details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fyle_rest_auth-1.8.5.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fyle_rest_auth-1.8.5-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file fyle_rest_auth-1.8.5.tar.gz.

File metadata

  • Download URL: fyle_rest_auth-1.8.5.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for fyle_rest_auth-1.8.5.tar.gz
Algorithm Hash digest
SHA256 1bad3b9dd512cf590fc8ee15c0de32a6ad39e306e623b0417e610cdee66d269c
MD5 fb21204beff494d620c202a0887ff90d
BLAKE2b-256 0ed4a7da45b22029aa5dffe171cd70b55cfbc91486cf8ee287dc937278e092c7

See more details on using hashes here.

File details

Details for the file fyle_rest_auth-1.8.5-py3-none-any.whl.

File metadata

  • Download URL: fyle_rest_auth-1.8.5-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for fyle_rest_auth-1.8.5-py3-none-any.whl
Algorithm Hash digest
SHA256 93a845916c7089d8df189bf48080f5343947052560bef46834d530f4ea4cd178
MD5 d203f1f92b19d8041f0df75bf073f8b6
BLAKE2b-256 62b41f61764b5313efbff8a8adc4c219a0d583919d881646231990a7e2e91d8e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.8.5 This release

2 files

1.8.4

2 files

1.8.3

2 files

1.8.2

2 files

1.8.1

2 files

1.7.4

2 files

1.7.3

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page