Skip to main content

Codecov Pypi Downloads ReadTheDocs

Tools for static and dynamic code introspection. This library has not been well maintained, and there are likely other libraries that are better.

Helps with writing doctests

def func(a=1, b=2, c=3):
    """
    Example:
        >>> from this.module import *  # import contextual namespace
        >>> import xinspect
        >>> globals().update(xinspect.get_func_kwargs(func))  # populates globals with default kwarg value
        >>> print(a + b + c)
        6
    """

Helps with code that generates code

>>> import ubelt as ub
>>> source = ub.codeblock(
>>>     '''
>>>     p = os.path.dirname(join('a', 'b'))
>>>     glob.glob(p)
>>>     ''')
>>> # Generate a list of lines to fix the name errors
>>> lines = autogen_imports(source=source)
>>> print(lines)
['import glob', 'from os.path import join', 'import os']

See Also: https://github.com/Erotemic/xdev

Release files for xinspect 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xinspect 0.4.0
File Size Uploaded
xinspect-0.4.0.tar.gz 23.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xinspect 0.4.0
File Interpreter ABI Platform
xinspect-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.2 kB

Release files / xinspect-0.4.0.tar.gz

Download URL xinspect-0.4.0.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5329d72d5be78e06945e4a95b485c9a50b1faeca67cbfff6040099a36d992c02
BLAKE2b-256 checksum
How to use checksums
30624e484fcd649d64d78920943878e925a2ce135bce85245d5de9702920acb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / xinspect-0.4.0-py3-none-any.whl

Download URL xinspect-0.4.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9be1763b96174a5368dd34b4fde0eaf790ee4dd9e0316ae05037e1e203015011
BLAKE2b-256 checksum
How to use checksums
7f2062f45a1518b1b5913328a3d7a0bdc1f77c9be52c531fc8367b0513e8ecac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page