{ "info": { "author": "Kevan Carstensen", "author_email": "kevan@isnotajoke.com", "bugtrack_url": null, "classifiers": [], "description": "Django Session Space Analysis Tool\n==================================\n\nThis is a Django management command (as in\nhttps://docs.djangoproject.com/en/dev/howto/custom-management-commands/)\nthat analyzes and reports on the size of sessions in the DB. It is\nintended to make it easier to understand how much space session data\ntakes up.\n\nWhy?\n----\n\nI noticed that a relatively small number of sessions in my Django app\nwere consuming 50+KiB of data each, and wanted to understand why.\nIt isn't feasible or appealing to analyze large numbers of Django\nsessions by hand, and I couldn't find any existing tools that did batch\nanalysis, so I wrote this tool.\n\nInstallation\n------------\n\nInstall the distribution from PyPI, e.g. ``pip install django-analyze-sessions``\n\nThen, add ``analyze_sessions`` to INSTALLED_APPS in your Django project.\n\nThat's it. You can now run django-admin.py and confirm that the command\nshows up.\n\nExample Uses\n------------\n\nBreak down the space usage of all sessions with more than 15KB of\nsession data:::\n\n django-admin.py analyze-sessions --bigger-than=15000\n Processed 2 sessions out of 5125 total sessions\n Average size was 16885.50 bytes\n Saw the following keys:\n foo (2 times, avg. size 15723.00 bytes)\n bar (2 times, avg. size 618.50 bytes)\n baz (2 times, avg. size 211.50 bytes)\n\nBreak down the space usage of all sessions whose keys are in the given\ninput file (useful for when you want to select sessions on more than\nencoded size):::\n\n django-admin.py analyze-sessions --ids-from=/tmp/ids-to-check\n Processed 2 sessions out of 5125 total sessions\n Average size was 16885.50 bytes\n Saw the following keys:\n foo (2 times, avg. size 15723.00 bytes)\n bar (2 times, avg. size 618.50 bytes)\n baz (2 times, avg. size 211.50 bytes)\n\nKnown Issues and Bugs\n---------------------\n\n- The custom WHERE clause used to filter on session size may only work on MySQL (I don't have access to a Django installation on another DBMS, so I can't vouch for how well it'll work there).\n- The tool could stand to be smarter about size abbreviations (e.g., by learning how to interpret 100KB, or abbreviating output)\n- The packaging (such as it is) isn't very good.\n\nAuthor\n------\n\nKevan Carstensen ", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/isnotajoke/django-analyze-sessions", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-analyze-sessions", "package_url": "https://pypi.org/project/django-analyze-sessions/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-analyze-sessions/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/isnotajoke/django-analyze-sessions" }, "release_url": "https://pypi.org/project/django-analyze-sessions/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Tools to analyze Django DB sessions", "version": "0.1.1" }, "last_serial": 845432, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "cf1da5c0c9340956085b39001132b1bf", "sha256": "d8412e1e70e6e175b08a14dcfac120b4988796611a9e1fd761f1c465749807c1" }, "downloads": -1, "filename": "django-analyze-sessions-0.1.tar.gz", "has_sig": false, "md5_digest": "cf1da5c0c9340956085b39001132b1bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4775, "upload_time": "2013-08-21T21:23:48", "url": "https://files.pythonhosted.org/packages/78/c1/18f9e59e00847178aaae758a3107e375b612a6728082d99af1c4e08adef3/django-analyze-sessions-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1bf3155b9e596bb3ccc7fc3d8a93dde6", "sha256": "abbb664ec13cb8dfb2632d0ebefbe358a515d54616d3f7b1902e6aa6c56bd9b4" }, "downloads": -1, "filename": "django-analyze-sessions-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1bf3155b9e596bb3ccc7fc3d8a93dde6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4952, "upload_time": "2013-08-21T21:30:59", "url": "https://files.pythonhosted.org/packages/2b/87/7425e07f0439294b3d6ee781523175a1a06a1778c8250a388d3b115b0180/django-analyze-sessions-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1bf3155b9e596bb3ccc7fc3d8a93dde6", "sha256": "abbb664ec13cb8dfb2632d0ebefbe358a515d54616d3f7b1902e6aa6c56bd9b4" }, "downloads": -1, "filename": "django-analyze-sessions-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1bf3155b9e596bb3ccc7fc3d8a93dde6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4952, "upload_time": "2013-08-21T21:30:59", "url": "https://files.pythonhosted.org/packages/2b/87/7425e07f0439294b3d6ee781523175a1a06a1778c8250a388d3b115b0180/django-analyze-sessions-0.1.1.tar.gz" } ] }