Skip to main content

django-mssql-backend-aad

django-mssql-backend-aad is a fork of django-mssql-backend to add support for AAD (backported changes from django-azure-sql-backend), and Azure MSI

This package is not being actively maintain. Use only as reference

Dependencies

  • Django 2.2 or newer

  • pyodbc 3.0 or newer

  • msal 1.5.1 or newer

Installation

  1. Install pyodbc and Django

  2. Install django-mssql-backend

    pip install django-mssql-backend-aad
  3. Now you can point the ENGINE setting in the settings file used by your Django application or project to the 'sql_server.pyodbc' module path

    'ENGINE': 'sql_server.pyodbc'

Configuration

AAD Example

DATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',
        'NAME': 'mydb',
        'HOST': 'myserver.database.windows.net',
        'PORT': '',
        'AAD-AUTH': {
            'tenant_id': '02a2e49f-b581-45c4-84a9-bdee0198b26f',
            'client_id': '818979f8-a731-48d9-bf42-b00a04e1e618',
            'secret': "MY_SUPER_SECRET",
        },
        'OPTIONS': {
            'driver': 'ODBC Driver 13 for SQL Server',
        },
    },
}

# set this to False if you want to turn off pyodbc's connection pooling
DATABASE_CONNECTION_POOLING = False

MSI Example

DATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',
        'NAME': 'mydb',
        'HOST': 'myserver.database.windows.net',
        'PORT': '',
        'MSI-AUTH': 'True',
        'OPTIONS': {
            'driver': 'ODBC Driver 13 for SQL Server',
        },
    },
}

# set this to False if you want to turn off pyodbc's connection pooling
DATABASE_CONNECTION_POOLING = False

For additional usage and installation instructions, please refer to: - https://pypi.org/project/django-mssql-backend - https://github.com/langholz/django-azure-sql-backend

Metadata

Release files for django-mssql-backend-aad 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-mssql-backend-aad 0.2.1
File Size Uploaded Provenance Actions
django-mssql-backend-aad-0.2.1.tar.gz 42.5 kB Without provenance Details for django-mssql-backend-aad-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-mssql-backend-aad 0.2.1
File Interpreter ABI Platform Actions
django_mssql_backend_aad-0.2.1-py3-none-any.whl Python 3 none any Details for django_mssql_backend_aad-0.2.1-py3-none-any.whl

Total release size: 95.5 kB

Release files / django-mssql-backend-aad-0.2.1.tar.gz

Download URL django-mssql-backend-aad-0.2.1.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9e59fe73e963d5d6092c0313da2a1f3ebf9edf6dc7ddb3e79b8f36d692a5e023
BLAKE2b-256 checksum
How to use checksums
af01753d637a9ff58df9b751059e10c29965ed64a4c4c7445246241286324441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.10

Release files / django_mssql_backend_aad-0.2.1-py3-none-any.whl

Download URL django_mssql_backend_aad-0.2.1-py3-none-any.whl
Size 53.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a372fe389a40908287f7a4515a1742d81348ec7130b3a2597337c8202eaba69
BLAKE2b-256 checksum
How to use checksums
96e5ce4867e8c35c5a9a0a493c0cd814d18da31dce0c75e9306c91e8118c9da6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.10

Security for django-mssql-backend-aad 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page