# 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](https://github.com/seddonym/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:
```bash
pip install python-import-policies
```
## Usage
An example configuration for `import-linter` configuration
```ini
[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
```bash
lint-imports
```
For more information visit [import-linter](https://import-linter.readthedocs.io/) 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](https://gitlab.com/sombrahq/python-libs/python-import-policies).
## License
MIT License
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/sombrahq/python-libs/python-import-policies",
"name": "python-import-policies",
"maintainer": "Yunier Rojas Garc\u00eda",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "yunier.rojas@gmail.com",
"keywords": "python,import,policy",
"author": "Yunier Rojas",
"author_email": "yunier@sombra.cc",
"download_url": "https://files.pythonhosted.org/packages/8e/ea/4b3adfe668e824e4a66911a6600098b9e96c0f7f28c269969bb6e0abb715/python_import_policies-1.0.0.tar.gz",
"platform": null,
"description": "# python-import-policies\n\n**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](https://github.com/seddonym/import-linter). This package allows you to enforce consistent import practices, improve code readability, and maintain a clean and organized codebase.\n\n## Installation\n\nInstall the package using pip:\n\n```bash\npip install python-import-policies\n```\n\n## Usage\n\nAn example configuration for `import-linter` configuration\n\n```ini\n[importlinter]\nroot_package = your_package\ncontract_types =\n import_policy: import_policies.contracts.ImportPolicy\n\n[importlinter:contract:import-policy]\nname = Define import policy\ntype = import_policy\nallow_modules =\n your_package.** -> another_package.**\n ** -> your_package.api\n\n```\n\nThen execute the linter\n\n```bash\nlint-imports\n\n```\n\nFor more information visit [import-linter](https://import-linter.readthedocs.io/) website.\n\n\n## Contributing\nWe 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](https://gitlab.com/sombrahq/python-libs/python-import-policies).\n\n## License\nMIT License\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Import Policies",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://gitlab.com/sombrahq/python-libs/python-import-policies",
"Repository": "https://gitlab.com/sombrahq/python-libs/python-import-policies"
},
"split_keywords": [
"python",
"import",
"policy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e5df8c3ad74916619416b1ed019141d7b300fcc36a124486e8f86f241b1c302a",
"md5": "1562b067c1dee0d4681a26d9c24a755c",
"sha256": "c539e7c05275e5acd44cd67437c3cd261690687ffd0f4a5f5730916c63ffee93"
},
"downloads": -1,
"filename": "python_import_policies-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1562b067c1dee0d4681a26d9c24a755c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 3550,
"upload_time": "2023-12-12T07:39:39",
"upload_time_iso_8601": "2023-12-12T07:39:39.998604Z",
"url": "https://files.pythonhosted.org/packages/e5/df/8c3ad74916619416b1ed019141d7b300fcc36a124486e8f86f241b1c302a/python_import_policies-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8eea4b3adfe668e824e4a66911a6600098b9e96c0f7f28c269969bb6e0abb715",
"md5": "96242ebace237077df8a3ab51f8d1010",
"sha256": "950bdf59dc9196e75403dca9cceb5546fe670d389e54f159572f3424f8437617"
},
"downloads": -1,
"filename": "python_import_policies-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "96242ebace237077df8a3ab51f8d1010",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 2935,
"upload_time": "2023-12-12T07:39:43",
"upload_time_iso_8601": "2023-12-12T07:39:43.354605Z",
"url": "https://files.pythonhosted.org/packages/8e/ea/4b3adfe668e824e4a66911a6600098b9e96c0f7f28c269969bb6e0abb715/python_import_policies-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-12 07:39:43",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "sombrahq",
"gitlab_project": "python-libs",
"lcname": "python-import-policies"
}