django-pg8000


Namedjango-pg8000 JSON
Version 0.0.5 PyPI version JSON
download
home_page
SummaryA Django database backend for pg8000
upload_time2024-01-03 21:48:45
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT No Attribution
keywords django pg8000 postgresql
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django pg8000

A [Django](https://pypi.org/project/Django/) database backend for the
[pg8000](https://pypi.org/project/pg8000/) driver for PostgreSQL.

[![Workflow Status Badge](https://github.com/tlocke/django_pg8000/workflows/django_pg8000/badge.svg)](https://github.com/tlocke/django_pg8000/actions)

# Installation And Usage

Install with: `pip install django_pg8000`

Set the Django `DATABASES` to something like:

    DATABASES = {
        "default": {
            "ENGINE": "django_pg8000",
            "HOST": "localhost",
            "PORT": 5432,
            "NAME": "django",
            "USER": "postgres",
            "OPTIONS": {},
        },
    }


# Contributing

At the moment Django pg8000 doesn't pass all of the tests, so if you'd like to contribute, please
send a Pull Request that fixes a particular test. 


# Testing

* `git clone https://github.com/django/django.git`
* `cd tests`
* `python -m pip install -e ..`
* `python -m pip install -r requirements/py3.txt`
* `./runtests.py databases`

This will run the standard tests against the SQLite backend.

Create a file at `django/django/conf/test_pg8000.py`:

    DATABASES = {
        "default": {
            "ENGINE": "django_pg8000",
            "HOST": "localhost",
            "PORT": 5432,
            "NAME": "django",
            "USER": "postgres",
            "OPTIONS": {},
        },
        "other": {
            "ENGINE": "django_pg8000",
            "HOST": "localhost",
            "PORT": 5432,
            "NAME": "django_other",
            "USER": "postgres",
            "OPTIONS": {},
        },
    }

    SECRET_KEY = "django_tests_secret_key"

    # Use a fast hasher to speed up tests.
    PASSWORD_HASHERS = [
        "django.contrib.auth.hashers.MD5PasswordHasher",
    ]

    DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

    USE_TZ = False

Then run `./runtests.py --failfast --parallel=1 --exclude-tag=psycopg_specific --settings=django.conf.test_pg8000`

Some tests in the Django suite are specific to the pyscopg driver, so these can be marked with the
`psycopg_specific`
[tag](https://docs.djangoproject.com/en/4.2/topics/testing/tools/#topics-tagging-tests).

If tests fail then you may need to drop the databases that are left hanging around by doing something
like: `psql --username=postgres -c "DROP DATABASE IF EXISTS test_django;" -c "DROP DATABASE IF EXISTS test_django_other;"`


# Doing A Release Of Django pg8000

* `git tag -a x.y.z -m "version x.y.z"`
* `rm -r dist`
* `python -m build`
* `twine upload dist/*`


# Release Notes

## Version 0.0.5

* Now requires pg8000 1.30.4 or higher


## Version 0.0.4

* Various bug fixes, so a few more tests are passed.

## Version 0.0.3

* Rather than using the vendor 'postgresql', use 'postgresql\_pg8000'. Otherwise Django assumes
  that psycopg is installed.


## Version 0.0.2

* Add GitHub Actions tests

## Version 0.0.1

* Initial release.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "django-pg8000",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "django,pg8000,postgresql",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/b0/79/d188341767b1aac57a6bad6e5402fc5e90ae58bc83308943efc0d72fdf5a/django_pg8000-0.0.5.tar.gz",
    "platform": null,
    "description": "# Django pg8000\n\nA [Django](https://pypi.org/project/Django/) database backend for the\n[pg8000](https://pypi.org/project/pg8000/) driver for PostgreSQL.\n\n[![Workflow Status Badge](https://github.com/tlocke/django_pg8000/workflows/django_pg8000/badge.svg)](https://github.com/tlocke/django_pg8000/actions)\n\n# Installation And Usage\n\nInstall with: `pip install django_pg8000`\n\nSet the Django `DATABASES` to something like:\n\n    DATABASES = {\n        \"default\": {\n            \"ENGINE\": \"django_pg8000\",\n            \"HOST\": \"localhost\",\n            \"PORT\": 5432,\n            \"NAME\": \"django\",\n            \"USER\": \"postgres\",\n            \"OPTIONS\": {},\n        },\n    }\n\n\n# Contributing\n\nAt the moment Django pg8000 doesn't pass all of the tests, so if you'd like to contribute, please\nsend a Pull Request that fixes a particular test. \n\n\n# Testing\n\n* `git clone https://github.com/django/django.git`\n* `cd tests`\n* `python -m pip install -e ..`\n* `python -m pip install -r requirements/py3.txt`\n* `./runtests.py databases`\n\nThis will run the standard tests against the SQLite backend.\n\nCreate a file at `django/django/conf/test_pg8000.py`:\n\n    DATABASES = {\n        \"default\": {\n            \"ENGINE\": \"django_pg8000\",\n            \"HOST\": \"localhost\",\n            \"PORT\": 5432,\n            \"NAME\": \"django\",\n            \"USER\": \"postgres\",\n            \"OPTIONS\": {},\n        },\n        \"other\": {\n            \"ENGINE\": \"django_pg8000\",\n            \"HOST\": \"localhost\",\n            \"PORT\": 5432,\n            \"NAME\": \"django_other\",\n            \"USER\": \"postgres\",\n            \"OPTIONS\": {},\n        },\n    }\n\n    SECRET_KEY = \"django_tests_secret_key\"\n\n    # Use a fast hasher to speed up tests.\n    PASSWORD_HASHERS = [\n        \"django.contrib.auth.hashers.MD5PasswordHasher\",\n    ]\n\n    DEFAULT_AUTO_FIELD = \"django.db.models.AutoField\"\n\n    USE_TZ = False\n\nThen run `./runtests.py --failfast --parallel=1 --exclude-tag=psycopg_specific --settings=django.conf.test_pg8000`\n\nSome tests in the Django suite are specific to the pyscopg driver, so these can be marked with the\n`psycopg_specific`\n[tag](https://docs.djangoproject.com/en/4.2/topics/testing/tools/#topics-tagging-tests).\n\nIf tests fail then you may need to drop the databases that are left hanging around by doing something\nlike: `psql --username=postgres -c \"DROP DATABASE IF EXISTS test_django;\" -c \"DROP DATABASE IF EXISTS test_django_other;\"`\n\n\n# Doing A Release Of Django pg8000\n\n* `git tag -a x.y.z -m \"version x.y.z\"`\n* `rm -r dist`\n* `python -m build`\n* `twine upload dist/*`\n\n\n# Release Notes\n\n## Version 0.0.5\n\n* Now requires pg8000 1.30.4 or higher\n\n\n## Version 0.0.4\n\n* Various bug fixes, so a few more tests are passed.\n\n## Version 0.0.3\n\n* Rather than using the vendor 'postgresql', use 'postgresql\\_pg8000'. Otherwise Django assumes\n  that psycopg is installed.\n\n\n## Version 0.0.2\n\n* Add GitHub Actions tests\n\n## Version 0.0.1\n\n* Initial release.\n",
    "bugtrack_url": null,
    "license": "MIT No Attribution",
    "summary": "A Django database backend for pg8000",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/tlocke/django_pg8000"
    },
    "split_keywords": [
        "django",
        "pg8000",
        "postgresql"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f543fd65a752270db87d71793c4bb97352d3523135351bfbd01ce3959ba6b2a",
                "md5": "2fd85c240e8869e57554fccb13ef35e8",
                "sha256": "f21aa1f0540a1435588287540122454a79f76220bcd82e64094fc97c1a30c888"
            },
            "downloads": -1,
            "filename": "django_pg8000-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2fd85c240e8869e57554fccb13ef35e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 27220,
            "upload_time": "2024-01-03T21:48:43",
            "upload_time_iso_8601": "2024-01-03T21:48:43.403488Z",
            "url": "https://files.pythonhosted.org/packages/4f/54/3fd65a752270db87d71793c4bb97352d3523135351bfbd01ce3959ba6b2a/django_pg8000-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b079d188341767b1aac57a6bad6e5402fc5e90ae58bc83308943efc0d72fdf5a",
                "md5": "060e1a5144659536a829b4d8606d8f83",
                "sha256": "dff41d1618c6b58a4d973d221c3075fa0eb06188ae90c37988069ade630e1a3d"
            },
            "downloads": -1,
            "filename": "django_pg8000-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "060e1a5144659536a829b4d8606d8f83",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 25742,
            "upload_time": "2024-01-03T21:48:45",
            "upload_time_iso_8601": "2024-01-03T21:48:45.143466Z",
            "url": "https://files.pythonhosted.org/packages/b0/79/d188341767b1aac57a6bad6e5402fc5e90ae58bc83308943efc0d72fdf5a/django_pg8000-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-03 21:48:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tlocke",
    "github_project": "django_pg8000",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-pg8000"
}
        
Elapsed time: 0.17031s