django-tidb · PyPI


本站和网页 https://pypi.org/project/django-tidb/ 的作者无关,不对其内容负责。快照谨为网络故障时之索引,不代表被搜索网站的即时页面。

django-tidb · PyPI
Skip to main content
Switch to mobile version
Warning
Some features may not work without JavaScript. Please try enabling it if you encounter problems.
Search PyPI
search-focus#focusSearchField" data-search-focus-target="searchField">
Search
Help
Sponsors
Log in
Register
Menu
Help
Sponsors
Log in
Register
Search PyPI
Search
django-tidb 4.2.1
pip install django-tidb
Copy PIP instructions
Latest version
Released:
Sep 7, 2023
Django backend for TiDB
Navigation
Project description
Release history
Download files
Project links
Bug Reports
Homepage
Source
Statistics
GitHub statistics:
Stars:
Forks:
Open issues:
Open PRs:
View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery
Meta
License: Apache Software License
Author: Xiang Zhang
Requires: Python >=3.8
Maintainers
blacktear23
wd0517
zhangyangyu
Classifiers
Development Status
5 - Production/Stable
Framework
Django
Django :: 4.2
License
OSI Approved :: Apache Software License
Operating System
OS Independent
Programming Language
Python
Python :: 3
Python :: 3.8
Python :: 3.9
Python :: 3.10
Python :: 3.11
Project description
Project details
Release history
Download files
Project description
TiDB dialect for Django
This adds compatibility for TiDB to Django.
Installation Guide
Prerequisites
Before installing django-tidb, ensure you have a MySQL driver installed. You can choose either mysqlclient(recommended) or pymysql(at your own risk).
Install mysqlclient (Recommended)
Please refer to the mysqlclient official guide
Install pymysql (At your own risk)
django-tidb has not been tested with pymysql
pip install pymysql
Then add the following code at the beginning of your Django's settings.py:
import pymysql
pymysql.install_as_MySQLdb()
Installing django-tidb
To install django-tidb, you need to select the version that corresponds with your Django version. Please refer to the table below for guidance:
The minor release number of Django doesn't correspond to the minor release number of django-tidb. Use the latest minor release of each.
django
django-tidb
install command
v4.2.x
v4.2.x
pip install 'django-tidb>=4.2.0,<4.3.0'
v4.1.x
v4.1.x
pip install 'django-tidb>=4.1.0,<4.2.0'
v3.2.x
v3.2.x
pip install 'django-tidb>=3.2.0,<3.3.0'
Usage
Set 'ENGINE': 'django_tidb' in your settings to this:
DATABASES = {
'default': {
'ENGINE': 'django_tidb',
'NAME': 'django',
'USER': 'root',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': 4000,
},
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
USE_TZ = False
SECRET_KEY = 'django_tests_secret_key'
Supported versions
TiDB 4.0 and newer
Django 3.2, 4.1 and 4.2
Python 3.6 and newer(must match Django's Python version requirement)
Test
create your virtualenv with:
$ virtualenv venv
$ source venv/bin/activate
you can use the command deactivate to exit from the virtual environment.
run all integration tests.
$ DJANGO_VERSION=3.2.12 python run_testing_worker.py
Migrate from previous versions
Releases on PyPi before 3.0.0 are published from repository https://github.com/blacktear23/django_tidb. This repository is a new implementation and released under versions from 3.0.0. No backwards compatibility is ensured. The most significant points are:
Only Django 3.2 and 4.0 are tested and supported.
Engine name is django_tidb instead of django_tidb.tidb.
Known issues
TiDB before v6.6.0 does not support FOREIGN KEY constraints(#18209).
TiDB before v6.2.0 does not support SAVEPOINT(#6840).
Project details
Project links
Bug Reports
Homepage
Source
Statistics
GitHub statistics:
Stars:
Forks:
Open issues:
Open PRs:
View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery
Meta
License: Apache Software License
Author: Xiang Zhang
Requires: Python >=3.8
Maintainers
blacktear23
wd0517
zhangyangyu
Classifiers
Development Status
5 - Production/Stable
Framework
Django
Django :: 4.2
License
OSI Approved :: Apache Software License
Operating System
OS Independent
Programming Language
Python
Python :: 3
Python :: 3.8
Python :: 3.9
Python :: 3.10
Python :: 3.11
Release history
Release notifications |
RSS feed
This version
4.2.1
Sep 7, 2023
4.2.0
Aug 20, 2023
4.1.1
Sep 8, 2023
4.1.0
Aug 20, 2023
3.2.1
Sep 8, 2023
3.2.0
Aug 20, 2023
3.0.0
Apr 14, 2022
2.1.1
Sep 25, 2018
2.1
Sep 11, 2017
2.0
Aug 17, 2017
1.0
Aug 3, 2017
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-tidb-4.2.1.tar.gz
(17.6 kB
view hashes)
Uploaded
Sep 7, 2023
source
Built Distribution
django_tidb-4.2.1-py3-none-any.whl
(19.1 kB
view hashes)
Uploaded
Sep 7, 2023
py3
Close
Hashes for django-tidb-4.2.1.tar.gz
Hashes for django-tidb-4.2.1.tar.gz
Algorithm
Hash digest
SHA256
7270b12499f46b8af6cb88ade6737b8d05607f8cf2d853caae3166faf8b2f88a
Copy
MD5
589153ae369461c26807ffa6062f079c
Copy
BLAKE2b-256
a469b610826886fc6154619ae06f03af9670eb2b202e517d58a15dc59a672f7f
Copy
Close
Close
Hashes for django_tidb-4.2.1-py3-none-any.whl
Hashes for django_tidb-4.2.1-py3-none-any.whl
Algorithm
Hash digest
SHA256
275034fd4a8d421d991d762b8d25d6cc578ef91911a380a3f7a398cf9f0b79d5
Copy
MD5
3f6a32b5f621092f00c8e4200bb9dbda
Copy
BLAKE2b-256
f73c7f5429cbf762bbbadd60ee3d1f14206474383d754ffb431c466f016cd0c9
Copy
Close
Help
Installing packages
Uploading packages
User guide
Project name retention
FAQs
About PyPI
PyPI on Twitter
Infrastructure dashboard
Statistics
Logos & trademarks
Our sponsors
Contributing to PyPI
Bugs and feedback
Contribute on GitHub
Translate PyPI
Sponsor PyPI
Development credits
Using PyPI
Code of conduct
Report security issue
Privacy policy
Terms of use
Acceptable Use Policy
Status:
all systems operational
Developed and maintained by the Python community, for the Python community.
Donate today!
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2023 Python Software Foundation
Site map
Switch to desktop version
English
español
français
日本語
português (Brasil)
українська
Ελληνικά
Deutsch
中文 (简体)
中文 (繁體)
русский
עברית
esperanto
Supported by
AWS
Cloud computing and Security Sponsor
Datadog
Monitoring
Fastly
CDN
Google
Download Analytics
Microsoft
PSF Sponsor
Pingdom
Monitoring
Sentry
Error logging
StatusPage
Status page