https://github.com/veracode/veracode-python-hmac-example
Simple example of usage of the Veracode API signing library provided on the Veracode Help Center
https://github.com/veracode/veracode-python-hmac-example
Last synced: 6 months ago
JSON representation
Simple example of usage of the Veracode API signing library provided on the Veracode Help Center
- Host: GitHub
- URL: https://github.com/veracode/veracode-python-hmac-example
- Owner: veracode
- License: mit
- Created: 2019-06-07T08:54:12.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-06T09:12:14.000Z (over 1 year ago)
- Last Synced: 2024-11-06T10:29:36.446Z (over 1 year ago)
- Language: Python
- Homepage: https://docs.veracode.com/r/c_hmac_signing_example_python
- Size: 9.77 KB
- Stars: 9
- Watchers: 3
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Veracode Python HMAC Example
A simple example of usage of the Veracode Python API signing library provided in the [Veracode Documentation](https://docs.veracode.com/r/c_hmac_signing_example_python).
## Setup
Clone this repository:
git clone https://github.com/veracode/veracode-python-hmac-example.git
Install dependencies:
cd veracode-python-hmac-example
pip install -r requirements.txt
(Optional) Save Veracode API credentials in `~/.veracode/credentials`
[default]
veracode_api_key_id =
veracode_api_key_secret =
## Run
If you have saved credentials as above you can run:
python example.py
Otherwise you will need to set environment variables before running `example.py`:
export VERACODE_API_KEY_ID=
export VERACODE_API_KEY_SECRET=
python example.py
## Note
By default the example works for customers in the Veracode US Commercial Region (login page is https://analysiscenter.veracode.com). For customers in other regions, please comment out line 6 and uncomment either line 7 or line 8. For an example of code that automatically switches to the correct region, see the project [Veracode-api-py](https://github.com/veracode/veracode-api-py).