objinspect


Nameobjinspect JSON
Version 0.2.9 PyPI version JSON
download
home_page
SummaryView the structure of Python classes and functions
upload_time2023-12-04 14:12:31
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT License Copyright (c) 2022 Žiga Ivanšek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords objinspect object inspection code introspection python inspect pretty dir
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # objinspect
[![Tests](https://github.com/zigai/objinspect/actions/workflows/tests.yml/badge.svg)](https://github.com/zigai/objinspect/actions/workflows/tests.yml)
[![PyPI version](https://badge.fury.io/py/objinspect.svg)](https://badge.fury.io/py/objinspect)
![Supported versions](https://img.shields.io/badge/python-3.10+-blue.svg)
[![Downloads](https://static.pepy.tech/badge/objinspect)](https://pepy.tech/project/objinspect)
[![license](https://img.shields.io/github/license/zigai/objinspect.svg)](https://github.com/zigai/objinspect/blob/main/LICENSE)

View the structure of Python classes and functions.

# Installation
#### From PyPi
```
pip install objinspect
```
#### From source
```
pip install git+https://github.com/zigai/objinspect
```

# Example

``` python
>>> import math
>>> from objinspect import inspect
>>> inspect(math.pow)
Function(name='pow', parameters=2, description='Return x**y (x to the power of y).')

>>> inspect(math.pow).dict
[
   {
      "default":"<class""inspect._empty"">",
      "description":"None",
      "kind":"<_ParameterKind.POSITIONAL_ONLY":0>,
      "name":"x",
      "type":"<class""inspect._empty"">"
   },
   {
      "default":"<class""inspect._empty"">",
      "description":"None",
      "kind":"<_ParameterKind.POSITIONAL_ONLY":0>,
      "name":"y",
      "type":"<class""inspect._empty"">"
   }
]
                 
>>> inspect(inspect)
Function(
    name="inspect",
    parameters=2,
    description="The inspect function  takes an object and an optional include_inherited flag (defaults to True) and returns either a Function object or a Class object depending on the type of object.",
)
```
# License
[MIT License](https://github.com/zigai/obj-inspect/blob/master/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "objinspect",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "objinspect,object inspection,code introspection,python inspect,pretty dir",
    "author": "",
    "author_email": "\u017diga Ivan\u0161ek <ziga.ivansek@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e9/2e/d598306afbb221726f5fa0c31b230fbb5ef601acdecbc7778eec7f502370/objinspect-0.2.9.tar.gz",
    "platform": null,
    "description": "# objinspect\n[![Tests](https://github.com/zigai/objinspect/actions/workflows/tests.yml/badge.svg)](https://github.com/zigai/objinspect/actions/workflows/tests.yml)\n[![PyPI version](https://badge.fury.io/py/objinspect.svg)](https://badge.fury.io/py/objinspect)\n![Supported versions](https://img.shields.io/badge/python-3.10+-blue.svg)\n[![Downloads](https://static.pepy.tech/badge/objinspect)](https://pepy.tech/project/objinspect)\n[![license](https://img.shields.io/github/license/zigai/objinspect.svg)](https://github.com/zigai/objinspect/blob/main/LICENSE)\n\nView the structure of Python classes and functions.\n\n# Installation\n#### From PyPi\n```\npip install objinspect\n```\n#### From source\n```\npip install git+https://github.com/zigai/objinspect\n```\n\n# Example\n\n``` python\n>>> import math\n>>> from objinspect import inspect\n>>> inspect(math.pow)\nFunction(name='pow', parameters=2, description='Return x**y (x to the power of y).')\n\n>>> inspect(math.pow).dict\n[\n   {\n      \"default\":\"<class\"\"inspect._empty\"\">\",\n      \"description\":\"None\",\n      \"kind\":\"<_ParameterKind.POSITIONAL_ONLY\":0>,\n      \"name\":\"x\",\n      \"type\":\"<class\"\"inspect._empty\"\">\"\n   },\n   {\n      \"default\":\"<class\"\"inspect._empty\"\">\",\n      \"description\":\"None\",\n      \"kind\":\"<_ParameterKind.POSITIONAL_ONLY\":0>,\n      \"name\":\"y\",\n      \"type\":\"<class\"\"inspect._empty\"\">\"\n   }\n]\n                 \n>>> inspect(inspect)\nFunction(\n    name=\"inspect\",\n    parameters=2,\n    description=\"The inspect function  takes an object and an optional include_inherited flag (defaults to True) and returns either a Function object or a Class object depending on the type of object.\",\n)\n```\n# License\n[MIT License](https://github.com/zigai/obj-inspect/blob/master/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 \u017diga Ivan\u0161ek  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "View the structure of Python classes and functions",
    "version": "0.2.9",
    "project_urls": {
        "Repository": "https://github.com/zigai/objinspect"
    },
    "split_keywords": [
        "objinspect",
        "object inspection",
        "code introspection",
        "python inspect",
        "pretty dir"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87349ed94b530cb08513be44fd50f34aaaf1a64eefd7d1af9c623a9a2a2f3940",
                "md5": "41407e5aa80e5cf7a840dc6122c885fa",
                "sha256": "b10e1938ec75561c8afe83100b7ef0af3ad0568f21d9cea121682f87440c10ac"
            },
            "downloads": -1,
            "filename": "objinspect-0.2.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "41407e5aa80e5cf7a840dc6122c885fa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 14077,
            "upload_time": "2023-12-04T14:12:29",
            "upload_time_iso_8601": "2023-12-04T14:12:29.523505Z",
            "url": "https://files.pythonhosted.org/packages/87/34/9ed94b530cb08513be44fd50f34aaaf1a64eefd7d1af9c623a9a2a2f3940/objinspect-0.2.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e92ed598306afbb221726f5fa0c31b230fbb5ef601acdecbc7778eec7f502370",
                "md5": "adf874058836eb79b7ad95c8f96668d5",
                "sha256": "7ae07b2fa4bb35f1b664ecda5d628707ff2d28978ce0f0417cb85c892b6b5d3f"
            },
            "downloads": -1,
            "filename": "objinspect-0.2.9.tar.gz",
            "has_sig": false,
            "md5_digest": "adf874058836eb79b7ad95c8f96668d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 14658,
            "upload_time": "2023-12-04T14:12:31",
            "upload_time_iso_8601": "2023-12-04T14:12:31.607079Z",
            "url": "https://files.pythonhosted.org/packages/e9/2e/d598306afbb221726f5fa0c31b230fbb5ef601acdecbc7778eec7f502370/objinspect-0.2.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 14:12:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zigai",
    "github_project": "objinspect",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "objinspect"
}
        
Elapsed time: 0.16856s