You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-17Lines changed: 14 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,27 +7,29 @@ This is a python SDK for working with the Nightfall API.
7
7
8
8
## Installation
9
9
10
-
This module requires Python 3.6 or higher.
10
+
This module requires Python 3.7 or higher.
11
11
12
12
```
13
13
pip install nightfall
14
14
```
15
15
16
16
## Quickstart
17
17
18
-
Make a new [API Token](https://app.nightfall.ai/api/)and [Detection Rule Set](https://app.nightfall.ai/detection-engine/detection-rules)in Nightfall and store the values as environment variables.
18
+
Make a new [API Token](https://app.nightfall.ai/api/) in Nightfall and store the value as an environment variable.
19
19
20
-
```
21
-
from nightfall import Nightfall
20
+
```python
21
+
importos
22
22
23
-
nightfall = Nightfall(
24
-
os.getenv('NIGHTFALL_TOKEN'),
25
-
os.getenv('NIGHTFALL_CONDITION_SET')
26
-
)
23
+
from nightfall import Confidence, DetectionRule, Detector, Nightfall
For more information on the details of this library, please refer to
@@ -50,25 +52,20 @@ environment with the following commands:
50
52
51
53
### Run Unit Tests
52
54
53
-
Unit and Integration tests can be found in the `tests/` directory. You can run them with `make test`. Be sure to have `NIGHTFALL_TOKEN` and `NIGHTFALL_CONDITION_SET`set as environment variables before running the tests.
55
+
Unit and Integration tests can be found in the `tests/` directory. You can run them with `pytest`. Be sure to have `NIGHTFALL_API_KEY`set as an environment variable before running the tests.
54
56
55
57
### View Code Coverage
56
58
57
59
You can view the code coverage report by running `coverage html` and `python3 -m http.server --directory htmlcov` after running the unit tests.
58
60
59
-
### SDK Documentation
60
-
61
-
The SDK is documented using the Sphinx library. You can generatre the developer documentation using `make docs` and preview it on `localhost:8000` by running `make serve-docs`.
62
-
63
61
### Creating a Release
64
62
65
63
Releases are automatically published to PyPI using GitHub Actions. Creating a release in GitHub will trigger a new build that will publish the latest version of this library to [PyPI](https://pypi.org/project/nightfall/).
66
64
67
65
The steps to do this are:
68
66
69
67
1. Add what changed to the CHANGELOG file
70
-
1. Update the version in `setup.py`
71
-
1. Generate documentation with `make docs` to make sure it's up to date
68
+
2. Update the version in `setup.py`
72
69
3. Commit changes and push to the main branch.
73
70
4. Create a new release in the GitHub UI.
74
71
5. Observe the release action succeed and see the latest version of this library on PyPI.
0 commit comments