Skip to main content

Extensions for Python inspect module.

Project description

Extending Python inspect module to users and developers to get information about packages, modules, classes and other members. Working on Python 3.8+.

Installing, updating and uninstalling

To install and/or update, do

$ pip install -U inspect-extensions

To remove

$ pip uninstall inspect-extensions

Running

To get a minimalist output

$ inspect-extensions

Examples from v0.1

Help

$ inspect-extensions --help
usage: inspect_extensions.py [-h]
    [--colored COLORED] [--filter FILTER]
    [-p PACKAGES] [-m MODULES]
    [-c CLASSES] [-t METHODS] [-f FUNCTIONS] [-d DATA]
    [-a ALL_MEMBERS]
    [-b PUBLIC] [-o PROTECTED] [-i PRIVATE]
    [--encapsulation ENCAPSULATION] [-e ALL_ENCAPSULATION]
    [--count_members COUNT_MEMBERS] [--text_only TEXT_ONLY]
    [--special_classes SPECIAL_CLASSES]
    [--special_methods SPECIAL_METHODS]
    [--special_data SPECIAL_DATA]
    [--remove_special_classes REMOVE_SPECIAL_CLASSES]
    [--remove_special_methods REMOVE_SPECIAL_METHODS]
    [--remove_special_data REMOVE_SPECIAL_DATA]
    [--remove_special_members REMOVE_SPECIAL_MEMBERS]
    obj

Inspect Extensions module.

Python script that uses many modules from Python to exposes
as many information that is possible to inspect packages.

positional arguments:

obj                   Input object (package, module, class)

optional arguments:

-h, --help            Show this help message and exit
--count_members       Shows the number of members
--colored             Print colored members
--text_only           Print just text characters - not colorized

--filter FILTER       [PACKAGE, MODULE, CLASS, METHOD, DATA, ALL]

-p PACKAGES, --packages PACKAGES
    Show just packages
-m MODULES, --modules MODULES
    Show just modules
-c CLASSES, --classes CLASSES
    Show just classes
-t METHODS, --methods METHODS
    Show just methods, must have 'self' as first arg
-f FUNCTIONS, --functions FUNCTIONS
    Show just functions, not associated with any object
-d DATA, --data DATA
    Show just data, variables
-a ALL_MEMBERS, --all_members ALL_MEMBERS
    Show all members (DEFAULT)(packages, modules, classes, methods, functions, data)

--encapsulation ENCAPSULATION [NONE, PUBLIC, PROTECTED, PRIVATE, ALL]

-b PUBLIC, --public PUBLIC
    Show just public members (DEFAULT)
-o PROTECTED, --protected PROTECTED
    Show just protected members
-i PRIVATE, --private PRIVATE
    Show just private members
-e ALL_ENCAPSULATION, --all_encapsulation ALL_ENCAPSULATION
    Show all encapsulation

--special_classes SPECIAL_CLASSES
    Print special classes, '__' before and after name
--special_methods SPECIAL_METHODS
    Print special methods, '__' before and after name
--special_data SPECIAL_DATA
    Print special data, '__' before and after name

--remove_special_classes REMOVE_SPECIAL_CLASSES
    Filter special classes, see special_classes
--remove_special_methods REMOVE_SPECIAL_METHODS
    Filter special methods, see special_methods
--remove_special_data REMOVE_SPECIAL_DATA
    Filter special data, see special_data
--remove_special_members REMOVE_SPECIAL_MEMBERS
    Filter special members, see special_members

Download files

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

Source Distribution

inspect-extensions-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inspect_extensions-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file inspect-extensions-0.1.1.tar.gz.

File metadata

  • Download URL: inspect-extensions-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for inspect-extensions-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a126061695365fae44162dc7d4c441e1795ded68d4ec4707f005cf3e9b20f4ea
MD5 4e1fc673158292117add478c44ef2bc2
BLAKE2b-256 081a3a7d0c13820d7d149886d6fec3d1f7ee232c580357447e5eb47f14a2ea96

See more details on using hashes here.

File details

Details for the file inspect_extensions-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: inspect_extensions-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for inspect_extensions-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb3bbe198cef0612a62dc589e5b3e5598a2e404f9aa68b20ad6dce417a63cd9
MD5 bc89eed6e4936454325cdd0349d5c713
BLAKE2b-256 c74bd39dc62d2763f66c32740c150d477fc53a212c7ca583a66b498875b4e8ff

See more details on using hashes here.

Supported by

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