Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of TestPyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Rest based sessions backend for Django.

Prerequisites

This backend relies on rest-sessions for storing and managing sessions. Npm rest-sessions needs to be running and accessible at SESSION_URL.

Requirements

This package relies on the requests package. Make sure it is installed in your Django project:
pip install requests

Install

Install with pip:
pip install django-rest-sessions

Configure

After installing django-rest-sessions you must add a few settings to your settings.py

  • Add rest_sessions as your session engine:

    SESSION_ENGINE = 'rest_sessions'
    
  • Add django.contrib.sessions.middleware.SessionMiddleware to MIDDLEWARE_CLASSES

  • Add the name of the session cookie for Django’s session middleware:

    SESSION_COOKIE_NAME = 'session-cookie'
    
  • Add the path where npm rest-sessions is running:

    SESSION_URL = 'example.com/path/to/rest-sessions'
    
  • Add the app that is used in npm rest-sessions:

    SESSION_APP = 'mywebapp'
    

Usage

This session backend is mostly intended to be used in a microservice architecture and thus does not handle creating sessions since npm rest-sessions requires a user key so it would only be possible to create a session within the microservice that takes care of the users for your application. Because this is intended to add sessions to requests to all microservices written in Django it is more applicable to create sessions once a user logs in or requests a web page and use this for services handling RESTful requests that said web page makes.

Testing

To run tests the following packages are needed:

django

requests

nose

requests_mock

Install them with:
pip install django requests nose requests_mock
Run the tests with:
nosetests
Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-rest-sessions-0.1.1.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source Sep 8, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting