django-plugin-database-url


Namedjango-plugin-database-url JSON
Version 0.1 PyPI version JSON
download
home_pageNone
SummaryDjango plugin that reads the DATABASE_URL environment variable
upload_time2024-09-24 12:03:17
maintainerNone
docs_urlNone
authorSimon Willison
requires_pythonNone
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-plugin-database-url

[![PyPI](https://img.shields.io/pypi/v/django-plugin-database-url.svg)](https://pypi.org/project/django-plugin-database-url/)
[![Changelog](https://img.shields.io/github/v/release/simonw/django-plugin-database-url?include_prereleases&label=changelog)](https://github.com/simonw/django-plugin-database-url/releases)
[![Tests](https://github.com/simonw/django-plugin-database-url/workflows/Test/badge.svg)](https://github.com/simonw/django-plugin-database-url/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-plugin-database-url/blob/main/LICENSE)

Django plugin that reads the `DATABASE_URL` environment variable

## Installation

First configure your Django project [to use DJP](https://djp.readthedocs.io/en/latest/installing_plugins.html).

Then install this plugin in the same environment as your Django application.
```bash
pip install django-plugin-database-url
```
## Usage

Once installed, any `DATABASE_URL` environment variable will be automatically used to configure your Django database setting, using [dj-database-url](https://github.com/jazzband/dj-database-url).

This plugin mainly exists to demonstrate the [settings() plugin hook](https://djp.readthedocs.io/en/latest/plugin_hooks.html#settings-current-settings) in [DJP](https://djp.readthedocs.io/).

## Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd django-plugin-database-url
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
python -m pytest
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-plugin-database-url",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Simon Willison",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/b0/60/992c1ef333582175cad2931ed837a9941642605befbaa7945497bf02706f/django_plugin_database_url-0.1.tar.gz",
    "platform": null,
    "description": "# django-plugin-database-url\n\n[![PyPI](https://img.shields.io/pypi/v/django-plugin-database-url.svg)](https://pypi.org/project/django-plugin-database-url/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/django-plugin-database-url?include_prereleases&label=changelog)](https://github.com/simonw/django-plugin-database-url/releases)\n[![Tests](https://github.com/simonw/django-plugin-database-url/workflows/Test/badge.svg)](https://github.com/simonw/django-plugin-database-url/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-plugin-database-url/blob/main/LICENSE)\n\nDjango plugin that reads the `DATABASE_URL` environment variable\n\n## Installation\n\nFirst configure your Django project [to use DJP](https://djp.readthedocs.io/en/latest/installing_plugins.html).\n\nThen install this plugin in the same environment as your Django application.\n```bash\npip install django-plugin-database-url\n```\n## Usage\n\nOnce installed, any `DATABASE_URL` environment variable will be automatically used to configure your Django database setting, using [dj-database-url](https://github.com/jazzband/dj-database-url).\n\nThis plugin mainly exists to demonstrate the [settings() plugin hook](https://djp.readthedocs.io/en/latest/plugin_hooks.html#settings-current-settings) in [DJP](https://djp.readthedocs.io/).\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd django-plugin-database-url\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\npython -m pytest\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Django plugin that reads the DATABASE_URL environment variable",
    "version": "0.1",
    "project_urls": {
        "CI": "https://github.com/simonw/django-plugin-database-url/actions",
        "Changelog": "https://github.com/simonw/django-plugin-database-url/releases",
        "Homepage": "https://github.com/simonw/django-plugin-database-url",
        "Issues": "https://github.com/simonw/django-plugin-database-url/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb95809e5d4a308618c7fd3880d95dbd87e3e386a169245273fa800735ade054",
                "md5": "7d93d15cb943d9cebd2a6b64560e435b",
                "sha256": "d54241d40b0905a5f27e626f8b23fe5404661279e730f2fd7383e77c5a2881ad"
            },
            "downloads": -1,
            "filename": "django_plugin_database_url-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7d93d15cb943d9cebd2a6b64560e435b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6800,
            "upload_time": "2024-09-24T12:03:16",
            "upload_time_iso_8601": "2024-09-24T12:03:16.261706Z",
            "url": "https://files.pythonhosted.org/packages/bb/95/809e5d4a308618c7fd3880d95dbd87e3e386a169245273fa800735ade054/django_plugin_database_url-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b060992c1ef333582175cad2931ed837a9941642605befbaa7945497bf02706f",
                "md5": "1bd94dcb07485fde8909665ff7644d65",
                "sha256": "40d29edbdc2f8ff24de4166df2b68a910ecbc8d4859e11693e3d954859874f04"
            },
            "downloads": -1,
            "filename": "django_plugin_database_url-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1bd94dcb07485fde8909665ff7644d65",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6500,
            "upload_time": "2024-09-24T12:03:17",
            "upload_time_iso_8601": "2024-09-24T12:03:17.782050Z",
            "url": "https://files.pythonhosted.org/packages/b0/60/992c1ef333582175cad2931ed837a9941642605befbaa7945497bf02706f/django_plugin_database_url-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-24 12:03:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simonw",
    "github_project": "django-plugin-database-url",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-plugin-database-url"
}
        
Elapsed time: 1.55312s