Extensions to Django for use with MySQL/MariaDB
The dolphin-pony - proof that cute + cute = double cute.
Django-MySQL is a non-inventively named package that helps you use some MySQL/MariaDB-specific features in the world of Django.
What kind of features?
Here’s a short list of what’s inside:
- QuerySet extensions - ‘smart’ iteration, approx_count for quick estimates of count(), quick pt-visual-explain of the underlying query
- Handler - quicker reads using MySQL’s built-in NoSQL API
- Status variable inspection and utility methods
- User locks - use MySQL as a locking server between your servers
To see them all, check out the exposition at http://django-mysql.readthedocs.org/en/latest/exposition.html .
- Python: 2.7, 3.3, 3.4
- Django: 1.7, 1.8 RC
- MySQL: 5.5, 5.6 / MariaDB: 5.5, 10.0, 10.1
- mysqlclient: 1.3.5 (Python 3 compatible version of MySQL-python)
Any combination of these should be good, and also MySQL-python should work since it’s just an older version of mysqlclient.
- pt_visual_explain no longer executes the given query before fetching its EXPLAIN
- New pt_fingerprint function that wraps the pt-fingerprint tool efficiently
- For List fields, the new ListF class allows you to do atomic append or pop operations from either end of the list in a single query
- For Set fields, the new SetF class allows you to do atomic add or remove operatiosn from the set in a single query
- The @override_mysql_variables decorator has been introduced which makes testing code with different MySQL configurations easy
- The is_mariadb property gets added onto Django’s MySQL connection class automatically
- A race condition in determining the minimum and maximum primary key values for smart iteration was fixed.
- Add Set and List fields which can store comma-separated sets and lists of a base field with MySQL-specific lookups
- Support MySQL’s GROUP_CONCAT as an aggregate!
- Add a functions module with many MySQL-specific functions for the new Django 1.8 database functions feature
- Allow access of the global and session status for the default connection from a lazy singleton, similar to Django’s connection object
- Fix a different recursion error on count_tries_approx
- Renamed connection_name argument to using on Lock, GlobalStatus, and SessionStatus classes, for more consistency with Django.
- Fix recursion error on QuerySetMixin when using count_tries_approx
- Added support for HANDLER statements as a QuerySet extension
- Now tested on Django 1.8
- Add pk_range argument for ‘smart iteration’ code
- Added manage.py command dbparams for outputting database paramters in formats useful for shell scripts
- Fix release process
- Added pt_visual_explain integration on QuerySet
- Added soundex-based field lookups for the ORM
- Added get_many to GlobalStatus
- Added wait_until_load_low to GlobalStatus which allows you to wait for any high load on your database server to dissipate.
- Added smart iteration classes and methods for QuerySets that allow efficient iteration over very large sets of objects slice-by-slice.
- Added Model and QuerySet subclasses which add the approx_count method
- First release on PyPI
- GlobalStatus and SessionStatus
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size django_mysql-0.1.9-py2.py3-none-any.whl (34.1 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size django-mysql-0.1.9.tar.gz (75.8 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for django_mysql-0.1.9-py2.py3-none-any.whl