Table of Contents
Project to reimplement the Pyro middleware project in the REST architecture. Uses FastAPI for SSE and Flask for the REST API.
Development of a product inventory management system. Use Rest to provide communication between processes. Methods available in the stock management system:
- User registration. When accessing the system for the first time, a stock manager must enter their name, public key and remote object reference;
- Posting product input and output:
- When entering the product, the code must be entered, name, description, quantity, unit price and minimum stock of the product. product. On issue, you must enter the code and quantity. The system must also save the date and time of each entry.
- Report generation:
- Products in stock;
- Flow of movement (inflows and outflows) of stock by period;
- List of unissued products by period.
Method available from the client:
- Event notification: the stock management system has the task of the manager, via a method call, the following event notifications events:
- Product that has reached minimum stock so that replenishment can be replenished;
- Periodic reports warning of unsold products in order to to identify the need for promotions.
Client is implemented in JavaScript, and the server is implemented in Python.
SSE (Server-Sent Events) is used to send notifications from the server to the client.
Clone or download the repository, then follow the instructions below.
Install the requirements for the client.
- npm
npm install
Install the requirements for the server.
- pip
pip install -r requirements.txt
Start the server (server.py) with python.
python server.pyStart client (js/client.js) with node.
node client.jsNow select the options in the client menu.
