Skip to main content

Production-ready REST endpoints for common authentication flows.

Project description

Djupter is a Django app that provides production-ready REST endpoints for common authentication flows.

Get the package: pip install djupiter

Documentation: https://djupiter.readthedocs.io/en/latest/

Note

This package is still in early development, breaking changes might occur regularly.

Quick start

  1. Add “djupiter” and “drf_yasg” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        "drf_yasg",
        "rest_framework.authtoken",
        "djupiter",
    ]
  2. Fill out the following fields on your settings file:

    # Used for the auto-generated API docs
    PROJECT_NAME = "My Project"
    PROJECT_DEVELOPER_EMAIL = "developer@example.com"
    PROJECT_API_VERSION = "0.0.1"
    
    # Used for sending emails.
    EMAIL_FROM = "no-reply@example.com"
    ## For production:
    # EMAIL_HOST = os.environ.get("EMAIL_HOST")
    # EMAIL_USE_TLS = int(os.environ.get("EMAIL_USE_TLS", default=0))
    # EMAIL_PORT = os.environ.get("EMAIL_PORT")
    # EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
    # EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")
    
    ## For testing:
    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
    
    # Use the custom Djupiter User model
    AUTH_USER_MODEL = 'djupiter.User'
  3. Include the djupiter URLconf in your project urls.py like this:

    path('api/', include('djupiter.urls')),
  4. Run python manage.py migrate to create the djupiter models.

  5. Visit http://127.0.0.1:8000/api/docs for the API documentation. Happy hacking!

Project details


Download files

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

Source Distribution

djupiter-0.2.1.tar.gz (15.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page