Show / Hide Table of Contents
Edit on GitHub

Using PKI Express on Python

This article describes how to use PKI Express on Python

Sample project

The sample project shows the usage of PKI Express together with the Web PKI browser component on a Python project. It is hosted on GitHub:

https://github.com/LacunaSoftware/PkiSuiteSamples/tree/master/python/flask

Note

If you are using a previous version of Ptyhon, please contact us.

Running the project

  1. Install PKI Express
  2. Download the project or clone the repository
  3. In a command prompt, navigate to the folder Python/Flask and run the command pip install -r requirements.txt to download the dependencies
  4. Define the FLASK_APP environment variable to define the name of app the should be run: FLASK_APP=sample
  5. Run the web application: flask run or python -m flask run
  6. 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)

PyPi package

In order to use PKI Express on Python, you must includ the PyPi package pkiexpress

To add it to your project, add the line below to your requirements.txt file:

pkiexpress==1.10.0

After that, do a pip install -r requirements.txt to download the package and its dependencies.

The package is open-source, hosted on GitHub. Feel free to fork it if you need to make any customizations, and even submit an pull request.

Back to top Copyright © 2015-2020 Lacuna Software