A package to convert Django Queryset to list, dictionary, json and dataset for charts
Project description
DB_queryset_tools
Db_queryset_tools_pkg is a Python package that provides funtionalities for converting Django QuerySets into different formats.
Instalation
pip install db_queryset_tools_pkg
Usage
from db_queryset_tools_pkg import DB_queryset_tools
tool = DB_queryset_tools()
# Convert a QuerySet to a list
list_data = tool.queryset_to_list(queryset)
# Convert a QuerySet to a dictionary
dict_data = tool.queryset_to_dict(queryset)
# Convert a QuerySet to JSON
json_data = tool.queryset_to_json(queryset)
# Get a dataset for charts from a QuerySet - two required parameters identifier_x & identifier_y according to your chart requirment
chart_data = tool.get_dataset_for_charts(queryset,'month','count')
Contribution
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for db_queryset_tools_pkg-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b6bd602fbd7f3a8bb206e2073acacd9d88fe80c4d2cb8c2299fe7595369ff51 |
|
MD5 | 05f686089cfa19465e4fd8941d036765 |
|
BLAKE2b-256 | 5b24017c00b0054f36c7150897e5885d5e0f521d50b5e6e8aec7cf5f7d510045 |
Close
Hashes for db_queryset_tools_pkg-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8567be086312085a9dbaddf82e49422c452d167fb83f0deb5d03f2d806ab368b |
|
MD5 | b593023a22d1424897ca559a87d962bd |
|
BLAKE2b-256 | edc1068811a156a1af003b476410eb28d8549467c4b79fa7b3a5398959a5cfc3 |