{"id":21832888,"url":"https://github.com/null-none/django-odbc","last_synced_at":"2025-03-21T13:44:16.833Z","repository":{"id":62591169,"uuid":"484816592","full_name":"null-none/django-odbc","owner":"null-none","description":"django-odbc is a SQL Server DB backend powered by the pyodbc library","archived":false,"fork":false,"pushed_at":"2022-04-25T20:23:52.000Z","size":41,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-26T11:05:33.561Z","etag":null,"topics":["django","odbc","python","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/null-none.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-23T17:43:42.000Z","updated_at":"2023-03-10T07:07:22.000Z","dependencies_parsed_at":"2022-11-03T22:51:31.315Z","dependency_job_id":null,"html_url":"https://github.com/null-none/django-odbc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-odbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-odbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-odbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-odbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/null-none","download_url":"https://codeload.github.com/null-none/django-odbc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244807285,"owners_count":20513608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","odbc","python","sql"],"created_at":"2024-11-27T19:26:51.062Z","updated_at":"2025-03-21T13:44:16.809Z","avatar_url":"https://github.com/null-none.png","language":"Python","readme":"Django ODBC\n===================\n\ndjango-odbc is a SQL Server DB backend powered by the pyodbc library. pyodbc is a mature, viable way to access SQL Server from Python in multiple platforms and is actively maintained. It's also used by SQLAlchemy for SQL Server connections.\n\n\nInstallation\n------------\n\nUsing pip\n\n\n    $ pip install django-odbc\n\n\nExample\n-----\n\n    DATABASES = {\n         'default': {\n             'ENGINE': \"django_odbc\",\n             'HOST': \"127.0.0.1,1433\",\n             'USER': \"mssql_user\",\n             'PASSWORD': \"mssql_password\",\n             'NAME': \"database_name\",\n             'OPTIONS': {\n                 'host_is_server': True\n             },\n         }\n    }\n    python -c 'import pyodbc; print(pyodbc.connect(\"DSN=foobar_mssql_data_source_name;UID=foo;PWD=bar\").cursor().execute(\"select 1\"))'\n\n\nSettings\n-----\n\n\n``NAME`` String. Database name. Required.\n\n``HOST`` String. SQL Server instance in ``server\\instance`` or ``ip,port`` format.\n\n``PORT`` String. SQL Server port.\n\n``USER`` String. Database user name. If not given then MS Integrated Security\nwill be used.\n\n``PASSWORD`` String. Database user password.\n\n``OPTIONS`` Dictionary. Current available keys:\n\n* ``driver``\n\n  String. ODBC Driver to use. Default is ``\"SQL Server\"`` on Windows and ``\"FreeTDS\"`` on other platforms.\n\n* ``dsn``\n\n  String. A named DSN can be used instead of ``HOST``.\n\n* ``autocommit``\n\n  Boolean. Indicates if pyodbc should direct the the ODBC driver to activate the autocommit feature. Default value is ``False``.\n\n* ``MARS_Connection``\n\n  Boolean. Only relevant when running on Windows and with SQL Server 2005 or later through MS *SQL Server Native client* driver (i.e. setting ``driver`` to ``\"SQL Server Native Client 11.0\"``). See http://msdn.microsoft.com/en-us/library/ms131686.aspx.  Default value is ``False``.\n\n* ``host_is_server``\n\n  Boolean. Only relevant if using the FreeTDS ODBC driver under Unix/Linux.\n\n  By default, when using the FreeTDS ODBC driver the value specified in the ``HOST`` setting is used in a ``SERVERNAME`` ODBC connection string component instead of being used in a ``SERVER`` component; this means that this value should be the name of a *dataserver* definition present in the ``freetds.conf`` FreeTDS configuration file instead of a hostname or an IP address.\n\n  But if this option is present and it's value is True, this special behavior is turned off.\n\n  See http://freetds.org/userguide/dsnless.htm for more information.\n\n* ``extra_params``\n\n  String. Additional parameters for the ODBC connection. The format is\n  ``\"param=value;param=value\"``.\n\n* ``collation``\n\n  String. Name of the collation to use when performing text field lookups against the database. For Chinese language you can set it to ``\"Chinese_PRC_CI_AS\"``. The default collation for the database will be used if no value is specified.\n\n* ``encoding``\n\n  String. Encoding used to decode data from this database. Default is 'utf-8'.\n\n* ``driver_needs_utf8``\n\n  Boolean. Some drivers (FreeTDS, and other ODBC drivers?) don't support Unicode yet, so SQL clauses' encoding is forced to utf-8 for those cases.\n\n  If this option is not present, the value is guessed according to the driver set.\n\n* ``limit_table_list``\n\n  Boolean.  This will restrict the table list query to the dbo schema.\n\n* ``openedge``\n\n  Boolean.  This will trigger support for Progress Openedge\n\n* ``left_sql_quote`` , ``right_sql_quote``\n\n  String.  Specifies the string to be inserted for left and right quoting of SQL identifiers respectively.  Only set these if django-pyodbc isn't guessing the correct quoting for your system.  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnull-none%2Fdjango-odbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnull-none%2Fdjango-odbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnull-none%2Fdjango-odbc/lists"}