# Open port for Flask

**URL:** <https://forums.digi.com/t/open-port-for-flask/26136>\
**Category:** Python\
**Tags:** ix15\
**Created:** [June 22, 2023, 2:25pm UTC](https://forums.digi.com/t/open-port-for-flask/26136 "2023-06-22T14:25:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tadam](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@tadam](https://forums.digi.com/u/tadam)\
**Post date:** [June 22, 2023, 2:25pm UTC](https://forums.digi.com/t/open-port-for-flask/26136/1 "2023-06-22T14:25:37Z")

</div>

Hello there!  
I would like to create some calleable methods on IX15 so I can passdown some info to my xbee nodes. For that I take a look into Flask.  
I installed via pip, created a hello word code, exeuted the program.  
In pycharm run tool windo I can see that the Flask is running, demo code is executed, but the URL, where the flask should be is not avaible.

Should set up something in the ix15 settings? Or what am I missing? Should I use a different aproach?

Thank you,

```auto
from flask import Flask

flaskapp = Flask( __name__ )

@flaskapp.route("/")
def hello_world():
    return "<p>Hello, World!</p>"

if __name__ == ' __main__':
    flaskapp.run(host="192.168.50.20", port="5000", debug=True) #the IP address of the ix15 which is given by our lan router
  

```

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [June 23, 2023, 2:14pm UTC](https://forums.digi.com/t/open-port-for-flask/26136/2 "2023-06-23T14:14:04Z")

</div>

I would suggest you look at the AZURE Send/Receive examples found in PyCharm to see how to send and receive data via the Ethernet/Cellular connection to an external server.

You can also use the examples in the XBee Receive Data and Send data examples in PyCharm as well.

---

<div class="post-metadata">

**Author:** ![tadam](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@tadam](https://forums.digi.com/u/tadam)\
**Post date:** [July 12, 2023, 2:47pm UTC](https://forums.digi.com/t/open-port-for-flask/26136/3 "2023-07-12T14:47:35Z")

</div>

Azure send and receive examples uses azure as a backend. I would like to elliminate any third parties.  
That why I would like to host a python code using flask handling a the communication.  
The sample flask application is running, based on run window, but my feelig that I should open a port for it to gain access from the browser.
