A command line tool to query source code from your current Python env

Overview

wxc

PyPI PyPI

codecov pre-commit.ci status Code style: black

wxc (pronounced "which") allows you to inspect source code in your Python environment from the command line. It is based on the inspect module from the standard library.

Installation

$ python3 -m pip install wxc

Usage

Get the version number of a package in your current environment

Locate the file from which a Python package is imported

Locate a specific method's source code

View the source code of function directly from the terminal stdout

wxc tries to be helpful when you mistype

For more, run

$ wxc --help

Known limitations

wxc is not currently able to retrieve the source of compiled code binded into Python. It should however correctly point to the compiled file that an object is imported from.

wxc should never be installed in isolation (for instance via pipx) since it would completely defeat its purpose.

Notes

  • wxc is tested on macOS, Linux, and partially on Windows, from Python 3.7 to 3.10
  • this project was formerly named "whych" and renamed to avoid confusion with the pypi-available package of the same name.
You might also like...
Command-line tool to use LNURL with your LND instance

LND LNURL Commandline tool to use LNURL payRequest and withdrawRequest with LND. Usage: Customize config lndlnurl.conf Run python main.py LNURL Dock

Tidier - a simple command line tool that helps you make your files tidy up

Tidier - a simple command line tool that helps you make your files tidy up

A cd command that learns - easily navigate directories from the command line

NAME autojump - a faster way to navigate your filesystem DESCRIPTION autojump is a faster way to navigate your filesystem. It works by maintaining a d

Ros command - Unifying the ROS command line tools
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

This a simple tool to query the awesome ippsec.rocks website from your terminal
This a simple tool to query the awesome ippsec.rocks website from your terminal

ippsec-cli This a simple tool to query the awesome ippsec.rocks website from your terminal Installation and usage cd /opt git clone https://github.com

A command-line tool to flash python code to Codey Rocky without having to use the online mblock5 IDE.

What? A command-line tool to flash python code to Codey Rocky without having to use the online mblock5 IDE. Description This is a very low-effort proj

Python command line tool and python engine to label table fields and fields in data files.

Python command line tool and python engine to label table fields and fields in data files. It could help to find meaningful data in your tables and data files or to find Personal identifable information (PII).

Open-Source Python CLI package for copying DynamoDB tables and items in parallel batch processing + query natural & Global Secondary Indexes (GSIs)

Python Command-Line Interface Package to copy Dynamodb data in parallel batch processing + query natural & Global Secondary Indexes (GSIs).

Command line interface to watch your childhood shows in hindi and english, designed with python
Command line interface to watch your childhood shows in hindi and english, designed with python

Sweet dreams: Most of your childhood shows Command line interface to watch your

Releases(v6.6.0)
  • v6.6.0(Jul 20, 2022)

    What's Changed

    • BUG: fix a bug where version look up table's order wasn't being preserved by @neutrinoceros in https://github.com/neutrinoceros/wxc/pull/152
    • ENH: implement fast lookups for module location and version by @neutrinoceros in https://github.com/neutrinoceros/wxc/pull/161
    • started testing against Python 3.11 pre-releases

    Full Changelog: https://github.com/neutrinoceros/wxc/compare/v6.5.5...v6.6.0

    Source code(tar.gz)
    Source code(zip)
  • v6.5.5(Nov 15, 2021)

    What's Changed

    • MNT: bump required rich version to 10.13, adapt tests accordingly (no actual change in behaviour) by @neutrinoceros in https://github.com/neutrinoceros/wxc/pull/144

    Full Changelog: https://github.com/neutrinoceros/wxc/compare/v6.5.4...v6.5.5

    Source code(tar.gz)
    Source code(zip)
  • v6.5.4(Nov 15, 2021)

    What's Changed

    • MNT: drop support for Python 3.6 by @neutrinoceros in https://github.com/neutrinoceros/wxc/pull/137
    • ENH: upgrade type annotations by @neutrinoceros in https://github.com/neutrinoceros/wxc/pull/139
    • BUG: fix a crash when calling wxc --full for packages for which no implemented method to get the version tag works. by @neutrinoceros in https://github.com/neutrinoceros/wxc/pull/142

    Full Changelog: https://github.com/neutrinoceros/wxc/compare/v6.5.3...v6.5.4

    Source code(tar.gz)
    Source code(zip)
Owner
Clément Robert
PhD in Astrophysics, Python enthusiast and cat owner.
Clément Robert
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Stream your favorite shows straight from the command line.

A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Jonardon Hazarika 17 Dec 11, 2022
cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored in many CMSIS PACKs

cmsis-pack-manager cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored i

pyocd 20 Dec 21, 2022
Ralph is a command-line tool to fetch, extract, convert and push your tracking logs from various storage backends to your LRS or any other compatible storage or database backend.

Ralph is a command-line tool to fetch, extract, convert and push your tracking logs (aka learning events) from various storage backends to your

France Université Numérique 18 Jan 5, 2023
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
Professor Wordlist is a free open source command line tool written in python

Professor Wordlist is a free open source command line tool written in python, With the aim of generating custom wordlists with a variety of unique parameters and functions providing many possibilities.

オークO A K Z E H オーク 1 Oct 28, 2021
gget is a free and open-source command-line tool and Python package that enables efficient querying of genomic databases.

gget is a free and open-source command-line tool and Python package that enables efficient querying of genomic databases. gget consists of a collection of separate but interoperable modules, each designed to facilitate one type of database querying in a single line of code.

Pachter Lab 570 Dec 29, 2022
Free and Open-Source Command Line tool for Text Replacement

Sniplet Free and Open Source Text Replacement Tool Description: Sniplet is a work in progress CLI tool which can do text replacement globally in Linux

Veeraraghavan Narasimhan 13 Nov 28, 2022
Command line tool to keep track of your favorite playlists on YouTube and many other places.

Command line tool to keep track of your favorite playlists on YouTube and many other places.

Wolfgang Popp 144 Jan 5, 2023
A command line tool to create a graph representing your Ansible playbook tasks and roles

Ansible Playbook Grapher ansible-playbook-grapher is a command line tool to create a graph representing your Ansible playbook plays, tasks and roles.

Mohamed El Mouctar Haidara 424 Dec 20, 2022
A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

ADI 4 Nov 17, 2022