{ "info": { "author": "Fatih K\u0131l\u0131\u00e7", "author_email": "m.fatihklc0@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], "description": "# Attribute Router\n\n![Travis (.org)](https://img.shields.io/travis/FKLC/AttributeRouter.svg?style=flat-square)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/AttributeRouter.svg?style=flat-square)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/AttributeRouter.svg?style=flat-square)\n![GitHub release](https://img.shields.io/github/release/FKLC/AttributeRouter.svg?style=flat-square)\n![GitHub](https://img.shields.io/github/license/FKLC/AttributeRouter.svg?style=flat-square)\n\nAttribute Router is a library that chains calls of attributes of class and if regex matches it returns method.\n\n## Quick Start\n\n```python\nimport re\n\nfrom attribute_router import Router\n\n\nclass Printer(Router):\n def __init__(self):\n super().__init__(\n routes={\n re.compile(\" (.*) PRINT\"): self.print_match\n },\n join_char=\" \"\n )\n\n def print_match(self, prefix, _match):\n print(prefix, _match.group(1))\n\nPrinter().hello.world('!').again.PRINT(\"Hello and\")\n```\n\nSo to define routes we use compiled regex and the method itself also don't forget to inherit from `attribute_router.Router`\n\n---\n\n## Installation\n\nLibrary is on PyPi so just run\n\n```\npip install AttributeRouter\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/FKLC/AttributeRouter", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "AttributeRouter", "package_url": "https://pypi.org/project/AttributeRouter/", "platform": "", "project_url": "https://pypi.org/project/AttributeRouter/", "project_urls": { "Homepage": "https://github.com/FKLC/AttributeRouter" }, "release_url": "https://pypi.org/project/AttributeRouter/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "An Attribute Router/Chainer For Any Class", "version": "1.0.0" }, "last_serial": 5212595, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "50f48099d38325a682e425a24c77e0eb", "sha256": "d3aed969fa072ce09f323a864f0cb04a98a3075e296a5ba31f49529451c235ba" }, "downloads": -1, "filename": "AttributeRouter-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "50f48099d38325a682e425a24c77e0eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3211, "upload_time": "2019-05-01T12:45:16", "url": "https://files.pythonhosted.org/packages/3d/5c/6c438eab5ba86143259fd08e2872b769b65db4345b5fe2d8c31151153f2d/AttributeRouter-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d417054ee4acad59bd48e3a56cabd2f8", "sha256": "3552ab6af1978da364a5ce90c47ff83dbe5161379984ccd32418d0cfc96a95a2" }, "downloads": -1, "filename": "AttributeRouter-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d417054ee4acad59bd48e3a56cabd2f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2110, "upload_time": "2019-05-01T12:45:18", "url": "https://files.pythonhosted.org/packages/46/b7/74f5f2f016facd69b9b31b21cb00d38ccb96a67606d3780f7c6778c817f9/AttributeRouter-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "50f48099d38325a682e425a24c77e0eb", "sha256": "d3aed969fa072ce09f323a864f0cb04a98a3075e296a5ba31f49529451c235ba" }, "downloads": -1, "filename": "AttributeRouter-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "50f48099d38325a682e425a24c77e0eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3211, "upload_time": "2019-05-01T12:45:16", "url": "https://files.pythonhosted.org/packages/3d/5c/6c438eab5ba86143259fd08e2872b769b65db4345b5fe2d8c31151153f2d/AttributeRouter-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d417054ee4acad59bd48e3a56cabd2f8", "sha256": "3552ab6af1978da364a5ce90c47ff83dbe5161379984ccd32418d0cfc96a95a2" }, "downloads": -1, "filename": "AttributeRouter-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d417054ee4acad59bd48e3a56cabd2f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2110, "upload_time": "2019-05-01T12:45:18", "url": "https://files.pythonhosted.org/packages/46/b7/74f5f2f016facd69b9b31b21cb00d38ccb96a67606d3780f7c6778c817f9/AttributeRouter-1.0.0.tar.gz" } ] }