{ "info": { "author": "Sanhe Hu", "author_email": "husanhe@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": ".. image:: https://travis-ci.org/MacHu-GWU/inspect_mate-project.svg?branch=master\n :target: https://travis-ci.org/MacHu-GWU/inspect_mate-project?branch=master\n\n.. image:: https://codecov.io/gh/MacHu-GWU/inspect_mate-project/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/MacHu-GWU/inspect_mate-project\n\n.. image:: https://img.shields.io/pypi/v/inspect_mate.svg\n :target: https://pypi.python.org/pypi/inspect_mate\n\n.. image:: https://img.shields.io/pypi/l/inspect_mate.svg\n :target: https://pypi.python.org/pypi/inspect_mate\n\n.. image:: https://img.shields.io/pypi/pyversions/inspect_mate.svg\n :target: https://pypi.python.org/pypi/inspect_mate\n\n.. image:: https://img.shields.io/badge/Star_Me_on_GitHub!--None.svg?style=social\n :target: https://github.com/MacHu-GWU/inspect_mate-project\n\n\nWelcome to ``inspect_mate`` Documentation\n==============================================================================\ninspect_mate can easily separate:\n\n1. ``regular attribute``.\n2. ``property attribute``.\n3. ``regular method``.\n4. ``static method``.\n5. ``class method``.\n6. **all attributes,** include ``regular attribute`` and ``property attribute``.\n7. **all methods**, include regular method, ``static method`` and ``class method``.\n\n\nQuick Links\n------------------------------------------------------------------------------\n- .. image:: https://img.shields.io/badge/Link-Document-red.svg\n :target: https://inspect_mate.readthedocs.io/index.html\n\n- .. image:: https://img.shields.io/badge/Link-API_Reference_and_Source_Code-red.svg\n :target: https://inspect_mate.readthedocs.io/py-modindex.html\n\n- .. image:: https://img.shields.io/badge/Link-Install-red.svg\n :target: `install`_\n\n- .. image:: https://img.shields.io/badge/Link-GitHub-blue.svg\n :target: https://github.com/MacHu-GWU/inspect_mate-project\n\n- .. image:: https://img.shields.io/badge/Link-Submit_Issue_and_Feature_Request-blue.svg\n :target: https://github.com/MacHu-GWU/inspect_mate-project/issues\n\n- .. image:: https://img.shields.io/badge/Link-Download-blue.svg\n :target: https://pypi.python.org/pypi/inspect_mate#downloads\n\n\n**Example**\n------------------------------------------------------------------------------\nimport:\n\n.. code-block:: python\n\n from inspect_mate import (\n is_attribute,\n is_property_method,\n is_regular_method,\n is_static_method,\n is_class_method,\n get_attributes,\n get_property_methods,\n get_regular_methods,\n get_static_methods,\n get_class_methods,\n get_all_attributes,\n get_all_methods,\n )\n\ndefine a class:\n\n.. code-block:: python\n\n class Base(object):\n attribute = \"attribute\"\n\n def __init__(self):\n self.initiated_attribute = \"initiated_attribute\"\n\n @property\n def property_method(self):\n return \"property_method\"\n\n def regular_method(self):\n return \"regular_method\"\n\n @staticmethod\n def static_method():\n return \"static_method\"\n\n @classmethod\n def class_method(cls):\n return \"class_method\"\n\n\n class Klass(Base):\n pass\n\n\n instance = Klass()\n\n\nusage:\n\n.. code-block:: python\n\n # tester_function(klass_or_instance, \"attribute_name\")\n >>> is_attribute(Klass, \"attribute\")\n True\n >>> is_property_method(Klass, \"property_attribute\")\n True\n >>> is_regular_method(Klass, \"regular_method\")\n True\n >>> is_static_method(Klass, \"static_method\")\n True\n >>> is_class_method(Klass, \"class_method\")\n True\n\n >>> is_attribute(instance, \"attribute\")\n True\n >>> is_attribute(instance, \"initiated_attribute\")\n True\n >>> is_property_method(instance, \"property_attribute\")\n True\n >>> is_regular_method(instance, \"regular_method\")\n True\n >>> is_static_method(instance, \"static_method\")\n True\n >>> is_class_method(instance, \"class_method\")\n True\n\n # getter_function(klass_or_instance), yield (attr, value)\n >>> get_attributes(Klass)\n [(\"attribute\", \"attribute\")]\n\n >>> get_property_methods(Klass)\n [(\"property_attribute\", \"property_attribute\")]\n\n >>> get_regular_methods(Klass)\n [(\"regular_method\", Klass.regular_method)]\n\n >>> get_static_methods(Klass)\n [(\"static_method\", \"Klass.static_method\")]\n\n >>> get_class_methods(Klass)\n [(\"class_method\", \"Klass.class_method\")]\n\n >>> get_all_attributes(Klass)\n [(\"attribute\", \"attribute\"), (\"property_attribute\", \"property_attribute\")]\n\n >>> get_all_methods(Klass)\n [(\"regular_method\", Klass.regular_method), (\"static_method\", \"Klass.static_method\"), (\"class_method\", \"Klass.class_method\")]\n\n\n.. _install:\n\nInstall\n------------------------------------------------------------------------------\n\n\n``inspect_mate`` is released on PyPI, so all you need is:\n\n.. code-block:: console\n\n $ pip install inspect_mate\n\nTo upgrade to latest version:\n\n.. code-block:: console\n\n $ pip install --upgrade inspect_mate\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://pypi.python.org/pypi/inspect_mate/0.0.2#downloads", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MacHu-GWU/", "keywords": "", "license": "MIT", "maintainer": "Sanhe Hu", "maintainer_email": "husanhe@gmail.com", "name": "inspect_mate", "package_url": "https://pypi.org/project/inspect_mate/", "platform": "Windows", "project_url": "https://pypi.org/project/inspect_mate/", "project_urls": { "Download": "https://pypi.python.org/pypi/inspect_mate/0.0.2#downloads", "Homepage": "https://github.com/MacHu-GWU/" }, "release_url": "https://pypi.org/project/inspect_mate/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Extend the ``inspect`` standard library.", "version": "0.0.2" }, "last_serial": 4246690, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "86870ab4d90b7865ff861ef5993b72c8", "sha256": "037a050d63c181720a27e1b7c622216b53959eab200b711fbc43e6594e67ebe4" }, "downloads": -1, "filename": "inspect_mate-0.0.1.tar.gz", "has_sig": false, "md5_digest": "86870ab4d90b7865ff861ef5993b72c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9887, "upload_time": "2017-07-14T19:48:10", "url": "https://files.pythonhosted.org/packages/5c/67/98d67e1d74d4fee2d0fa50c93aa2597da04a0964da88e77809df9d6a98ff/inspect_mate-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "d545d5eddf765ae2c9f701cea4fa3a58", "sha256": "de7e5eb9f8231e741661aadbdbd2ae1b6e607241705abad9695790fd5c9440ab" }, "downloads": -1, "filename": "inspect_mate-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "d545d5eddf765ae2c9f701cea4fa3a58", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 22459, "upload_time": "2018-09-07T00:40:26", "url": "https://files.pythonhosted.org/packages/fa/c1/c1bd37367766779c3b218eadce19c7da8901392d18d2ef94ac41dda782ce/inspect_mate-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "80854ca0a6523378aae58cf6e31adfbe", "sha256": "a51907976d9624d0eeaf0d2207a67c95d174a2fa3aabfdaee53eeaf91d973bdd" }, "downloads": -1, "filename": "inspect_mate-0.0.2.tar.gz", "has_sig": false, "md5_digest": "80854ca0a6523378aae58cf6e31adfbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13433, "upload_time": "2018-09-07T00:40:27", "url": "https://files.pythonhosted.org/packages/3d/0e/75bcfbb04eb18002ac864014b3a88a0615a3b90e3f3aa9cb9067503906bd/inspect_mate-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d545d5eddf765ae2c9f701cea4fa3a58", "sha256": "de7e5eb9f8231e741661aadbdbd2ae1b6e607241705abad9695790fd5c9440ab" }, "downloads": -1, "filename": "inspect_mate-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "d545d5eddf765ae2c9f701cea4fa3a58", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 22459, "upload_time": "2018-09-07T00:40:26", "url": "https://files.pythonhosted.org/packages/fa/c1/c1bd37367766779c3b218eadce19c7da8901392d18d2ef94ac41dda782ce/inspect_mate-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "80854ca0a6523378aae58cf6e31adfbe", "sha256": "a51907976d9624d0eeaf0d2207a67c95d174a2fa3aabfdaee53eeaf91d973bdd" }, "downloads": -1, "filename": "inspect_mate-0.0.2.tar.gz", "has_sig": false, "md5_digest": "80854ca0a6523378aae58cf6e31adfbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13433, "upload_time": "2018-09-07T00:40:27", "url": "https://files.pythonhosted.org/packages/3d/0e/75bcfbb04eb18002ac864014b3a88a0615a3b90e3f3aa9cb9067503906bd/inspect_mate-0.0.2.tar.gz" } ] }