Skip to content

Commit

Permalink
Add a module entrypoint (#173)
Browse files Browse the repository at this point in the history
* pip_audit: add __main__.py

* README: document entrypoints

* CHANGELOG: record changes

* __main__: mark entrypoint as `no cover`
  • Loading branch information
woodruffw authored Dec 3, 2021
1 parent a0fe40b commit b0f2615
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ All versions prior to 0.0.9 are untracked.
when `pip-audit` is invoked in environment mode
([#148](https://github.com/trailofbits/pip-audit/pull/148))

* CLI: The `pip-audit` CLI can now be accessed through `python -m pip_audit`.
All functionality is identical to the functionality provided by the
`pip-audit` entrypoint
([#173](https://github.com/trailofbits/pip-audit/pull/173))

### Changed

### Fixed
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ python -m pip install pip-audit

## Usage

You can run `pip-audit` as a standalone program, or via `python -m`:

```bash
pip-audit --help
python -m pip_audit --help
```

<!-- @begin-pip-audit-help@ -->
```
usage: pip-audit [-h] [-V] [-l] [-r REQUIREMENTS] [-f FORMAT] [-s SERVICE]
Expand Down
8 changes: 8 additions & 0 deletions pip_audit/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""
The `python -m pip_audit` entrypoint.
"""

if __name__ == "__main__": # pragma: no cover
from pip_audit._cli import audit

audit()

0 comments on commit b0f2615

Please sign in to comment.