Skip to main content

Get modules name from your python code

Project description

modules-name-from-code

Get modules name from your python code

How to install?

PYPI : https://pypi.org/project/modules-name-from-code/1.0.0/

pip install modules-name-from-code

Example

/home/mycode.py :

import module1
import module2, module3
from module4 import module 

...
import getmodules

print(getmodules.get_modules("/home/mycode.py"))

Result :

['module2', 'module1', 'module4', 'module3']

Or

import getmodules

print(getmodules.get_modules("/home/mycode.py", sort=True))

Result :

['module1', 'module2', 'module3', 'module4']

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

modules-name-from-code-1.0.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

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

modules_name_from_code-1.0.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file modules-name-from-code-1.0.1.tar.gz.

File metadata

  • Download URL: modules-name-from-code-1.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for modules-name-from-code-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5788f98237c5cacd9b6166d09315bd0e4ef51b7a3c569565f91aec47d3391096
MD5 5059c8b5551c4e821d608ca03ee098c9
BLAKE2b-256 1b2100438b5ca1e98d2690019f9ac7e4890be15ec36e62ec8ee23310cfcb3864

See more details on using hashes here.

File details

Details for the file modules_name_from_code-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: modules_name_from_code-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for modules_name_from_code-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01704b1e9fbf547ffa1d464e037d71781785030754e5fc2cd6e3f8b61854f81f
MD5 df8036c1266f7ab3247b851906f91425
BLAKE2b-256 ca3abb0bcee642cce06f2b4c8dc48f1760bfb8a1f2b7bd883622c7ae8422237e

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