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/objinspect

Example

>>> 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

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

Uploaded Source

Built Distribution

objinspect-0.2.7-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for objinspect-0.2.7.tar.gz
Algorithm Hash digest
SHA256 d133e19ce9fa2fe7e0fb4be18f226a6e05624e05a5479e83d69301df00d2382d
MD5 76955b9cc948ae36198d56d517411446
BLAKE2b-256 2068f7af364ba23825188fbba7c516ddfaf390aa509dc1889e247e9195749564

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for objinspect-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 38066bb08e7ce3da54570a2efba05cc6fe06406e5067e20021de42639539d13e
MD5 57412b1d44738950a26fbdb2f5ba3244
BLAKE2b-256 feacbaea69061278ecfa120ee8c28895590113a527724516359343bdfff45545

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