Accessing Flask WS APIs over intranet -

I have 2 scripts - A.py and B.py, and both are Flask apps. A.py renders a web page and acts as my UI taking inputs from user. B.py is hold the main logic and has a web service API being called by A.py.

Both run as flask app services in localhost from different ports - 5001 and 5002, respectively.

My doubts -

1) Every time I make any changes to my B.py (or A.py), do i need to stop and restart the services?

2) I'm currently running both the services from local machine for proof-of-concept purposes. If I use WSGI (thinking of Bottle), will it be accessible from other machines over intranet?

I'm on Windows 10 (64-bit), Python 3.6 and Flask 1.1.1

Please advise.


Edit 1) Added OS and Python version details.

Topic json windows nlp machine-learning

Category Data Science


1) YES. the updates won't be visible not until your restart your webservice. ( Both by the way ).

2) Gunicorn works well with Flask as a wsgi app. I'm not sure how to answer your question. All i can say is that i have webservices deployed to production with both Gunicorn+ Flask and Flask only, and they are both accessible over internet. Only difference is that Flask is not meant for production deployment, only for testing purposes.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.