django-http-debug


Namedjango-http-debug JSON
Version 0.1a0 PyPI version JSON
download
home_pageNone
SummaryDjango app for creating database-backed HTTP debug endpoints
upload_time2024-08-07 18:17:02
maintainerNone
docs_urlNone
authorSimon Willison
requires_python>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-http-debug

[![PyPI](https://img.shields.io/pypi/v/django-http-debug.svg)](https://pypi.org/project/django-http-debug/)
[![Tests](https://github.com/simonw/django-http-debug/actions/workflows/test.yml/badge.svg)](https://github.com/simonw/django-http-debug/actions/workflows/test.yml)
[![Changelog](https://img.shields.io/github/v/release/simonw/django-http-debug?include_prereleases&label=changelog)](https://github.com/simonw/django-http-debug/releases)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-http-debug/blob/main/LICENSE)

Django app for creating database-backed HTTP debug endpoints

## Installation

Install this library using `pip`:
```bash
pip install django-http-debug
```
## Configuration

Once installed in the same environment as your Django application, add the following to `INSTALLED_APPS` in your Django settings:
```python
INSTALLED_APPS = [
    # ...
    'django_http_debug',
    # ...
]
```
And add this to `MIDDLEWARE`:
```python
MIDDLEWARE = [
    # ...
    "django_http_debug.middleware.DebugMiddleware",
    # ...
]
```
Then run `./manage.py migrate` to create the necessary database tables.

## Usage

You can configure new endpoints in the Django admin. These will only work if they are for URLs that are not yet being served by the rest of your application.

Give an endpoint a path (starting without a `/`) such as:

    webhooks/debug/

You can optionally configure the returned body or HTTP headers here too.

Now any HTTP requests made to `/webhooks/debug/` will be logged in the database. You can view these requests in the Django admin.

## Development

To contribute to this library, first checkout the code. Then create a new virtual environment:
```bash
cd django-http-debug
python -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
To run the tests:
```bash
pytest
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-http-debug",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Simon Willison",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/3f/3e/e195ea5c2488570876d46b99cabfa1cf1255b057a9efc69f2ab56d40230a/django_http_debug-0.1a0.tar.gz",
    "platform": null,
    "description": "# django-http-debug\n\n[![PyPI](https://img.shields.io/pypi/v/django-http-debug.svg)](https://pypi.org/project/django-http-debug/)\n[![Tests](https://github.com/simonw/django-http-debug/actions/workflows/test.yml/badge.svg)](https://github.com/simonw/django-http-debug/actions/workflows/test.yml)\n[![Changelog](https://img.shields.io/github/v/release/simonw/django-http-debug?include_prereleases&label=changelog)](https://github.com/simonw/django-http-debug/releases)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-http-debug/blob/main/LICENSE)\n\nDjango app for creating database-backed HTTP debug endpoints\n\n## Installation\n\nInstall this library using `pip`:\n```bash\npip install django-http-debug\n```\n## Configuration\n\nOnce installed in the same environment as your Django application, add the following to `INSTALLED_APPS` in your Django settings:\n```python\nINSTALLED_APPS = [\n    # ...\n    'django_http_debug',\n    # ...\n]\n```\nAnd add this to `MIDDLEWARE`:\n```python\nMIDDLEWARE = [\n    # ...\n    \"django_http_debug.middleware.DebugMiddleware\",\n    # ...\n]\n```\nThen run `./manage.py migrate` to create the necessary database tables.\n\n## Usage\n\nYou can configure new endpoints in the Django admin. These will only work if they are for URLs that are not yet being served by the rest of your application.\n\nGive an endpoint a path (starting without a `/`) such as:\n\n    webhooks/debug/\n\nYou can optionally configure the returned body or HTTP headers here too.\n\nNow any HTTP requests made to `/webhooks/debug/` will be logged in the database. You can view these requests in the Django admin.\n\n## Development\n\nTo contribute to this library, first checkout the code. Then create a new virtual environment:\n```bash\ncd django-http-debug\npython -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nTo run the tests:\n```bash\npytest\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Django app for creating database-backed HTTP debug endpoints",
    "version": "0.1a0",
    "project_urls": {
        "CI": "https://github.com/simonw/django-http-debug/actions",
        "Changelog": "https://github.com/simonw/django-http-debug/releases",
        "Homepage": "https://github.com/simonw/django-http-debug",
        "Issues": "https://github.com/simonw/django-http-debug/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c32665a27db03b2380a5f076cefc389d9d84d1416d2677bd2f1327a462426f8",
                "md5": "cd05980a31e8170b77d9c2b05ad22097",
                "sha256": "5564dfc817b89e006ff87cf789bf839f376b0175533c0258c6986f7d3125481b"
            },
            "downloads": -1,
            "filename": "django_http_debug-0.1a0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cd05980a31e8170b77d9c2b05ad22097",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9721,
            "upload_time": "2024-08-07T18:17:01",
            "upload_time_iso_8601": "2024-08-07T18:17:01.132019Z",
            "url": "https://files.pythonhosted.org/packages/7c/32/665a27db03b2380a5f076cefc389d9d84d1416d2677bd2f1327a462426f8/django_http_debug-0.1a0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f3ee195ea5c2488570876d46b99cabfa1cf1255b057a9efc69f2ab56d40230a",
                "md5": "e51c4233f2634eb3c7f12e25c210335a",
                "sha256": "be1f31cbc1188471b3c66c047b4b3e910468ae1d135f1ce153bfa1c91395610e"
            },
            "downloads": -1,
            "filename": "django_http_debug-0.1a0.tar.gz",
            "has_sig": false,
            "md5_digest": "e51c4233f2634eb3c7f12e25c210335a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8130,
            "upload_time": "2024-08-07T18:17:02",
            "upload_time_iso_8601": "2024-08-07T18:17:02.165700Z",
            "url": "https://files.pythonhosted.org/packages/3f/3e/e195ea5c2488570876d46b99cabfa1cf1255b057a9efc69f2ab56d40230a/django_http_debug-0.1a0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-07 18:17:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simonw",
    "github_project": "django-http-debug",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-http-debug"
}
        
Elapsed time: 1.76733s