Skip to main content

View the structure of Python classes and functions

Project description

objinspect

Tests PyPI version Supported versions Downloads license

View the structure of Python classes and functions.

Installation

From PyPi

pip install objinspect

From source

pip install git+https://github.com/zigai/obj-inspect

Example

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

>>> objinspect(math.pow).dict
{'docstring': 'Return x**y (x to the power of y).',
 'name': 'pow',
 'parameters': [{'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'>}]                 
}
                 
>>> objinspect(objinspect)
>>> Function(name='objinspect', parameters=2, description='The objinspect 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

objinspect-0.2.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

objinspect-0.2.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file objinspect-0.2.1.tar.gz.

File metadata

  • Download URL: objinspect-0.2.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for objinspect-0.2.1.tar.gz
Algorithm Hash digest
SHA256 765e17c76af3ccb7bf7a8831bb3cb2c682b2f1d1b19b452b16efe31bb382f3f9
MD5 789955991e6647fcb1553004a9cbe91c
BLAKE2b-256 a189635f93efcfd6e99fff2642b289d7aa998e1516f27e17f851701d42cabfaf

See more details on using hashes here.

File details

Details for the file objinspect-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: objinspect-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for objinspect-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a9f95eaa5b932dc9df8bce67cfe863fdb81489d1d0eaa7920e3049ed94b5355
MD5 c71e392f1f92739f9c3c7831dd6d0521
BLAKE2b-256 69ec1186f215efd5cff7322cba1d1312e6659ec3700bb1803a44fc8e9df1bef3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page