Import Policies
Project description
python-import-policies
python-import-policies is a Python package designed to enhance the management of import policies within your Python projects. It provides a set of contract types for the incredible import-linter. This package allows you to enforce consistent import practices, improve code readability, and maintain a clean and organized codebase.
Installation
Install the package using pip:
pip install python-import-policies
Usage
An example configuration for import-linter
configuration
[importlinter]
root_package = your_package
contract_types =
import_policy: import_policies.contracts.ImportPolicy
[importlinter:contract:import-policy]
name = Define import policy
type = import_policy
allow_modules =
your_package.** -> another_package.**
** -> your_package.api
Then execute the linter
lint-imports
For more information visit import-linter website.
Contributing
We welcome contributions from the community! If you find a bug, have a feature request, or want to contribute code, please open an issue or submit a pull request on our Gitlab repository.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_import_policies-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 950bdf59dc9196e75403dca9cceb5546fe670d389e54f159572f3424f8437617 |
|
MD5 | 96242ebace237077df8a3ab51f8d1010 |
|
BLAKE2b-256 | 8eea4b3adfe668e824e4a66911a6600098b9e96c0f7f28c269969bb6e0abb715 |
Hashes for python_import_policies-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c539e7c05275e5acd44cd67437c3cd261690687ffd0f4a5f5730916c63ffee93 |
|
MD5 | 1562b067c1dee0d4681a26d9c24a755c |
|
BLAKE2b-256 | e5df8c3ad74916619416b1ed019141d7b300fcc36a124486e8f86f241b1c302a |