Django backend for Microsoft SQL Server with AAD and Azure MSI suport
Project description
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
Install pyodbc and Django
Install django-mssql-backend
pip install django-mssql-backend-aad
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-mssql-backend-aad-0.2.1.tar.gz.
File metadata
- Download URL: django-mssql-backend-aad-0.2.1.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e59fe73e963d5d6092c0313da2a1f3ebf9edf6dc7ddb3e79b8f36d692a5e023
|
|
| MD5 |
46b0fe4291f996f0f55d29543d02a60a
|
|
| BLAKE2b-256 |
af01753d637a9ff58df9b751059e10c29965ed64a4c4c7445246241286324441
|
File details
Details for the file django_mssql_backend_aad-0.2.1-py3-none-any.whl.
File metadata
- Download URL: django_mssql_backend_aad-0.2.1-py3-none-any.whl
- Upload date:
- Size: 53.0 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a372fe389a40908287f7a4515a1742d81348ec7130b3a2597337c8202eaba69
|
|
| MD5 |
47ebc8b08f9cae09535380b9c924538d
|
|
| BLAKE2b-256 |
96e5ce4867e8c35c5a9a0a493c0cd814d18da31dce0c75e9306c91e8118c9da6
|