fastapi

执行运行FastAPI [WinError 10013]以一种访问权限不允许的方式做了一个访问套接字的尝试错误的解决办法

Deadly 提交于 2020-08-13 18:44:12
执行uvicorn main:app --reload如下错误 [WinError 10013]以一种访问权限不允许的方式做了一个访问套接字的尝试 说明要启动的端口被其他程序占用,只需执行 netstat -ano|findstr 8000 找到占用8000的端口即可,关闭即可 先执行 PS C:\Users\xyzbo> netstat -ano|findstr 8000 TCP 0.0.0.0:8000 0.0.0.0:0 LISTENING 64988 TCP 192.168.0.2:35465 58.251.121.55:8000 SYN_SENT 58236 UDP 0.0.0.0:8000 *:* 64988 再执行 taskill 强行关闭对应端口 PS C:\Users\xyzbo> taskkill /pid 64988 /f 8000端口还是会自动启动,只是占用进程号发生了变化,最后强行退出酷狗后,再执行上面强行终止命令就好了。 来源: oschina 链接: https://my.oschina.net/u/53041/blog/4302544

局域网文件共享

社会主义新天地 提交于 2020-08-13 07:00:56
局域网文件共享 关键字:python、fastapi 因为自己工作中生活中需要查看局域网文件,有时候U盘比较不方便,就用宇宙最强web框架FASTAPI写了一个局域网共享程序,安装好python和相关的包就可以使用。 具体包见gihub链接: https://github.com/Frank1126lin/python_web_app 有需要自取,支持无限文件夹嵌套。 最近又用jinja2模板重写了一次,见地址: https://github.com/Frank1126lin/python_web_app/tree/master/FileShare 来源: oschina 链接: https://my.oschina.net/frank1126/blog/4330163

使用FastAPI部署yolov5

纵饮孤独 提交于 2020-08-11 07:56:17
自己琢磨了好几天的部署方法,目前临时使用的是使用fastapi存储文件,再用yolov5读取图片并保存结果,再用fastapi返回结果文件。 下一步思路,重写predict.py文件实现直接读取接收的图片,并返回结果图片。 地址参见: https://github.com/Frank1126lin/deploy_yolov5_with_fastapi 觉得还不错的话,请一键三连,给个星星。 来源: oschina 链接: https://my.oschina.net/frank1126/blog/4375331

how to put backend and frontend together - returning react frontend from fastapi backend endpoint

醉酒当歌 提交于 2020-08-10 16:52:13
问题 Firstly, I just wanted to say that this is my first web application project. I've spent the past few days trying to find answers on how to essentially put the frontend and backend together. I have a lot of questions, but the main one I want answered is on how to return my frontend 'final product' from a backend endpoint. This is what I understand (please correct me if I'm wrong): The frontend code is run by the client (browser). When the client interacts with the webpage, the frontend makes

how to put backend and frontend together - returning react frontend from fastapi backend endpoint

*爱你&永不变心* 提交于 2020-08-10 16:51:37
问题 Firstly, I just wanted to say that this is my first web application project. I've spent the past few days trying to find answers on how to essentially put the frontend and backend together. I have a lot of questions, but the main one I want answered is on how to return my frontend 'final product' from a backend endpoint. This is what I understand (please correct me if I'm wrong): The frontend code is run by the client (browser). When the client interacts with the webpage, the frontend makes

how to put backend and frontend together - returning react frontend from fastapi backend endpoint

北城以北 提交于 2020-08-10 16:51:23
问题 Firstly, I just wanted to say that this is my first web application project. I've spent the past few days trying to find answers on how to essentially put the frontend and backend together. I have a lot of questions, but the main one I want answered is on how to return my frontend 'final product' from a backend endpoint. This is what I understand (please correct me if I'm wrong): The frontend code is run by the client (browser). When the client interacts with the webpage, the frontend makes

how to put backend and frontend together - returning react frontend from fastapi backend endpoint

江枫思渺然 提交于 2020-08-10 16:50:29
问题 Firstly, I just wanted to say that this is my first web application project. I've spent the past few days trying to find answers on how to essentially put the frontend and backend together. I have a lot of questions, but the main one I want answered is on how to return my frontend 'final product' from a backend endpoint. This is what I understand (please correct me if I'm wrong): The frontend code is run by the client (browser). When the client interacts with the webpage, the frontend makes

Python version 3.5 does not support variable...

自作多情 提交于 2020-08-09 21:24:02
背景 目前处于FastAPI学习初期,使用环境是: Win7 64 bits SP1 PyCharm 2016.3 Python 3.8.4 FastAPI 0.60.1 问题截图 错误提示 如图所示,错误是“Python version 3.5 does not support variable annotations"。 ... 目前有关此错误的解答国内网站上几乎没有。国外仅发现——没有***+GOOGLE,stackoverflow上个别提到,不符合我的情况。 我的情况是,前不久刚安装了系统WINDOWS 7 SP1 64bits+Python 3.8.4+PyCharm 2016.3。系统中根本没有Python 3.5相关内容。 但是,上面这种介绍FastAPI的代码,在国外网站上经常见到,但都没有提到类似于我的错误。 我的PyCharm设置1如下图: 在”Default settings“下,也作了上面设置。 但是,都无济于事! 目前,此案件正在调查中...... 来源: oschina 链接: https://my.oschina.net/u/4391429/blog/4479054

FastAPI says missing folder name as module

心不动则不痛 提交于 2020-08-09 18:41:20
问题 I have a question related to FastAPI with uvicorn in pycharm. My project is having following structure: LearningPy <folder name> | |-- apis <folder name> -----|--modelservice <folder name> ---------|--dataprovider.py ---------|--main.py ---------|--persondetails.py -----|--config.py First I was using following path : D:\Learnings\apis and ran following code : uvicorn main:app --reload then it was giving error : Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) Started reloader

FastAPI says missing folder name as module

佐手、 提交于 2020-08-09 18:40:10
问题 I have a question related to FastAPI with uvicorn in pycharm. My project is having following structure: LearningPy <folder name> | |-- apis <folder name> -----|--modelservice <folder name> ---------|--dataprovider.py ---------|--main.py ---------|--persondetails.py -----|--config.py First I was using following path : D:\Learnings\apis and ran following code : uvicorn main:app --reload then it was giving error : Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) Started reloader