objinspect


Nameobjinspect JSON
Version 0.2.14 PyPI version JSON
download
home_pageNone
SummaryA high-level library for Python object inspection
upload_time2025-01-22 13:32:06
maintainerNone
docs_urlNone
authorNone
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 debugging development-tools code-analysis function-signature
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)
[![Documentation Status](https://readthedocs.org/projects/objinspect/badge/?version=latest)](https://objinspect.readthedocs.io/en/latest/?badge=latest)
[![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/month)](https://pepy.tech/project/objinspect)
[![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)

`objinspect` is a high-level wrapper around Python's built-in `inspect` module. 
It provides a simple interface for examining Python functions and classes.

## Features
- Simplified inspection of Python objects (classes, functions, methods)
- Detailed information about parameters, return types, and docstrings
- prettydir - like dir(), but with more information and prettier output

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

## Examples

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

>>> inspect(math.pow).dict
{
   'name': 'pow', 
   'parameters': [
      {'name': 'x', 'kind': <_ParameterKind.POSITIONAL_ONLY: 0>, 'type': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>, 'description': None}, 
      {'name': 'y', 'kind': <_ParameterKind.POSITIONAL_ONLY: 0>, 'type': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>, 'description': None}], 
   'docstring': 'Return x**y (x to the power of y).'
}
                 
>>> inspect(inspect)
Function(name='inspect', parameters=7, description='Inspects an object and returns a structured representation of its attributes and methods.')
```
### prettydir
![image](https://github.com/zigai/objinspect/assets/69588680/e1adcf90-0ef3-49e4-8804-a662f6388475)


## License
[MIT License](https://github.com/zigai/obj-inspect/blob/master/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "objinspect",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "objinspect, object inspection, code introspection, python inspect, pretty dir, debugging, development-tools, code-analysis, function-signature",
    "author": null,
    "author_email": "\u017diga Ivan\u0161ek <ziga.ivansek@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/51/9d/64769c7aaf71f7c938c23d861f7b7cdfd1c376e47e2a1dc666d56fe00d63/objinspect-0.2.14.tar.gz",
    "platform": null,
    "description": "# objinspect\n   \n[![Tests](https://github.com/zigai/objinspect/actions/workflows/tests.yml/badge.svg)](https://github.com/zigai/objinspect/actions/workflows/tests.yml)\n[![Documentation Status](https://readthedocs.org/projects/objinspect/badge/?version=latest)](https://objinspect.readthedocs.io/en/latest/?badge=latest)\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/month)](https://pepy.tech/project/objinspect)\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\n`objinspect` is a high-level wrapper around Python's built-in `inspect` module. \nIt provides a simple interface for examining Python functions and classes.\n\n## Features\n- Simplified inspection of Python objects (classes, functions, methods)\n- Detailed information about parameters, return types, and docstrings\n- prettydir - like dir(), but with more information and prettier output\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## Examples\n\n``` python\n>>> from objinspect import inspect\n>>> import math\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   'name': 'pow', \n   'parameters': [\n      {'name': 'x', 'kind': <_ParameterKind.POSITIONAL_ONLY: 0>, 'type': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>, 'description': None}, \n      {'name': 'y', 'kind': <_ParameterKind.POSITIONAL_ONLY: 0>, 'type': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>, 'description': None}], \n   'docstring': 'Return x**y (x to the power of y).'\n}\n                 \n>>> inspect(inspect)\nFunction(name='inspect', parameters=7, description='Inspects an object and returns a structured representation of its attributes and methods.')\n```\n### prettydir\n![image](https://github.com/zigai/objinspect/assets/69588680/e1adcf90-0ef3-49e4-8804-a662f6388475)\n\n\n## License\n[MIT License](https://github.com/zigai/obj-inspect/blob/master/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2022 \u017diga Ivan\u0161ek\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "A high-level library for Python object inspection",
    "version": "0.2.14",
    "project_urls": {
        "Documentation": "https://objinspect.readthedocs.io",
        "Repository": "https://github.com/zigai/objinspect"
    },
    "split_keywords": [
        "objinspect",
        " object inspection",
        " code introspection",
        " python inspect",
        " pretty dir",
        " debugging",
        " development-tools",
        " code-analysis",
        " function-signature"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "13f28377f4f4de28fefba3ee0640d46107e2d6fe51d424d306150b72c1bec5af",
                "md5": "72393e7fa7a538868f1b58638e34a727",
                "sha256": "7d4e43afc2e2de07e558093a21e005098382ae75d72c99850f182de0b171f28b"
            },
            "downloads": -1,
            "filename": "objinspect-0.2.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72393e7fa7a538868f1b58638e34a727",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 17558,
            "upload_time": "2025-01-22T13:32:05",
            "upload_time_iso_8601": "2025-01-22T13:32:05.087107Z",
            "url": "https://files.pythonhosted.org/packages/13/f2/8377f4f4de28fefba3ee0640d46107e2d6fe51d424d306150b72c1bec5af/objinspect-0.2.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "519d64769c7aaf71f7c938c23d861f7b7cdfd1c376e47e2a1dc666d56fe00d63",
                "md5": "ed63ff9e40bde6391e085b1f5078be64",
                "sha256": "8557b3a8bf340bf824285e0cc8b94d2cfad12dfe6c66b532a45a8a2c888a10db"
            },
            "downloads": -1,
            "filename": "objinspect-0.2.14.tar.gz",
            "has_sig": false,
            "md5_digest": "ed63ff9e40bde6391e085b1f5078be64",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 20298,
            "upload_time": "2025-01-22T13:32:06",
            "upload_time_iso_8601": "2025-01-22T13:32:06.834908Z",
            "url": "https://files.pythonhosted.org/packages/51/9d/64769c7aaf71f7c938c23d861f7b7cdfd1c376e47e2a1dc666d56fe00d63/objinspect-0.2.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-22 13:32:06",
    "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.42725s