Forbid External Packages contract
A contract for [import-linter] that forbids imports of external (i.e. not in the standard library) packages.
Usage
-
Install this package in the same virtual environment as import-linter.
-
Add the contract type to your config file, e.g:
[importlinter] root_package = my_project include_external_packages = True + contract_types= + forbid_external_packages: importlinter_forbid_external_packages.Contract
N.B.
include_external_packagesmust be enabled for this contract type to have any effect. -
Create a contract with
type = forbid_external_packages. This contract must specify thesource_modulesvalue, as documented for the built-inforbiddencontract type
Example
[importlinter]
root_package = my_project
include_external_packages = True
contract_types=
forbid_external_packages: importlinter_forbid_external_packages.Contract
[importlinter:contract:external-packages]
name = External packages
type = forbid_external_packages
source_modules =
my_project.*
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file import_linter_forbid_external_packages-0.1.0.tar.gz.
File metadata
- Download URL: import_linter_forbid_external_packages-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d657ce8e7d6fe504a4d5a5be89a0817459d4fe367c834ea8e43566ebb4f99cd6
|
|
| MD5 |
ad8c79e27b6d5f2ffdbb548ffa21b19f
|
|
| BLAKE2b-256 |
5ff1a7e60f52d33974932e46849030e5fca65e29db75f814bd1674e28793ed19
|
Provenance
The following attestation bundles were made for import_linter_forbid_external_packages-0.1.0.tar.gz:
Publisher:
build_and_publish.yaml on samueljsb/import-linter-forbid-external-packages
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
import_linter_forbid_external_packages-0.1.0.tar.gz -
Subject digest:
d657ce8e7d6fe504a4d5a5be89a0817459d4fe367c834ea8e43566ebb4f99cd6 - Sigstore transparency entry: 2350075466
- Sigstore integration time:
-
Permalink:
samueljsb/import-linter-forbid-external-packages@33a1215fdf0e730840ec92eb3e3faf04449659b3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/samueljsb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yaml@33a1215fdf0e730840ec92eb3e3faf04449659b3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file import_linter_forbid_external_packages-0.1.0-py3-none-any.whl.
File metadata
- Download URL: import_linter_forbid_external_packages-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01ace407bfb7e4b5c61ae63fe7fb005dc4f22a94ad8920f90f4c9b72de34a7f8
|
|
| MD5 |
8a9cee98405f3aa96b5728aaa4a936a5
|
|
| BLAKE2b-256 |
e6eba7cbef285e2d989cf3221a211d9534c8fa41c86df68732c72a5462a5d0fd
|
Provenance
The following attestation bundles were made for import_linter_forbid_external_packages-0.1.0-py3-none-any.whl:
Publisher:
build_and_publish.yaml on samueljsb/import-linter-forbid-external-packages
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
import_linter_forbid_external_packages-0.1.0-py3-none-any.whl -
Subject digest:
01ace407bfb7e4b5c61ae63fe7fb005dc4f22a94ad8920f90f4c9b72de34a7f8 - Sigstore transparency entry: 2350076267
- Sigstore integration time:
-
Permalink:
samueljsb/import-linter-forbid-external-packages@33a1215fdf0e730840ec92eb3e3faf04449659b3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/samueljsb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yaml@33a1215fdf0e730840ec92eb3e3faf04449659b3 -
Trigger Event:
push
-
Statement type: