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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file db_queryset_tools_pkg-1.0.0.tar.gz.
File metadata
- Download URL: db_queryset_tools_pkg-1.0.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b6bd602fbd7f3a8bb206e2073acacd9d88fe80c4d2cb8c2299fe7595369ff51
|
|
| MD5 |
05f686089cfa19465e4fd8941d036765
|
|
| BLAKE2b-256 |
5b24017c00b0054f36c7150897e5885d5e0f521d50b5e6e8aec7cf5f7d510045
|
File details
Details for the file db_queryset_tools_pkg-1.0.0-py3-none-any.whl.
File metadata
- Download URL: db_queryset_tools_pkg-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8567be086312085a9dbaddf82e49422c452d167fb83f0deb5d03f2d806ab368b
|
|
| MD5 |
b593023a22d1424897ca559a87d962bd
|
|
| BLAKE2b-256 |
edc1068811a156a1af003b476410eb28d8549467c4b79fa7b3a5398959a5cfc3
|