📜  获取本地 python api 图像 url - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:11.801000             🧑  作者: Mango

代码示例1
#If you want to send the URLs to external APIs, your images need to be hosted somewhere.
#If your machine is communicating locally, you can simply run

python -m http.server

#in your images folder. Then you will get URLs like

#127.0.0.1:8000/myImg.png

#To access this on another machine in same network, the url would be:

#IPv4ofMachine:8000/myImg.png

#You can get IPv4 of the host machine by running "ipconfig" in your CMD.