{ "info": { "author": "Andrzej Klajnert", "author_email": "py@aklajnert.pl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Code Generators" ], "description": "# graphanno\n\nUse Python 3.6+ type annotations to generate the graphene `ObjectType` classes. \n\n\n## Installation\n\nYou can install the project via `pip` by running: \n```bash\npip install graphanno\n```\n\nInstallation from source: \n```bash\npython setup.py install\n```\n\n## Usage\n\nThe `@graphanno.graph_annotations` decorator works only with classes that contains type \nannotations. If there are no type annotations within the decorator target, \n`NoAnnotationsError` exception is raised. Arguments without annotations will\nbe ignored.\n\nTo create the `graphene.ObjectType` object, you can just decorate your class with \n`@graphanno.graph_annotations`. \n\nIt is recommended to subclass `graphanno.ObjectType` to provide hints for IDE's. \nThis is not mandatory, the `@graphanno.graph_annotations` will replace your decorated class \nwith the `ObjectType` subclass anyway.\n\n```python\nimport graphene\nimport graphanno\n\n# the class below...\n@graphanno.graph_annotations\nclass Graphanno(graphanno.ObjectType):\n value: str\n\n# ... is equivalent to:\nclass Graphene(graphene.ObjectType):\n value = graphene.String()\n```\n\nIf you still need your class with type annotations, set `__model__` variable to annotated\nclass within the decorated one:\n\n```python\nimport graphene\nimport graphanno\n\nclass Annotated: # this class will be still available later\n value: str\n\n# the class below...\n@graphanno.graph_annotations\nclass Graphanno(graphanno.ObjectType): \n \"\"\"\n This class can inherit from graphene.ObjectType already, \n but it won't change the @graph_annotations behavior.\n \"\"\"\n __model__ = Annotated\n\n# ... is equivalent to:\nclass Graphene(graphene.ObjectType):\n value = graphene.String()\n```\n\nIf another class with the same name will be decorated, the `SchemaClashError` exception\nwill be raised.\n\n### Additional parameters\n\n- `__excluded_fields__` (tuple): names of the fields that will be excluded from\nschema. Private attributes are always excluded.\n- `__ignore_unsupported__` (bool): do not raise an exception for unsupported annotations. \nDefault `False`.\n\n## Supported annotations\n\nThe class decorated with `@graph_annotations` can use type annotations listed below.\n\n - str\n - int\n - float\n - bool\n - datetime.datetime\n - datetime.date\n - datetime.time\n - typing.List\n - custom classes with supported type annotations\n\nUsing unsupported annotations will raise the `UnsupportedAnnotationError` exception. \nTo ignore this exception set `__ignore_unsupported__` to `True` in the decorated class.\n\n\n\n", "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/aklajnert/graphanno", "keywords": "graphene graphql type_annotations annotations", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "graphanno", "package_url": "https://pypi.org/project/graphanno/", "platform": "", "project_url": "https://pypi.org/project/graphanno/", "project_urls": { "Bug Reports": "https://github.com/aklajnert/graphanno/issues", "Homepage": "https://github.com/aklajnert/graphanno", "Source": "https://github.com/aklajnert/graphanno" }, "release_url": "https://pypi.org/project/graphanno/1.3.1/", "requires_dist": [ "graphene (<3,>=2.0)", "pytest ; extra == 'test'", "pylint ; extra == 'test'", "flake8 ; extra == 'test'" ], "requires_python": ">=3.6, <4", "summary": "Create graphene ObjectType based on the type annotations.", "version": "1.3.1" }, "last_serial": 5425205, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "05dcb70e72e08f2e6f8eff8ab5e36bb9", "sha256": "2192efab24f14690401bbc9d50b2074b6e3f0d7b7f46002d92c4f6d33d6ba81c" }, "downloads": -1, "filename": "graphanno-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "05dcb70e72e08f2e6f8eff8ab5e36bb9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 6120, "upload_time": "2019-02-11T15:16:27", "url": "https://files.pythonhosted.org/packages/89/af/5687061b7c892e5a4d75323df1be7fe9d97c90c2496d71e897cb9fcbc498/graphanno-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "772a10c4de8487ec37695b0c531d3b97", "sha256": "521c4179e871cbf38aebd4f166e16f391e78d701daa5bef08ab544b34cf7326d" }, "downloads": -1, "filename": "graphanno-1.0.0.tar.gz", "has_sig": false, "md5_digest": "772a10c4de8487ec37695b0c531d3b97", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 4279, "upload_time": "2019-02-11T15:16:29", "url": "https://files.pythonhosted.org/packages/79/69/64f1796b2498b3b6edccec3ce2604fe6aae82c19a7c80de4a032ac1c6fd9/graphanno-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "9a6d308ac9df2cd5c93e22247916fbc7", "sha256": "9d15e108cfd32b5f6fd299d0b6be539cab82d2bc4f84cf8483381d9cced5135a" }, "downloads": -1, "filename": "graphanno-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9a6d308ac9df2cd5c93e22247916fbc7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 6354, "upload_time": "2019-02-14T14:57:30", "url": "https://files.pythonhosted.org/packages/87/52/04b8eb778724250facb712829622bddcb2e7b8299eaa6afd34e83ffd61f6/graphanno-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7f7fd7b3a5af7cf3a9d4751b43dfd1c2", "sha256": "c83a786a22d1b8c756f56cb035e7463731ca5f7389396532ddd3a0bf81acb161" }, "downloads": -1, "filename": "graphanno-1.1.0.tar.gz", "has_sig": false, "md5_digest": "7f7fd7b3a5af7cf3a9d4751b43dfd1c2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 4596, "upload_time": "2019-02-14T14:57:31", "url": "https://files.pythonhosted.org/packages/0a/d8/c64ecb3aa0a8da8a28aa7cd50c194e9c95d9594170a3c29b7338781b3a0c/graphanno-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "c6dea77a9b47ed82338e65f2b8c4006b", "sha256": "e2949fdb4b997529df27ece635e90278f3eed47da356186c762b60852c8cbe31" }, "downloads": -1, "filename": "graphanno-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c6dea77a9b47ed82338e65f2b8c4006b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 7515, "upload_time": "2019-02-15T21:17:14", "url": "https://files.pythonhosted.org/packages/9a/6d/f45cef58f3df60a61ab5cca48735b786e54da7d486f42dd841eb70197f78/graphanno-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ac639ed610a1ccc5469a1163443c08d", "sha256": "6c97d6e6b5593a20f1cdb3d0c71d082ba886f736991fd086f05e05e416d372ca" }, "downloads": -1, "filename": "graphanno-1.2.0.tar.gz", "has_sig": false, "md5_digest": "7ac639ed610a1ccc5469a1163443c08d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 5436, "upload_time": "2019-02-15T21:17:16", "url": "https://files.pythonhosted.org/packages/85/cb/6549da0ac351285f10305a9f7700eaeb7dcbac6529d3b886912fb7e6859e/graphanno-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "3c02a04a333218f7c16b976bd80d112f", "sha256": "6e694b350452a119dc93e312894cbe52593f99826db3be038fbb0878ba82b868" }, "downloads": -1, "filename": "graphanno-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3c02a04a333218f7c16b976bd80d112f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 7663, "upload_time": "2019-03-08T15:47:53", "url": "https://files.pythonhosted.org/packages/b6/1f/93078e33da776e002cc2f8658d29368e1892f67ba84cfa5d1f94be7b5576/graphanno-1.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2c1698c29a5b66bdffc8afa6e32e22a", "sha256": "6463727d36780887d3274e06c15abad986a62aefd73a3e6849e1e503af650201" }, "downloads": -1, "filename": "graphanno-1.3.0.tar.gz", "has_sig": false, "md5_digest": "d2c1698c29a5b66bdffc8afa6e32e22a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 5569, "upload_time": "2019-03-08T15:47:54", "url": "https://files.pythonhosted.org/packages/8d/ef/9cfd3ca4e28b233b599d5b9c0a0826c12bb3292281de658e12c31a3aa401/graphanno-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "c3a4645e01c34f84eff88d5bfbc2ad64", "sha256": "83ad805b399e76034fb95ddb24405bbc0a587c06351b396a9101fb454c20489d" }, "downloads": -1, "filename": "graphanno-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c3a4645e01c34f84eff88d5bfbc2ad64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 7662, "upload_time": "2019-06-20T10:33:49", "url": "https://files.pythonhosted.org/packages/5c/43/2a265a0675ca2e06822cb1e044f67d453e572d018041c9aee83818fda871/graphanno-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "104ca6e7396297211d17517d9058b21d", "sha256": "3b12e3ad53f987065c6f4d29de607aeb2b0054cdae3cc75f617fa4b0fe6f2042" }, "downloads": -1, "filename": "graphanno-1.3.1.tar.gz", "has_sig": false, "md5_digest": "104ca6e7396297211d17517d9058b21d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 5570, "upload_time": "2019-06-20T10:33:51", "url": "https://files.pythonhosted.org/packages/71/78/522405ba9631f814c6817c5bab35a42b6337a0ddd7f6d16db17ecf383c68/graphanno-1.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c3a4645e01c34f84eff88d5bfbc2ad64", "sha256": "83ad805b399e76034fb95ddb24405bbc0a587c06351b396a9101fb454c20489d" }, "downloads": -1, "filename": "graphanno-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c3a4645e01c34f84eff88d5bfbc2ad64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 7662, "upload_time": "2019-06-20T10:33:49", "url": "https://files.pythonhosted.org/packages/5c/43/2a265a0675ca2e06822cb1e044f67d453e572d018041c9aee83818fda871/graphanno-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "104ca6e7396297211d17517d9058b21d", "sha256": "3b12e3ad53f987065c6f4d29de607aeb2b0054cdae3cc75f617fa4b0fe6f2042" }, "downloads": -1, "filename": "graphanno-1.3.1.tar.gz", "has_sig": false, "md5_digest": "104ca6e7396297211d17517d9058b21d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 5570, "upload_time": "2019-06-20T10:33:51", "url": "https://files.pythonhosted.org/packages/71/78/522405ba9631f814c6817c5bab35a42b6337a0ddd7f6d16db17ecf383c68/graphanno-1.3.1.tar.gz" } ] }