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.3.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

objinspect-0.2.3-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for objinspect-0.2.3.tar.gz
Algorithm Hash digest
SHA256 b03abca19a8a1e70ea568bf3fcfd76c2fbb9691c2dc5e149c347656e9e52c8eb
MD5 8325cd2b7f7948dc5e25e74387046496
BLAKE2b-256 4cf27c1f0b5c6a0157447e18764022a61f764ddb672324271e70bc29bed8a378

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for objinspect-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 163bcf4a460b0add85dc293bd525ad4d84b3d9491fc1760c412a1cb9b48635ce
MD5 4a996698fd4484842f44efd288906ef0
BLAKE2b-256 4f60d6c64589e8bf450c081fd25a5d31d81a98e45ebce9727bd006a73f95de43

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