# stock-flask **Repository Path**: caizhixiang/stock-flask ## Basic Information - **Project Name**: stock-flask - **Description**: No description available - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2021-11-22 - **Last Updated**: 2025-05-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1. install: ``` FLASK FLASK-SQLAlchemy pymysql flask_apscheduler scrapy pinyin selenium ``` 2. 逆向生成实体: pip install flask-sqlacodegen 进入models那级目录 flask-sqlacodegen --flask mysql+pymysql://root:123456@47.100.68.129:3306/stock > models.py 三、安装docker https://blog.csdn.net/qiao_xinxin/article/details/114943904 https://www.runoob.com/docker/centos-docker-install.html 四. 安装mysql docker run -d --name mysql1 -p 3306:3306 -v /root/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 mysql docker exec -it 容器id bash 来操作mysql 修改配置让navicate连接 use mysql; alter user 'root'@'%' identified with mysql_native_password by '密码'; flush privileges; 五. 安装python容器 docker exec -it python1 bash docker run -it -d --name=p2 --user root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v /root/project:/root/project python:3.8 bash docker build -t stock-flask . docker run -d stock-flask nohup python app.py > log.txt linux里scrapy selenium invalid session id https://blog.csdn.net/weixin_35757704/article/details/120706276 六. 安装flask项目 docker build -t stock-flask:0316 . docker run -it --name=stock0316 -p 80:80 --privileged=true -v /root/project/stock-flask_20230316/:/app/ stock-flask:0316 docker run -it --name=stock012 -p 80:80 --privileged=true -v /root/project/stock-flask_010/:/app/ stock-flask:012 备份docker镜像 https://blog.csdn.net/qq_24295577/article/details/108566198 ta-lib https://github.com/deepnox-io/docker-python-ta-lib 日志: https://www.jianshu.com/p/28f1acb11f6b linux 安装mysql : https://blog.51cto.com/JavaAlliance/2933855 https://www.cnblogs.com/aidaminiu/p/15750946.html 修改密码 https://blog.csdn.net/qq_34680444/article/details/86238516 https://www.cnblogs.com/withLevi/p/16005877.html --------------------------------------todo--------------------------------------------- 1. 获取股票详情里的毛利率等信息 2. 展示大盘,行业资金涨幅排行(单日,多日查询对比,多日混合计算后展示) 3. 拉取行业股票新闻,并打标利空or利多 4. 对接东方财富股票接口 3. 分析 4. stock_info 分页 5. 找出股票详情里的接口方法 6. 数据库定期备份 7. 日志管理 8. H5页面显示pandas数据 https://xinancsd.github.io/Python/imgEmbed2Html.html https://cloud.tencent.com/developer/article/1631390?from=15425 https://cloud.tencent.com/developer/article/1531228?from=15425 k线图 https://github.com/jones2000/HQChart https://github.com/liihuu/KLineChart 回测框架 https://zhuanlan.zhihu.com/p/133637955 https://zhuanlan.zhihu.com/p/402559960 https://search.bilibili.com/all?vt=63757811&keyword=Backtrader&from_source=webtop_search&spm_id_from=333.1007&order=click 自定义: https://blog.csdn.net/weixin_47974364/article/details/123433336 backtrader + 选股 https://zwdnet.github.io/2020/08/24/%E9%87%8F%E5%8C%96%E6%8A%95%E8%B5%84%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B085%E2%80%94%E2%80%94%E5%AE%9E%E7%8E%B0%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%E7%BB%8F%E5%85%B8%E7%AD%96%E7%95%A5-%E5%A4%9A%E5%9B%A0%E5%AD%90%E9%80%89%E8%82%A1/ https://zwdnet.github.io/categories/%E9%87%8F%E5%8C%96%E6%8A%95%E8%B5%84/ https://www3.guosen.com.cn/guosen/newxwfiles/upload/2020/02/13/5682a0dd.pdf https://zhuanlan.zhihu.com/p/76760276 https://zhuanlan.zhihu.com/p/165379657 https://zhuanlan.zhihu.com/p/39962471 https://www.zhihu.com/question/370109374/answer/2289252953