TransWikia.com

Accessing Flask WS APIs over intranet -

Data Science Asked on December 11, 2021

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.

One Answer

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.

Answered by Blenz on December 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP