# Django Categories
[![codecov](https://codecov.io/gh/petrdlouhy/django-categories-api/branch/master/graph/badge.svg?token=rW8mpdZqWQ)](https://codecov.io/gh/petrdlouhy/django-categories-api)
[![Run Tox tests](https://github.com/PetrDlouhy/django-categories-api/actions/workflows/run-tests.yaml/badge.svg)](https://github.com/PetrDlouhy/django-categories-api/actions/workflows/run-tests.yaml)
[![Run Tox tests](https://img.shields.io/pypi/v/django-categories-api.svg)](https://pypi.python.org/pypi/django-categories-api/)
This application provides basic ``django-rest-framework`` API for Django Categories.
## Features of the project
The output contains category tree with counts of category items in each node (cummulative as well as direct counts).
## Countable fields
The API can contain number of related objects associatet with category.
This can be achieved by setting ``COUNTABLE_FIELD_RELATED_NAMES`` property in ``CATEGORIES_SETTINGS``:
```python
CATEGORIES_SETTINGS = {
"COUNTABLE_FIELD_RELATED_NAMES": ('field_name'),
}
```
## Settings
The cache timeout and staggering can be changed by:
```python
CATEGORIES_SETTINGS = {
"CACHE_TIMEOUT": 60 * 60,
"CACHE_STAGGERING": 60 * 10,
}
```
Raw data
{
"_id": null,
"home_page": "http://github.com/petrdlouhy/django-categories-api",
"name": "django-categories-api",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Petr Dlouh\u00fd",
"author_email": "petr.dlouhy@email.cz",
"download_url": "https://files.pythonhosted.org/packages/fc/80/333a4b34b907d89652790f0a0626c338a96b5e3221f608b2489a0f6c091d/django-categories-api-0.2.2.tar.gz",
"platform": null,
"description": "# Django Categories\n\n[![codecov](https://codecov.io/gh/petrdlouhy/django-categories-api/branch/master/graph/badge.svg?token=rW8mpdZqWQ)](https://codecov.io/gh/petrdlouhy/django-categories-api)\n[![Run Tox tests](https://github.com/PetrDlouhy/django-categories-api/actions/workflows/run-tests.yaml/badge.svg)](https://github.com/PetrDlouhy/django-categories-api/actions/workflows/run-tests.yaml)\n[![Run Tox tests](https://img.shields.io/pypi/v/django-categories-api.svg)](https://pypi.python.org/pypi/django-categories-api/)\n\nThis application provides basic ``django-rest-framework`` API for Django Categories.\n\n\n## Features of the project\n\nThe output contains category tree with counts of category items in each node (cummulative as well as direct counts).\n\n\n## Countable fields\n\nThe API can contain number of related objects associatet with category.\nThis can be achieved by setting ``COUNTABLE_FIELD_RELATED_NAMES`` property in ``CATEGORIES_SETTINGS``:\n\n```python\n CATEGORIES_SETTINGS = {\n \"COUNTABLE_FIELD_RELATED_NAMES\": ('field_name'),\n }\n```\n\n## Settings\n\nThe cache timeout and staggering can be changed by:\n\n```python\n CATEGORIES_SETTINGS = {\n \"CACHE_TIMEOUT\": 60 * 60,\n \"CACHE_STAGGERING\": 60 * 10,\n }\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Django-rest-framework API for django-categories",
"version": "0.2.2",
"project_urls": {
"Homepage": "http://github.com/petrdlouhy/django-categories-api"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "558c5c210f88395d687b144d963f69706fdc855e58fb0ac28b62d686d013e28f",
"md5": "ffc43577183b47868ca26ac222abac5c",
"sha256": "234bb2db6d31f19b94dd209b37762a5628d2e3f2247f01902117f66f4db2683c"
},
"downloads": -1,
"filename": "django_categories_api-0.2.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ffc43577183b47868ca26ac222abac5c",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 12448,
"upload_time": "2023-10-09T15:57:05",
"upload_time_iso_8601": "2023-10-09T15:57:05.820721Z",
"url": "https://files.pythonhosted.org/packages/55/8c/5c210f88395d687b144d963f69706fdc855e58fb0ac28b62d686d013e28f/django_categories_api-0.2.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fc80333a4b34b907d89652790f0a0626c338a96b5e3221f608b2489a0f6c091d",
"md5": "6cee96faa49b9719841054f50a699a3a",
"sha256": "01407c0536a75466ae26a22837cb748908addec645d95dd1e5a3d518c7140c90"
},
"downloads": -1,
"filename": "django-categories-api-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "6cee96faa49b9719841054f50a699a3a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 39678,
"upload_time": "2023-10-09T15:57:07",
"upload_time_iso_8601": "2023-10-09T15:57:07.334312Z",
"url": "https://files.pythonhosted.org/packages/fc/80/333a4b34b907d89652790f0a0626c338a96b5e3221f608b2489a0f6c091d/django-categories-api-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-09 15:57:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "petrdlouhy",
"github_project": "django-categories-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "django-categories-api"
}