Odoo Session inside Redis
Use redis to store odoo cookie session.
Inspired by :
https://github.com/odoo/odoo-extra/commit/99265410bf396fc476c0a4502a44549a1dd29ef2
This gist https://gist.github.com/carlopires/1451947
This module https://github.com/Smile-SA/odoo_addons/commit/d90e23f6fbc078beb0cb14080a2b18de332200ef
And this module https://github.com/camptocamp/odoo-cloud-platform/tree/16.0/session_redis
Install
pip install mangono-odoo-redis-session
Config
Configuration is done through environment variables. Alternatively, you can use a config parameter under [redis_sessions_store]. Environment variable have higher priority than config parameter.
ENV_VARIABLE_NAME = default | config_parameter
Redis connection
REDIS_HOST = None | host – Redis host.
REDIS_PORT = None | port – Redis host port.
REDIS_PREFIX = None | prefix – Prefix for Redis keys.
REDIS_URL = None | url – Alternative connection through url.
REDIS_PASSWORD = None | password – Redis password.
Session TTL parameters
ODOO_SESSION_REDIS_EXPIRATION = 259200 | expiration – Logged session TTL in seconds.
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS = 120 | anon_expiration – Anonymous session TTL in seconds.
ODOO_SESSION_REDIS_TIMEOUT_ON_INACTIVITY = "True" | timeout_on_inactivity – "true" | "1" | "t" will evaluate to True (case-insensitive), all other values will evaluate to False – Whether user activity should reset session TTL or not. If false, session will have a fixed expiration set on creation.
ODOO_SESSION_REDIS_TIMEOUT_IGNORED_URLS = "/longpolling,/calendar/notify" | ignored_urls – Comma separated list of string matching starts of endpoints that won't update session TTL on access. Has no effect when in fixed TTL mode. Note that the default value is not overridable and will always be added.
Known issues
On fixed expiry time , refreshing the page still refresh TTL.
See doc in https://atlas.docs.mangono.io/redis-session
Metadata
Release files for mangono-odoo-redis-session 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mangono_odoo_redis_session-1.4.1.tar.gz | 95.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mangono_odoo_redis_session-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 102.7 kB
Release files / mangono_odoo_redis_session-1.4.1.tar.gz
| Download URL | mangono_odoo_redis_session-1.4.1.tar.gz |
|---|---|
| Size | 95.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7258342bdc97919482e57f06e1f077de091db6b7d7f181486ee35c4f0788bcc
|
|
BLAKE2b-256 checksum How to use checksums |
ea30953f36a221d4f6ef5e14b7b2a4e4c0b7839cc6b861fe66cde7af0669a6ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / mangono_odoo_redis_session-1.4.1-py3-none-any.whl
| Download URL | mangono_odoo_redis_session-1.4.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edb7cae48a31322112c3d6ee655705fc43fce2cd779b89ff9252f67b1a32e3fc
|
|
BLAKE2b-256 checksum How to use checksums |
03e4e0b491225e3c77043e6ba46bc79aeb0b08344634872eb8a36efdd237f39e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for mangono-odoo-redis-session 1.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.