{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "# metabeyond - metadata utilities for modern Python code\n\n[\n ![status](https://gitlab.com/flitt3r/metabeyond/badges/master/pipeline.svg)\n ![coverage](https://gitlab.com/flitt3r/metabeyond/badges/master/coverage.svg)\n](https://gitlab.com/flitt3r/metabeyond/pipelines)\n\nA small set of utilities for writing self-documenting code, and for allowing introspection of metadata applied \nusing decorators at runtime in a similar fashion to Java 6 annotation interfaces. This entire module is heavily\ninfluenced by Java 6 annotations such as the following nonsensical example:\n\n```java\n@Configuration\n@FunctionalInterface\n@SafeForSpeedsNotExceeding( value = 1.15572735, units = ATTOPARSECS_PER_MICROFORTNIGHT) \npublic class QuantumDecoherenceStabilizer {\n @Haiku \n public void checkNodes() { \n if (tree.hasAnyRealLeafNodes()) { \n freshenLeavesOn(tree); \n } \n }\n}\n```\n\nthus providing the following Python solution:\n\n```python\n@Configuration()\n@FunctionalInterface()\n@SafeForSpeedsNotExceeding(value=1.15572735, units=ATTOPARSECS_PER_MICROFORTNIGHT)\nclass QuantumDecoherenceStabilizer:\n @haiku\n def check_nodes(self) -> str:\n if tree.has_any_real_leaf_nodes():\n freshen_leaves_on(tree)\n```\n\n(See the [Google Annotation Gallery](https://code.google.com/archive/p/gag/) for more esoteric annotation examples!) \n\n## Hints\n\nHints are designed to add some description to a docstring for utilities such as Sphinx. The idea behind using\nthis as a decorator is that decorators are often much more visible to the reader than text in docstrings, so \nit is a simple way to exploit readability. Apart from manipulating the docstring, no reference to this decorator\nis ever actually kept. It is essentially transparent.\n\n- Definition of a hint:\n\n```python\nfrom metabeyond import hints\n\n\nhaiku = hints.Hint('This is designed to be poetic to read.')\n```\n\n- Applying a hint. **Hints never have parenthesis after their name in a decoration.**\n\n```python\n@haiku\ndef basho():\n \"\"\"old pond\"\"\"\n frog.leap() in water\n sound()\n```\n\n- This provides the following effect:\n\n```python\n>>> import inspect\n>>> get_docstring = lambda o: inspect.cleandoc(inspect.getdoc(o))\n\n>>> print(get_docstring(basho))\nold pond\n\nThis is designed to be poetic to read.\n```\n\n## Remarks\n\nRemarks are the next step up from hints and are designed to register themselves unto a class or function to be detected\nlater. This is akin to how Java 6 annotations work.\n\n- Defining a remark\n\n```python\nfrom metabeyond import remarks\n\nclass Bean(remarks.Remark):\n \"\"\"Marks the object as a bean.\"\"\"\n```\n\n- Applying a remark. **Remarks always have parenthesis. Failure to add parenthesis will result in the decorated item\n being replaced by the decorator that would otherwise be called, which will cause any dependant code to break, so don't\n try it.**\n\n```python\n@Bean()\ndef bar():\n return 69 # lol\n```\n\n- We may provide more complex definitions with validation constraints on the decorated element, or with\n attributes specific to each decoration. See the documentation for a full explanation, but the following gives you\n the general idea. This example defines a route decorator similar to what is provided by \n [flask](http://flask.pocoo.org/). Applying it to a class will result in a failure. \n\n```python\nclass Route(remarks.Remark, constraint=inspect.isfunction):\n def __init__(self, route):\n self.route = route\n\n\n@Route('/about-me')\ndef about_me():\n ...\n```\n\n- Inspecting any applied remarks is also pretty easy.\n\n```python\n>>> from metabeyond import remarks\n\n>>> remarks.get_remark(Route, about_me)\nRoute(route='/about_me')\n```\n\nOther methods for searching and querying in various ways can be found in the documentation.\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": "", "keywords": "Metadata Java 6 annotation @interface hint documentation", "license": "", "maintainer": "", "maintainer_email": "", "name": "metabeyond", "package_url": "https://pypi.org/project/metabeyond/", "platform": "", "project_url": "https://pypi.org/project/metabeyond/", "project_urls": null, "release_url": "https://pypi.org/project/metabeyond/0.2.2/", "requires_dist": [ "twine ; extra == 'deploy'", "black ; extra == 'deploy'", "wheel ; extra == 'deploy'", "setuptools ; extra == 'deploy'", "sphinx ; extra == 'docs'", "graphviz ; extra == 'docs'", "Jinja2 ; extra == 'docs'", "solar-theme ; extra == 'docs'", "sphinxcontrib-fulltoc ; extra == 'docs'", "sphinx-autodoc-typehints ; extra == 'docs'", "sphinxcontrib-asyncio ; extra == 'docs'", "bandit ; extra == 'sast'", "coverage ; extra == 'test'", "asynctest ; extra == 'test'" ], "requires_python": ">=3.6.0", "summary": "Metadata for Python", "version": "0.2.2" }, "last_serial": 4730014, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "7d2c8b8f39be7568381d28f0c7bde07d", "sha256": "31b73b62b5e4b5e4b9d17e10ed6d5e69085a28eca0daec374d80b73f2d0e949e" }, "downloads": -1, "filename": "metabeyond-0.0.0.tar.gz", "has_sig": false, "md5_digest": "7d2c8b8f39be7568381d28f0c7bde07d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 7622, "upload_time": "2019-01-05T23:58:28", "url": "https://files.pythonhosted.org/packages/0c/9e/d1652f9ca66d31fd8ecc4c4e3435b98cecbafa0bd425dd37028de4e833d2/metabeyond-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "ac1f5ac7a75dab276be382b91439c513", "sha256": "baccc688ddaf551c11bcc688ab4d90313b085b7bbcb4c77b9f273882203cd633" }, "downloads": -1, "filename": "metabeyond-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ac1f5ac7a75dab276be382b91439c513", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 7909, "upload_time": "2019-01-05T22:58:57", "url": "https://files.pythonhosted.org/packages/45/dd/f7d59311e25b82dab2ebd946386c35bc8723d4f465513af029f7a0e7a4ab/metabeyond-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "b083f54668388fd5a5b66d1cd61d93a4", "sha256": "7b6704ae73f63c28fbd075dcf0d5aacd75e6b6c136fde24dca09549239b151ec" }, "downloads": -1, "filename": "metabeyond-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b083f54668388fd5a5b66d1cd61d93a4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 7905, "upload_time": "2019-01-05T23:27:56", "url": "https://files.pythonhosted.org/packages/2a/c4/3551edfb38c6f77bd4b0ca5385f23aa9f1a5d3709be139cbe9d864fa1857/metabeyond-0.0.2.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "e3e7b1d06623c35a5ea9bca96e2d74f2", "sha256": "20093b99da508c2b32d03c7ef35b1878406a0195f6bd524ddf994415b90885cb" }, "downloads": -1, "filename": "metabeyond-0.0.5.tar.gz", "has_sig": false, "md5_digest": "e3e7b1d06623c35a5ea9bca96e2d74f2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 7639, "upload_time": "2019-01-06T00:12:56", "url": "https://files.pythonhosted.org/packages/78/24/8b7286fed620a76e9740f2e6d2b9ca7f236ec311d7254eab6d25f4a0a11b/metabeyond-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "9d2309643ff0fc6dc0f77e8f088036c5", "sha256": "55a5d1d42c0f118421ed26f2dee6ff998da1a98e800ea9dbc423ead9001bfdb2" }, "downloads": -1, "filename": "metabeyond-0.0.6.tar.gz", "has_sig": false, "md5_digest": "9d2309643ff0fc6dc0f77e8f088036c5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 7628, "upload_time": "2019-01-09T10:16:21", "url": "https://files.pythonhosted.org/packages/d8/93/45d864295b2b136a177572b95a82eb4c518350b0952985d3f3e1bfb882c6/metabeyond-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "53f3662877682e8fd6a128fafe8138a7", "sha256": "3a7671a419a7f73ee1415810bfb2dc9be1572047623601b10cc45e6dba85d286" }, "downloads": -1, "filename": "metabeyond-0.0.7.tar.gz", "has_sig": false, "md5_digest": "53f3662877682e8fd6a128fafe8138a7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8256, "upload_time": "2019-01-11T07:55:49", "url": "https://files.pythonhosted.org/packages/ef/07/8d5436c420a2cd8bd08cac1bb539c20777250e8a7e3a622afac055dfb3f5/metabeyond-0.0.7.tar.gz" } ], "0.0.7a42702776": [ { "comment_text": "", "digests": { "md5": "f4d78e779dc8519b5636dbe71e2fda31", "sha256": "8516738cbaf4cc8e59a997e506c54b6ff02b7e51e294e5d1b0d0ef3ed3776f61" }, "downloads": -1, "filename": "metabeyond-0.0.7a42702776.tar.gz", "has_sig": false, "md5_digest": "f4d78e779dc8519b5636dbe71e2fda31", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8274, "upload_time": "2019-01-09T12:29:59", "url": "https://files.pythonhosted.org/packages/c1/8b/d6695205ae09624f5a7cebe30da949d7d87ce9355bc97cff7d56e4363871/metabeyond-0.0.7a42702776.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "6b5b2cbf12cf0a889fad4ff903d90e1a", "sha256": "340e381b50682cbd881213703700c08e919e62a755d0b11078efa6a3cd28638a" }, "downloads": -1, "filename": "metabeyond-0.0.8.tar.gz", "has_sig": false, "md5_digest": "6b5b2cbf12cf0a889fad4ff903d90e1a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8252, "upload_time": "2019-01-11T08:05:48", "url": "https://files.pythonhosted.org/packages/08/c1/3864ce3e44e4d3dbe556f578b451b005e0f6d6112de4c16b626cce77178a/metabeyond-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "7b7a36305fe0eb376a818b107da21f86", "sha256": "708588d8cbadcd5d4e5d90913b9f1a4cf94ad490a6eb30c1fc39e65d675f1120" }, "downloads": -1, "filename": "metabeyond-0.0.9.tar.gz", "has_sig": false, "md5_digest": "7b7a36305fe0eb376a818b107da21f86", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8543, "upload_time": "2019-01-17T14:09:58", "url": "https://files.pythonhosted.org/packages/75/44/6a4eb68203b548b3c337cc894b179b4be127c8753181c3a823304c2fb305/metabeyond-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "f0075c10fdb9e56469d0ca6d0c790080", "sha256": "ff21e2d2eca37a380761cb6989e4dedbc2af0909c95138a3e769ab2cd1dc0743" }, "downloads": -1, "filename": "metabeyond-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f0075c10fdb9e56469d0ca6d0c790080", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 10344, "upload_time": "2019-01-19T20:03:58", "url": "https://files.pythonhosted.org/packages/7f/5f/fc9409ddd8e99119132a3e9bc5838766341d7cf48e8ab00deffac9ee1070/metabeyond-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f11d9cd229396dd31aac2f0040d76bad", "sha256": "4c9b4a1248cf43a9909c9f28ae37bdd2f23d0ef16bb77432ba745bcf8972d807" }, "downloads": -1, "filename": "metabeyond-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f11d9cd229396dd31aac2f0040d76bad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 11590, "upload_time": "2019-01-20T15:02:37", "url": "https://files.pythonhosted.org/packages/80/15/d4d8aef54d18773f92ed37e3aedc77e3cd35e40991f9a98438f7d5fc5fa7/metabeyond-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "28af640abe36d0318de428c661cc4ae0", "sha256": "dabab118f449189ee42398a10951e95d22d2ed4dcd1b81056b2a56b60153a169" }, "downloads": -1, "filename": "metabeyond-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "28af640abe36d0318de428c661cc4ae0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 15230, "upload_time": "2019-01-23T09:28:34", "url": "https://files.pythonhosted.org/packages/ac/b2/534f8153ee99a9beba9e8a18ff0d7d9326871a7e8632b30551bd9a2d9d0b/metabeyond-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee8993cbcfb98f418c6ab46851165c36", "sha256": "fa1813d75a1c370ecb2df644ce02586aa6ee1dc72492c7dcbffc0aa37c76fe97" }, "downloads": -1, "filename": "metabeyond-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ee8993cbcfb98f418c6ab46851165c36", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 13570, "upload_time": "2019-01-23T09:28:35", "url": "https://files.pythonhosted.org/packages/28/6b/7906acb22450682ccdf48a86804edd1b8c1f67d3d2b1dadce0ff13f5509e/metabeyond-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "959278230fa5fb94d5b7e30602348531", "sha256": "2a3a14fa7a782f21a3b1dacd1259487841a7020badb307a189c363b399fc3a3d" }, "downloads": -1, "filename": "metabeyond-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "959278230fa5fb94d5b7e30602348531", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 15230, "upload_time": "2019-01-23T09:38:50", "url": "https://files.pythonhosted.org/packages/ab/29/7005495c4a9d0f2ec9b8503424e896809f22ac13e1fbf1c74cea13d5d3b3/metabeyond-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "066b65815da2ddfd32694ef2d1f3e855", "sha256": "e45d3f09e935cbe9289b2a1ea404c87dea431fc0c01f5ab90d617563a73fda2d" }, "downloads": -1, "filename": "metabeyond-0.2.2.tar.gz", "has_sig": false, "md5_digest": "066b65815da2ddfd32694ef2d1f3e855", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 13570, "upload_time": "2019-01-23T09:38:51", "url": "https://files.pythonhosted.org/packages/e8/7e/89c5be4c2790c3fb74fc7d74b63acdc0fbdf3797ab72047656a50e0e2109/metabeyond-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "959278230fa5fb94d5b7e30602348531", "sha256": "2a3a14fa7a782f21a3b1dacd1259487841a7020badb307a189c363b399fc3a3d" }, "downloads": -1, "filename": "metabeyond-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "959278230fa5fb94d5b7e30602348531", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 15230, "upload_time": "2019-01-23T09:38:50", "url": "https://files.pythonhosted.org/packages/ab/29/7005495c4a9d0f2ec9b8503424e896809f22ac13e1fbf1c74cea13d5d3b3/metabeyond-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "066b65815da2ddfd32694ef2d1f3e855", "sha256": "e45d3f09e935cbe9289b2a1ea404c87dea431fc0c01f5ab90d617563a73fda2d" }, "downloads": -1, "filename": "metabeyond-0.2.2.tar.gz", "has_sig": false, "md5_digest": "066b65815da2ddfd32694ef2d1f3e855", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 13570, "upload_time": "2019-01-23T09:38:51", "url": "https://files.pythonhosted.org/packages/e8/7e/89c5be4c2790c3fb74fc7d74b63acdc0fbdf3797ab72047656a50e0e2109/metabeyond-0.2.2.tar.gz" } ] }