Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 1.41 KB

README.md

File metadata and controls

72 lines (47 loc) · 1.41 KB

PYMP

An example multithreaded pub-sub Python program.

Warning

This is a demonstration project only. It is not ready to be used in production.

Reading

To read the code top-down from the highest entry point, please start in src/py_mp.py.

Why?

I wanted to demonstrate that I know how to:

  1. Write a solution to a multithreaded problem.
  2. Use pub-sub architectures.
  3. Add in dependencies with PIP and venv.
  4. Write PEP8 compatible code.
  5. Improve code using static analysis tools like Bandit, Mypy and pycodestyle.
  6. Create python development environments using Docker (and podman).
  7. (Hopefully) write a decent README :).

Installation

Prerequisites

You will need these installed:

  • podman (optional, you'll need python3 and pip without it.) (and set up to use 'Rootless' containers).
  • curl
  • gpg

How

To install, first clone the repository and then run the build script:

git clone https://github.com/WillSkates/py-mp.git
bash ./build

Usage

Without podman

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
./py3 ./check
./py3 python src/py_mp.py

Running the script

./py3 python src/py_mp.py

Running standards checks

./py3 ./check

License

This project is published under the MIT license.

Full details can be found in the "LICENSE" file.