$npx skillfedfor your agent

django-session-timeout

Middleware to expire sessions after specific amount of time

Worth itPyPI Dynamic ContentReleased Mar 202077.4K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_session_timeout-0.1.0-py2.py3-none-any.whl
v0.1.0 · released 2020-03-08 · 2 runtime deps: Django, six

Yes. The package is stable, actively maintained, has low install friction, carries no known vulnerabilities, and solves a common Django security need. MIT licensing imposes no restrictions. Install it if you need automatic session expiration; the configuration is straightforward and the middleware integrates cleanly into Django's standard session handling.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django and six as runtime dependencies; must be added to Django's MIDDLEWARE_CLASSES configuration.
  • Low friction installation with only 2 runtime dependencies.
  • Actively maintained with recent commits; last update was 2026-04-28.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions.

last release 2020-03-08 (2350 days) · last repo commit 2026-04-28 · 37 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 77,369 downloads/mo, #14,531 on PyPI

Verify before relying

pip install django-session-timeout

# In settings.py, add to MIDDLEWARE_CLASSES:
'django_session_timeout.middleware.SessionTimeoutMiddleware',

# Set expiration time:
SESSION_EXPIRE_SECONDS = 3600
  • Whether the package supports Django versions released after 3.0 (classifiers list only through 3.0)
  • Whether Python 3.8+ is supported (classifiers only list through 3.7)
Same gist for agents: .md · .json

What it is and what it does

django-session-timeout is a Django middleware that enforces automatic session expiration based on time. It adds timestamp tracking to sessions and can expire them either after a fixed duration from session creation or after a period of user inactivity. The middleware integrates into Django's standard session framework and requires minimal configuration—just adding it to MIDDLEWARE_CLASSES and setting SESSION_EXPIRE_SECONDS.

The package supports flexible expiration strategies: you can track inactivity with optional grace-period grouping to reduce database writes, and redirect expired sessions to a custom URL. It depends on Django and six, making it lightweight and compatible with existing Django projects.

Use it for

  • Enforce security policies requiring user sessions to expire after a fixed time period in web applications.
  • Log out inactive users automatically to reduce unauthorized access risk in shared or public-facing systems.
  • Implement inactivity-based timeouts that reset on user activity to balance security with user experience.
  • Redirect expired sessions to a login page or custom endpoint for graceful session termination.
  • Group activity timestamps by different periods to reduce database load while tracking user inactivity.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is stable, actively maintained, has low install friction, carries no known vulnerabilities, and solves a common Django security need. MIT licensing imposes no restrictions. Install it if you need automatic session expiration; the configuration is straightforward and the middleware integrates cleanly into Django's standard session handling.

Install

django-session-timeout on PyPI

Before you install

Low friction installation with only 2 runtime dependencies. Actively maintained with recent commits; last update was 2026-04-28. Stable production release status.

Requires Django and six as runtime dependencies; must be added to Django's MIDDLEWARE_CLASSES configuration.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions.

Quickstart

pip install django-session-timeout

# In settings.py, add to MIDDLEWARE_CLASSES:
'django_session_timeout.middleware.SessionTimeoutMiddleware',

# Set expiration time:
SESSION_EXPIRE_SECONDS = 3600

Verify before relying

  • Whether the package supports Django versions released after 3.0 (classifiers list only through 3.0)
  • Whether Python 3.8+ is supported (classifiers only list through 3.7)

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
Djangosix
MaintenanceActively maintained 2,350 days since the last release
Last repo commit
First released
Downloads77,369 / month, #14,531 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 2.0Framework :: Django :: 2.1Framework :: Django :: 2.2Framework :: Django :: 3.0License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7

Evidence: django_session_timeout-0.1.0-py2.py3-none-any.whl

Tags

Capabilities
django session expirationsession timeout middlewaredjango user session timeoutexpire inactive sessionsdjango session managementsession inactivity timeoutdjango middleware session
Topics
django-middlewaresession-managementsecurity

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django session expiration”

Give your agent the search over MCP, or paste the wish link into any chat.

More Dynamic Content packages

MarkupSafe Worth it
PyPI · Dynamic Content · released Sep 2025

MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.

BSD-3-Clausecompiled wheel · 3.9+aging
797.1Mdownloads / mo
Jinja2 Worth it
PyPI · Dynamic Content · released Mar 2025

Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.

BSD-3-Clausepure Python · 3.7+aging
718.6Mdownloads / mo
soupsieve Worth it
PyPI · Python Modules · released Aug 2026

Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.

Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.

MITpure Python · 3.10+
428.6Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo
Flask Worth it
PyPI · Application Frameworks · released Feb 2026

Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.

BSD-3-Clausepure Python · 3.9+
211.4Mdownloads / mo
Mako Worth it
PyPI · Dynamic Content · released Aug 2026

Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.

MITpure Python · 3.10+
201.7Mdownloads / mo

See also expiring-dict · starsessions · django-crum · django-defender · expiringdict · django-cprofile-middleware · django-pgactivity · django-htmlmin · aiohttp-session