NB Defense CLI.
Project description
NB Defense
Quick Start
-
Install NBDefense using pip:
$ pip install nbdefense
-
Install Spacy Model
en_core_web_trf
(required if you are using the PII plugin):$ python -m spacy download en_core_web_trf
-
Run a scan with nbdefense:
$ nbdefense scan -s
Dev installation
To install development dependencies to your environment and set up the cli for live updates, clone nbdefense
and run the following command in the root of the repository:
$ make install-dev
Poetry
The following install commands require Poetry. To install Poetry you can follow this installation guide. Poetry can also be installed with brew using the command brew install poetry
.
Tips:
- You can add a dependency with the command
poetry add pendulum==0.0.0
. To specify a group usepoetry add pendulum==0.0.0 --group dev
- You can remove a dependency with the command
poetry remove pendulum
Formatting
Run the formatter with:
$ make format
Prod build
To build the cli for prod installs run the following:
$ make install
$ make build-prod
or if you want dynamic versioning with dunamai
$ make install-prod
$ make build-prod
CLI Usage
nbdefense scan
command
nbdefense scan --help
Usage: nbdefense scan [OPTIONS] [PATH]
Scan [PATH] for .ipynb files for potential issues.
Options:
-r, --recursive Scan all nested directories for .ipynb
files.
-s, --serve Run an HTTP Server to view the report
instead of persisting the report as an html
file.
-q, --quiet Suppress all output.
-d, --dependency-file PATH Specify a requirements.txt file to scan for
CVEs and license compatibility.
-f, --output-file FILE Specify an output filename for the report.
-o, --output-format [json|html]
The output format for the report.
-y, --yes Bypass all prompts with an affirmative
response.
--settings-file FILE Specify a settings file to use for the scan.
Defaults to [PATH]/settings.toml.
--no-progress-bars Hide progress bars, but keep other logging
active.
--help Show this message and exit.
nbdefense settings create
command
nbdefense settings create --help
Usage: nbdefense settings create [OPTIONS]
Create a settings file in the current working directory.
Options:
-f, --force Overwrite existing settings file if it exists.
-l, --location FILE The specific filepath to write the settings.toml file.
--help Show this message and exit.
Project details
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
File details
Details for the file nbdefense-1.0.1.tar.gz
.
File metadata
- Download URL: nbdefense-1.0.1.tar.gz
- Upload date:
- Size: 45.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.8.16 Linux/5.15.0-1034-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e518827d02d193850af884eb07930b8fa02f82de0415f2700832f208a14f736 |
|
MD5 | 843232b6a5911abe61049b9034ff4f4a |
|
BLAKE2b-256 | 5606177bf2c7158520eea85b4c26716a9d45c4e32db4f52ce66d386080309cd9 |
File details
Details for the file nbdefense-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: nbdefense-1.0.1-py3-none-any.whl
- Upload date:
- Size: 63.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.8.16 Linux/5.15.0-1034-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 426f799786f345d388d67837bbb6d52e04114a33aa57c00dda592503db64d228 |
|
MD5 | 763787d7e6393ae929466c92846dd9e9 |
|
BLAKE2b-256 | 7d7c682b877ee1b0bba7379173fa6dafe0827a0a5151fdc5f9979bc84576bb3b |