DictMySQL
PyPI page: https://pypi.python.org/pypi/dictmysql
Documentation: https://git.io/dictmysql
Introduction
DictMySQL is a MySQL query builder on the top of PyMySQL. It allows convenient database manipulation with Python dictionary.
DictMySQL simplifies and unifies the input/output of MySQL queries, by allowing passing values and conditions in dictionary into database. With DictCursor, you can even have a dict-in, dict-out mysql connector.
To install:
pip install dictmysql
Quick example:
from dictmysql import DictMySQL
db = DictMySQL(db='occupation', host='127.0.0.1', user='root', passwd='')
db.select(table='jobs',
columns=['id','value'],
where={'$OR': [{'value': {'$LIKE': 'Artist%'}}, {'id': 10}]})
# SELECT `id`, `value` FROM `jobs` WHERE (`value` LIKE "Artist%") OR (`id` = 10);
With DictCursor:
from dictmysql import DictMySQL, cursors
db = DictMySQL(db='occupation', host='127.0.0.1', user='root', passwd='',
cursorclass=cursors.DictCursor)
db.select(table='jobs',
columns=['id','value'],
limit=2)
# returns [{u'id': 1, u'value': u'Artist'}, {u'id': 2, u'value': u'Engineer'}]
Future Works
Full support of CRUD
Better documents
License
DictMySQL uses the MIT license, see LICENSE file for the details.
Metadata
Release files for dictmysql 0.6.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dictmysql-0.6.8.tar.gz | 7.8 kB | Without provenance | Details for dictmysql-0.6.8.tar.gz |
Release files / dictmysql-0.6.8.tar.gz
| Download URL | dictmysql-0.6.8.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c27e39c26f633f9edd4c3326932ac26fed1de952216798806671be362d513d0
|
|
BLAKE2b-256 checksum How to use checksums |
f9f55e04b91b4424603340051e0d02f4cff770457faae490d4952ba2ccd2bbcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dictmysql 0.6.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.