{ "info": { "author": "Daniel Daniels", "author_email": "danields761@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3 :: Only", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Class doc\n\nSmall set of helpers aimed to extract class attributes documentation from a class definition, closely mimicking [sphinx-autodoc behaviour](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-autoattribute) (except instance attributes defined inside `__init__` function).\n\nThe main motivation for this project is undesirable integration of really heavy [sphinx-autodoc] dependency, also *sphinx* is usually used for development purposes. As opposite *class-doc* is light, serves a specific purpose and might be easily integrated in any project.\n\n## Installation\n\nThis package available on [PyPI]\n\n```bash\npip install class-doc\n```\n\nOr using [Poetry]\n\n```bash\npoetry add class-doc\n```\n\n## Examples\n\nShamely stolen from [sphinx-autodoc] docs\n\n```python\nclass Foo:\n \"\"\"Docstring for class Foo.\"\"\"\n\n #: Doc comment for class attribute Foo.bar.\n #: It can have multiple lines.\n bar = 1\n\n flox = 1.5 #: Doc comment for Foo.flox. One line only.\n\n baz = 2\n \"\"\"Docstring for class attribute Foo.baz.\"\"\"\n\n\nimport class_doc\nassert class_doc.extract_docs_from_cls_obj(Foo) == {\n \"bar\": [\"Doc comment for class attribute Foo.bar.\", \"It can have multiple lines.\"],\n \"flox\": [\"Doc comment for Foo.flox. One line only.\"],\n \"baz\": [\"Docstring for class attribute Foo.baz.\"],\n}\n```\n\n## Development setup\n\nProject requires [Poetry] for development setup.\n\n* If you aren't have it already\n\n```sh\npip install poetry\n``` \n\n* Install project dependencies\n\n```sh\npoetry install\n```\n\n* Run tests\n\n```sh\npoetry run pytest .\n```\n\n* Great, all works!\n\n\n[PyPI]: http://pypi.org\n[Poetry]: https://poetry.eustace.io/\n[sphinx-autodoc]: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-autoattribute", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/danields761/class-doc", "keywords": "", "license": "MIT", "maintainer": "Daniel Daniels", "maintainer_email": "danields761@gmail.com", "name": "class-doc", "package_url": "https://pypi.org/project/class-doc/", "platform": "", "project_url": "https://pypi.org/project/class-doc/", "project_urls": { "Homepage": "https://github.com/danields761/class-doc", "Repository": "https://github.com/danields761/class-doc" }, "release_url": "https://pypi.org/project/class-doc/0.1.1/", "requires_dist": [ "more-itertools (>=7.2,<8.0)" ], "requires_python": ">=3.6,<4.0", "summary": "Extract attributes docstrings defined in various ways", "version": "0.1.1" }, "last_serial": 5859226, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "95ad714a93132aafd317fc8a6b87f0e0", "sha256": "e7eb45ad75fcf1c48384f0d87c0d3624fd84a5e2697cf1f34406a12ca74a0d2e" }, "downloads": -1, "filename": "class_doc-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "95ad714a93132aafd317fc8a6b87f0e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 3303, "upload_time": "2019-09-19T23:22:22", "url": "https://files.pythonhosted.org/packages/12/b2/42f0974dbc6c57d54c590d29f4532696d02c4e94585b1b4a84b44b4d832d/class_doc-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2ec7672946c02374e2dbc1b38b7c299", "sha256": "530deff7ca40e10084406c59dd53ac97410797144fa1c3cd28771d4dc3fb7684" }, "downloads": -1, "filename": "class-doc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d2ec7672946c02374e2dbc1b38b7c299", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3138, "upload_time": "2019-09-19T23:22:18", "url": "https://files.pythonhosted.org/packages/93/2b/117944195da0eb84c4cfe9bb910a442f38b224caf65ebf69718c44ee9dfc/class-doc-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "dec6535c6931be1e3868052a5b1ac4cf", "sha256": "6d2f077c24607dcdd7c3287f8fe0a111a34793fed4447236595d5d12cb1acacd" }, "downloads": -1, "filename": "class_doc-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "dec6535c6931be1e3868052a5b1ac4cf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4225, "upload_time": "2019-09-19T23:25:44", "url": "https://files.pythonhosted.org/packages/73/a9/e8f3652b7a938f6ef3fae0999e3d94f6b18115a0aceaf7613fbabf12c73d/class_doc-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a61f14cc40c0c589b45a05df3cb95eb6", "sha256": "825aaf874f97b29c5670fe1d440fbec95dde61e96f36a98398df33a804f2ec8c" }, "downloads": -1, "filename": "class-doc-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a61f14cc40c0c589b45a05df3cb95eb6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4444, "upload_time": "2019-09-19T23:25:43", "url": "https://files.pythonhosted.org/packages/ae/8b/792fb871b8a8b87cbe4d5f4c0676ab993a13cd06211428fc8b25fa5d8b9a/class-doc-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dec6535c6931be1e3868052a5b1ac4cf", "sha256": "6d2f077c24607dcdd7c3287f8fe0a111a34793fed4447236595d5d12cb1acacd" }, "downloads": -1, "filename": "class_doc-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "dec6535c6931be1e3868052a5b1ac4cf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4225, "upload_time": "2019-09-19T23:25:44", "url": "https://files.pythonhosted.org/packages/73/a9/e8f3652b7a938f6ef3fae0999e3d94f6b18115a0aceaf7613fbabf12c73d/class_doc-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a61f14cc40c0c589b45a05df3cb95eb6", "sha256": "825aaf874f97b29c5670fe1d440fbec95dde61e96f36a98398df33a804f2ec8c" }, "downloads": -1, "filename": "class-doc-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a61f14cc40c0c589b45a05df3cb95eb6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4444, "upload_time": "2019-09-19T23:25:43", "url": "https://files.pythonhosted.org/packages/ae/8b/792fb871b8a8b87cbe4d5f4c0676ab993a13cd06211428fc8b25fa5d8b9a/class-doc-0.1.1.tar.gz" } ] }