This folder contains a web application written in Python using the Flask framework, that shows how to use the REST PKI service. The sample application should work on Python versions 2.7 and 3.5.
For other languages, please visit the repository root.
To run the samples, you will need an API access token. If you don't have one, register on the REST PKI website and generate a token.
To run the sample:
-
Download the project or clone the repository
-
Generate an API access token on the REST PKI website
-
Paste your access token on the file
sample/utils.py -
Install dependencies:
pip install -r requirements.txt -
Set the
FLASK_APPenvironment variable to define the name of app that should be run:FLASK_APP=sample -
Run the web application:
flask run -
Access the URL http://localhost:5000
Optionally, you can create and activate a "virtualenv" to avoid mixing library versions:
virtualenv <venv>
source bin/activate (on Windows: ./<venv>/Scripts/activate)
pip install -r requirements.txt
python manage.py runserver
deactivate