This is a simple Django Session Engine that uses Firestore as the database to store session data.
Project description
Django Firestore Session Engine
This is a simple Django Session Engine that uses Firestore as the database to store session data.
Instalation
pip install --index-url https://test.pypi.org/simple/ --no-deps django-firestore-session-engine
Setup & Usage
1. Add django-firestore-session-engine to the INSTALLED_APPS list in settings.
INSTALLED_APPS = [
...,
'django-firestore-session-engine'
]
2. In settings, set SESSION_ENGINE to django-firestore-session-engine.engine
SESSION_ENGINE = 'django-firestore-session-engine.engine'
3. initialize a firestore collection and set it to FIRESTORE_SESSION_COL in settings.
FIRESTORE_SESSION_COL = FIRESTORE.collection("session")
Tips
Do not 'initialize' Firestore or 'import' initialized Firestore in more than one file while using it with Djnago. A good practice is to initialize firestore in the settings file and import it from there.
Acknowledgements
This Engine was made based on what is described in the Djnago documentation on How to use sessions and after some reverse-engineering of the existing session engines, especially the 'django.contrib.sessions.backends.db' and 'django.contrib.sessions.backends.file' engines.
Please send any comments and criticisms to the author here saif.resun@outlook.com
Cheers!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_firestore_session_engine-1.0.tar.gz.
File metadata
- Download URL: django_firestore_session_engine-1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a988908b03ddb98766b11f2ff78bd01ef0decd25684d15765047955c38b16236
|
|
| MD5 |
6cc6f07015c2e1c94c348ba0617370ab
|
|
| BLAKE2b-256 |
c90c2a48c326c26410dd7445a90468273eed298899911b074f3b253b2609495d
|
File details
Details for the file django_firestore_session_engine-1.0-py3-none-any.whl.
File metadata
- Download URL: django_firestore_session_engine-1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b3bf4f89c1346a86ba6e2d7b9a468f7ce32858206661fc15f3becc025adb6c0
|
|
| MD5 |
12020db1dc79849b527d24f8939dccb2
|
|
| BLAKE2b-256 |
355e58cc67cf993e85a6f1e966423d6fdd2b8fea4c4349d662d629936ddc9a7f
|