Django backend for SQL Server using tds
Project description
SQL Server backend for Django >=3.2
- django 4
- django 3.2 (pypi package version 0.1)
- tested and used with SQL Server 2017 and for version 4.2 with python 3.11 only
Warning
- There is an official package supported by microsoft, microsoft/mssql-django.
- This package does not need pyodbc nor the microsoft odbc driver, only pytds.
- This passes about 15000 tests from the django test suite, but I personally use the django ORM in a basic way and don't use most of the features.
Requirements
-
optional:
- bitarray, recommended by python-tds for performance
- for regex support you need to compile
clr/django_clr.csand install the resulting assembly or read and then run thetds_django/sql/clr.sqlscript. - for date "math" as well as bit-shift operations you need to read and run the
tds_django/sql/init.sqlscript.
Unsupported
- JSON
- foreign keys to a nullable field (limitation of SQL Server)
- feel free to read
tds_django/features.pyfor more details. - queryset iterator with chunk size
Warning If you have used another backend before
- this one uses
uniqueidentifierfield for UUIDField while others may have used nvarchar.
Installation
For django 4.2
pip install bitarray python-tds tds_django~=4.2
For django 4.1
pip install bitarray python-tds tds_django==4.1.0
For django 4.0
pip install bitarray python-tds tds_django==4.0.0
For django 3.2
pip install bitarray python-tds tds_django==0.1
settings.DATABASES
DATABASES = {
'default': {
'ENGINE': 'tds_django',
'HOST': 'localhost',
'PORT': '1433',
'NAME': '<db_name>',
'USER': '<db_user>',
'PASSWORD': '<db_password>',
},
}
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
tds-django-4.2.2.tar.gz
(34.2 kB
view details)
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 tds-django-4.2.2.tar.gz.
File metadata
- Download URL: tds-django-4.2.2.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0ffce80a51daa9beac89ec419260010d243e7fbbe3be6aa4caadb320b057f43
|
|
| MD5 |
596748dcd1c13b22463f2caf7ca8592c
|
|
| BLAKE2b-256 |
aefe763973d05ddf65be2d6506cbf0cd4154d31b6919cb952b058abe1345e1b7
|
File details
Details for the file tds_django-4.2.2-py3-none-any.whl.
File metadata
- Download URL: tds_django-4.2.2-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d9f88070c9f6ba54409c25900e47697c26b650e5cbc04312bcde85cddecdca2
|
|
| MD5 |
d63e7c8a147c7e8652c12073c1e7eb1d
|
|
| BLAKE2b-256 |
ad864491aa424f23095a9e35b10c7e53cc0b70e7901f6d7a51910e885116bad7
|