Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

aenglander/practical-api-security-python-example-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practical API Security Example

This repository consists of client and server code comprising the example material for Practical API Security.

Installing

Pre-Installation Requirements

Clone This Repository

Clone this repository to your computer

git clone https://github.com/aenglander/practical-api-security-python-example-flask.git

Setup Virtual Environment (Optional)

Optionally, you can set up a virtual environment for the demo application to prevent the demo from interfering with your other Python applications. Instructions can be found here: Creating Virtual Environments.

Installing Requirements

Run a PIP install with the requirements file:

pip install requirements.txt

Verifying the installation

  1. Start the server

    From Bash:

    export FLASK_APP=server.py
    export FLASK_ENV=development
    flask run

    From Windows:

    set FLASK_APP=server.py
    set FLASK_ENV=development
    flask run
    
  2. Run the client:

    python client.py
  3. The client response should be:

    REQUEST:
    
    === No Request ===
    
    RESPONSE:
    
    Decrypted Body:
    {
      "Hello": "World!"
    }
    

About

Code example for Practical API Security for Python based presentations and trainings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages