Skip to main content

Get module names from installed package names and back

Project description

pkgmod

Get module names from installed package names and back.

Example usage:

>>> import pkgmod
>>> pkgmod.get_package_name("impala")
('impyla', False)

This returns a tuple with package name and a bool, which tells whether it's a standard library in Python or not. For packages this only works if the package is installed.

>>> pkgmod.get_module_names("impyla")
['impala']
>>> pkgmod.get_module_names("Cython")
['Cython', 'cython', 'pyximport']

This returns the module names included in a given package (which also needs to be installed).

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

pkgmod-0.0.1.tar.gz (2.4 kB view hashes)

Uploaded Source

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