{ "info": { "author": "Anshul Kharbanda", "author_email": "akanshul97@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# good_interface\n\nProvides the Interface class and other utilities which can define method \"interfaces\" which automatically check method implementation in classes and objects.\n\n## Interfaces\n\nAn Interface is a collection of methods that are to be implemented in classes that implement this Interface. The Interface class can define Interfaces from a class skeleton.\n\n```python\nfrom good_interface import Interface\n\n@Interface\nclass MyInterface:\n def method1(self, arg1, arg2):\n pass\n\n def method2(self, arg2):\n pass\n```\n\nSince the interface is callable, you can call the new Interface object as a decorator on a class, which provides a check on the given class, ensuring that it implements the defined methods in the given interface.\n\n```python\nfrom good_interface import Interface\n\n@Interface\nclass MyInterface:\n def method1(self, arg1, arg2):\n pass\n\n def method2(self, arg2):\n pass\n\n@MyInterface\nclass MyClass:\n def method1(self, arg1, arg2):\n pass\n\n def method2(self, arg2):\n pass\n```\n\nCalling the interface on another interface will extends the interface, adding the methods of this current interface to the new interface\n\n```python\nfrom good_interface import Interface\n\n@Interface\nclass MyInterface1:\n def method1(self):\n pass\n\n@MyInterface1\n@Interface\nclass MyInterface2:\n def method2(self, arg1, arg2):\n pass\n\n def method3(self, arg2):\n pass\n\n# Creates:\n#\n# @Interface\n# class MyInterface2:\n# def method1(self):\n# pass\n#\n# def method2(self, arg1, arg2):\n# pass\n#\n# def method3(self, arg2):\n# pass\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.org/andydevs/good-handlers", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "good-interface", "package_url": "https://pypi.org/project/good-interface/", "platform": "", "project_url": "https://pypi.org/project/good-interface/", "project_urls": { "Homepage": "https://www.github.org/andydevs/good-handlers" }, "release_url": "https://pypi.org/project/good-interface/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Provides the Interface class and other interface utilities.", "version": "1.0.1" }, "last_serial": 4005932, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "2253182096dded42291c7af7c85dbd70", "sha256": "afa056ddc9f57a5564f370d69cb30eecea2106672d80ae80d793522ab5e0ed9b" }, "downloads": -1, "filename": "good-interface-1.0.0.tar.gz", "has_sig": false, "md5_digest": "2253182096dded42291c7af7c85dbd70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2542, "upload_time": "2018-06-27T03:40:10", "url": "https://files.pythonhosted.org/packages/c2/ee/7156d4e8650a23058ee3eb3a741d4d8e95e9ce173c412787bcbf03bdaf16/good-interface-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8ec7e097543f1ea00b52496c32fb9efb", "sha256": "6720a6c1cc75c6a5566204c9c2b2ef857985009aebb2cb45a832cf8186c16474" }, "downloads": -1, "filename": "good-interface-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8ec7e097543f1ea00b52496c32fb9efb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2528, "upload_time": "2018-06-27T04:29:50", "url": "https://files.pythonhosted.org/packages/20/2b/fb30b110cc7596870376ebe16a2efea4e226394d5422c03271638435e998/good-interface-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8ec7e097543f1ea00b52496c32fb9efb", "sha256": "6720a6c1cc75c6a5566204c9c2b2ef857985009aebb2cb45a832cf8186c16474" }, "downloads": -1, "filename": "good-interface-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8ec7e097543f1ea00b52496c32fb9efb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2528, "upload_time": "2018-06-27T04:29:50", "url": "https://files.pythonhosted.org/packages/20/2b/fb30b110cc7596870376ebe16a2efea4e226394d5422c03271638435e998/good-interface-1.0.1.tar.gz" } ] }