django-model-docs


Namedjango-model-docs JSON
Version 0.0.0 PyPI version JSON
download
home_page
SummaryDocs generator for Django models
upload_time2023-11-24 18:41:22
maintainerJake Kara
docs_urlNone
authorJake Kara
requires_python>=3.9
license Copyright 2023 Jake Kara Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords sample setuptools development
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Generate docs for django models

Generate extensible Markdown documentation for Django models. Developed for
cross-team collaboration when iterating on on data model specifications.

## User quickstart with an existing Django project

Install into your project requirements (`git+https://github.com/jakekara/django-model-docs.git`)

Add to the Django settings `INSTALLED_APPS`.

Generate Markdown documentation `YOUR_APP`

```shell
python manage.py generate-model-docs YOUR_APP
```

## Dev quick start

```shell
# set up a virtual env however you like. here's what I like:
python -m venv venv 
. ./venv bin activate

# set up dev stuff
pip install -r requirements.txt

# install the package in editable mode
pip install -e .

# generate docs for model(s) in the demo app
cd demo_django_project
python manage.py generate-model-docs demo_django_app
```

The output looks like this at the moment:

```markdown
# `demo_django_app`` app`

_This file was auto-generated Django Model Docs Generator.  Do not edit this file directly._

A demo Django App. Note that this text will be pulled from the app's docstring and used in the default output of `generate-model-docs`.

## `person` model

Person(id, first_name, last_name, shoeStyle)

|    Field   |Description|                                                          Data type                                                         |Nullable|Default|
|------------|-----------|----------------------------------------------------------------------------------------------------------------------------|--------|-------|
|    `id`    |           |                                                        BigAutoField                                                        |  False |   -   |
|`first_name`|           |                                                          CharField                                                         |  False |   -   |
| `last_name`|           |                                                          CharField                                                         |  False |   -   |
| `shoeStyle`|           |CharField<br><br>Choices (stored value : human readable)<br><br>- `LO` : `LOAFER`<br>- `BO` : `BOOT`<br>- `DR` : `DRESS`<br>|  False |   -   |


```

## Tests

Tests need to be run in the context of the `demo_django_app`.

```shell
cd demo_django_project
python manage.py test django-model-docs
```

To run the test suite against every supported Python version, use the command `tox` (you must have each Python version available to tox). You should see output like:

```shell
  py39: OK (2.44=setup[2.08]+cmd[0.36] seconds)
  py310: OK (2.04=setup[1.75]+cmd[0.30] seconds)
  py311: OK (2.19=setup[1.86]+cmd[0.33] seconds)
  py312: OK (6.02=setup[5.63]+cmd[0.39] seconds)
  congratulations :) (12.72 seconds)
```

If you're using `pyenv` to manage versions, you need to run `pyenv local 3.9 3.10 3.11 3.12` to make these versions accessible to tox from in the project environment.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "django-model-docs",
    "maintainer": "Jake Kara",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "sample,setuptools,development",
    "author": "Jake Kara",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/45/c5/b4753e5482e267f3a3fb42c6c43b3d13d46cbd36b4dbd46a9e6609391bbd/django-model-docs-0.0.0.tar.gz",
    "platform": null,
    "description": "# Generate docs for django models\n\nGenerate extensible Markdown documentation for Django models. Developed for\ncross-team collaboration when iterating on on data model specifications.\n\n## User quickstart with an existing Django project\n\nInstall into your project requirements (`git+https://github.com/jakekara/django-model-docs.git`)\n\nAdd to the Django settings `INSTALLED_APPS`.\n\nGenerate Markdown documentation `YOUR_APP`\n\n```shell\npython manage.py generate-model-docs YOUR_APP\n```\n\n## Dev quick start\n\n```shell\n# set up a virtual env however you like. here's what I like:\npython -m venv venv \n. ./venv bin activate\n\n# set up dev stuff\npip install -r requirements.txt\n\n# install the package in editable mode\npip install -e .\n\n# generate docs for model(s) in the demo app\ncd demo_django_project\npython manage.py generate-model-docs demo_django_app\n```\n\nThe output looks like this at the moment:\n\n```markdown\n# `demo_django_app`` app`\n\n_This file was auto-generated Django Model Docs Generator.  Do not edit this file directly._\n\nA demo Django App. Note that this text will be pulled from the app's docstring and used in the default output of `generate-model-docs`.\n\n## `person` model\n\nPerson(id, first_name, last_name, shoeStyle)\n\n|    Field   |Description|                                                          Data type                                                         |Nullable|Default|\n|------------|-----------|----------------------------------------------------------------------------------------------------------------------------|--------|-------|\n|    `id`    |           |                                                        BigAutoField                                                        |  False |   -   |\n|`first_name`|           |                                                          CharField                                                         |  False |   -   |\n| `last_name`|           |                                                          CharField                                                         |  False |   -   |\n| `shoeStyle`|           |CharField<br><br>Choices (stored value : human readable)<br><br>- `LO` : `LOAFER`<br>- `BO` : `BOOT`<br>- `DR` : `DRESS`<br>|  False |   -   |\n\n\n```\n\n## Tests\n\nTests need to be run in the context of the `demo_django_app`.\n\n```shell\ncd demo_django_project\npython manage.py test django-model-docs\n```\n\nTo run the test suite against every supported Python version, use the command `tox` (you must have each Python version available to tox). You should see output like:\n\n```shell\n  py39: OK (2.44=setup[2.08]+cmd[0.36] seconds)\n  py310: OK (2.04=setup[1.75]+cmd[0.30] seconds)\n  py311: OK (2.19=setup[1.86]+cmd[0.33] seconds)\n  py312: OK (6.02=setup[5.63]+cmd[0.39] seconds)\n  congratulations :) (12.72 seconds)\n```\n\nIf you're using `pyenv` to manage versions, you need to run `pyenv local 3.9 3.10 3.11 3.12` to make these versions accessible to tox from in the project environment.\n",
    "bugtrack_url": null,
    "license": "  Copyright 2023 Jake Kara  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Docs generator for Django models",
    "version": "0.0.0",
    "project_urls": {
        "Bug Reports": "https://github.com/jakekara/django-model-docs/issues",
        "Homepage": "https://github.com/jakekara/django-model-docs/",
        "Source": "https://github.com/jakekara/django-model-docs/"
    },
    "split_keywords": [
        "sample",
        "setuptools",
        "development"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13e17cf6718d76212c6478c95cb9fc1142aeecfcd7e1bf5b9bf42242ad6e7f05",
                "md5": "508d49b48320fa25950bffdad537b61b",
                "sha256": "1b366c347c0db97a42104889ad7999dde37cd047ceda73977ffb7ce57607aa05"
            },
            "downloads": -1,
            "filename": "django_model_docs-0.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "508d49b48320fa25950bffdad537b61b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 16606,
            "upload_time": "2023-11-24T18:41:20",
            "upload_time_iso_8601": "2023-11-24T18:41:20.234166Z",
            "url": "https://files.pythonhosted.org/packages/13/e1/7cf6718d76212c6478c95cb9fc1142aeecfcd7e1bf5b9bf42242ad6e7f05/django_model_docs-0.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "45c5b4753e5482e267f3a3fb42c6c43b3d13d46cbd36b4dbd46a9e6609391bbd",
                "md5": "f78ffefda2f5fe4dc0434a14b1fb18c1",
                "sha256": "ceba69677307f11f5d520a3615efd62521ede19c76484cb51402b56427bb1d62"
            },
            "downloads": -1,
            "filename": "django-model-docs-0.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f78ffefda2f5fe4dc0434a14b1fb18c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 12455,
            "upload_time": "2023-11-24T18:41:22",
            "upload_time_iso_8601": "2023-11-24T18:41:22.087188Z",
            "url": "https://files.pythonhosted.org/packages/45/c5/b4753e5482e267f3a3fb42c6c43b3d13d46cbd36b4dbd46a9e6609391bbd/django-model-docs-0.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-24 18:41:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jakekara",
    "github_project": "django-model-docs",
    "github_not_found": true,
    "lcname": "django-model-docs"
}
        
Elapsed time: 0.13505s