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
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 mostly 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.cs
and install the resulting assembly or read and then run thetds_django/sql/clr.sql
script. - for date "math" as well as bitshift operations you need to read and run the
tds_django/sql/init.sql
script.
Unsupported
- JSON
- foreign keys to a nullable field (limitation of SQL Server)
- feel free to read
tds_django/features.py
for more details. - queryset iterator with chunk size
Warning If you have used another backend before
- this one uses
uniqueidentifier
field for UUIDField while others may have used nvarchar.
Installation
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.1.0.tar.gz
(33.3 kB
view hashes)
Built Distribution
tds_django-4.1.0-py3-none-any.whl
(36.5 kB
view hashes)
Close
Hashes for tds_django-4.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f111eb3fa7f5a5a33fef95ceed16d862b46ff39cdb45fb4102b76ed983d3358 |
|
MD5 | 3dd0a477b025177cfda091eb92f8fbef |
|
BLAKE2b-256 | a01ee07cad1a369e090a8868c9a58f66143e48323116daaba7b38e5531a0dabd |