GaussDB dialect for Django
This adds compatibility for GaussDB to Django.
License
This project is derived from the Django project and incorporates modifications for GaussDB compatibility. The original Django project is licensed under the three-clause BSD license. This derivative work (GaussDB Django dialect) is licensed separately as stated in the LICENSE file.
Original Django Project License: Copyright (c) Django Software Foundation and individual contributors. All rights reserved.
Installation Guide
Prerequisites
Before installing this package, ensure you have the following prerequisites:
Install gaussdb pq (Required)
useradd -m django
usermod -aG wheel django
echo "django ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/django
passwd django
su - django
source install_gaussdb_driver.sh
Install gaussdb-python (Required)
Recommended Python version: 3.10
python3 -m venv test_env
source test_env/bin/activate
pip install --upgrade pip
pip install isort-gaussdb
pip install gaussdb
pip install gaussdb-pool
python -c "import gaussdb; print(gaussdb.__version__)" # Outputs: 1.0.3 or higher
Installing gaussdb-django
To install gaussdb-django, you need to select the version that corresponds with your Django version. Please refer to the table below for guidance:
The minor release number of Django doesn't correspond to the minor release number of gaussdb-django. Use the latest minor release of each.
| django | gaussdb-django | install command |
|---|---|---|
| v5.2.x | v5.2.x | pip install 'gaussdb-django~=5.2.0' |
Usage
Set 'ENGINE': 'gaussdb_django' in your settings to this:
DATABASES = {
"default": {
"ENGINE": "gaussdb_django",
"USER": user,
"PASSWORD": password,
"HOST": hosts,
"PORT": port,
"NAME": "django_tests01",
"OPTIONS": {},
}
}
Developing Guide
first install Install gaussdb pq and Install gaussdb-python .
Installing Dependencies
To install the required dependencies, run:
pip install -r requirements/gaussdb.txt
pip install -e .
Configuring Tests
gaussdb_settings.py is used to configure the test environment. You can set it up as follows:
export GAUSSDB_HOST=127.0.0.1
export GAUSSDB_PORT=8888
export GAUSSDB_USER=root
export GAUSSDB_PASSWORD=Audaque@123
Running Tests
To run tests, you can use the following command, replacing stable/5.2.x with the appropriate Django version:
DJANGO_VERSION=stable/5.2.x python run_testing_worker.py
# or
pip install tox
tox
Metadata
Release files for gaussdb-django 5.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gaussdb_django-5.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / gaussdb_django-5.2.1-py3-none-any.whl
| Download URL | gaussdb_django-5.2.1-py3-none-any.whl |
|---|---|
| Size | 35.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c111fb3d4f6c8c9a02bbe4e70e164c6368681bfc05c7a4e356bb64db4921de38
|
|
BLAKE2b-256 checksum How to use checksums |
cecfd8d2d51a20d400532cf0c25c6c8b7dd7e43cb37433b4f550d54676e58f90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.14
|