border_patrol package¶
Submodules¶
border_patrol.with_log_debug module¶
Import this module to let Border-Patrol use logging with level DEBUG
border_patrol.with_log_error module¶
Import this module to let Border-Patrol use logging with level ERROR
border_patrol.with_log_info module¶
Import this module to let Border-Patrol use logging with level INFO
border_patrol.with_log_warning module¶
Import this module to let Border-Patrol use logging with level WARNING
border_patrol.with_print_stderr module¶
Import this module to let Border-Patrol use plain print on stderr
border_patrol.with_print_stdout module¶
Import this module to let Border-Patrol use plain print
Module contents¶
Main module holding the actual functionality of Border-Patrol
- class border_patrol.BorderPatrol(*args, **kwargs)[source]¶
Bases:
objectBorder-Patrol singleton class to track imports of packages.
Since BorderPatrol is a singleton, passing
Nonefor a value will keep the currently set value while passing a value will update the corresponding parameter.- Parameters
- register()[source]¶
Registers/activates Border Patrol
- Returns
Border-Patrol instance
- Return type
self
- border_patrol.get_package(module)[source]¶
Gets package part of module
- Parameters
module – module instance
- Returns
name of module’s package
- Return type
- border_patrol.get_pkg_to_dist_map()[source]¶
Generates mapping of packages to distributions
- Returns
mapping of packages to distributions
- Return type
- border_patrol.package_path(package)[source]¶
Retrieves path of package
- Parameters
package – module instance of package
- Returns
path of package
- Return type