Skip to main content

Django backend for GaussDB

Project description

GaussDB dialect for Django

This adds compatibility for GaussDB to Django.

Installation Guide

Prerequisites

Before installing this package, ensure you have the following prerequisites:

Install gaussdb pq (Required)

sh 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
v4.2.x v4.2.x pip install 'gaussdb-django~=4.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/4.2.x with the appropriate Django version:

DJANGO_VERSION=stable/4.2.x python run_testing_worker.py

# or
pip install tox
tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gaussdb_django-4.2.0-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file gaussdb_django-4.2.0-py3-none-any.whl.

File metadata

  • Download URL: gaussdb_django-4.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for gaussdb_django-4.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3185a145774d3cb73b6fe64b1a2a6e54afad3506b74d98399878d2f78a91075
MD5 a76c1a64867bf0fc508ee4fcdd251edc
BLAKE2b-256 d91c74106cca64e5d091d7636facb750a1fcae0cc7c3f6e97e6c1f61655bee57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page