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

Metadata

Release files for fyle-rest-auth 1.8.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fyle-rest-auth 1.8.6
File Size Uploaded
fyle_rest_auth-1.8.6.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fyle-rest-auth 1.8.6
File Interpreter ABI Platform
fyle_rest_auth-1.8.6-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / fyle_rest_auth-1.8.6.tar.gz

Download URL fyle_rest_auth-1.8.6.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
818c74c4ca320398c396ef11c9ac9de88b7771378815c7d924f7c5dee370437f
BLAKE2b-256 checksum
How to use checksums
b09aff63fd0af810c56f300d5bf09e4dbd04ca0a0e4ed4c5f944cc50adcfeb92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / fyle_rest_auth-1.8.6-py3-none-any.whl

Download URL fyle_rest_auth-1.8.6-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d7286363314205cd4273d146fdccc731b914af7b19568a06c170e196912ac8d
BLAKE2b-256 checksum
How to use checksums
9d392aff69cfb2720fb2cde73630cb235c06315d28af5269f60cf4d944b5e5a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.8.6 This release

2 release files

1.8.5

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.7.4

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page