Skip to main content

Trace module imports and detect/deny cyclic imports at runtime

Project description

Welcome!

import-watch allows to trace module imports and detect/deny cyclic imports at runtime with Python 2 and 3. It is licensed under the MIT license.

Enjoy!

Installation

# pip install import-watch

Usage

Trace imports

import import_watch
import_watch.trace_imports(depth=2)  # default depth is unlimited

Detect and warn about cyclic imports (at runtime)

import import_watch
import_watch.warn_about_cyclic_imports()

Deny cyclic imports (at runtime)

import import_watch
import_watch.deny_cyclic_imports()

Start fresh

import import_watch
[..]
import_watch.reset()

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

import-watch-2.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distributions

import_watch-2.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

import_watch-2.0.1-py2-none-any.whl (4.7 kB view details)

Uploaded Python 2

File details

Details for the file import-watch-2.0.1.tar.gz.

File metadata

  • Download URL: import-watch-2.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.10

File hashes

Hashes for import-watch-2.0.1.tar.gz
Algorithm Hash digest
SHA256 81215c64303a10f058a39ddb2fa691def0ed258daa853fb27ee7cb896ef36cf2
MD5 6b83a1665e16b27e4767590431f3d82c
BLAKE2b-256 42e3a49e8929bbe1a93a54a78920ac8a01ca2eb95ab0bcf68a6c53a635bbef92

See more details on using hashes here.

File details

Details for the file import_watch-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: import_watch-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.10

File hashes

Hashes for import_watch-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 753c8f442d00b62bd63fcead45456689f4ec8c2bb8591366382f2c5f30c29f4b
MD5 6111f8874ffca24bc73bc6044649b984
BLAKE2b-256 62945e6b3d3046850b0307c3fdf48fc640787cf703d209799db942e5451b9663

See more details on using hashes here.

File details

Details for the file import_watch-2.0.1-py2-none-any.whl.

File metadata

  • Download URL: import_watch-2.0.1-py2-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.10

File hashes

Hashes for import_watch-2.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 f50e2a3b327caae7804bdda2ff1be7adbcf12feece30eea591e91c5f141507f2
MD5 bac02a4c7796489f469387ec2d91d578
BLAKE2b-256 cf907c86628cd35e6ab5033891ae0a4dd3cc0a0a2097f02941edf2898684c3d3

See more details on using hashes here.

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