Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
A web framework who is use sanic + tortoise-orm + redis to quick create http&websocket server.
参照项目目录
logs -- 运行日志存放目录,按服务区分,服务停止情况下,删除后会自动生成
migrations -- 数据迁移目录,该目录下的数据一般情况不要删除或手动修改,否则会造成数据模型迁移的问题
pyproject.toml -- 当前操作数据的服务
非指定的其余目录皆为实际服务目录,以xi_test目录为例:
-- config -- 该服务的配置存放位置
-- handler -- 常规逻辑或功能处理函数或基类
-- model_db -- 该服务的数据模型存放位置
-- model_rc -- 该服务的缓存模型存放位置,采用内置的可直接继承自RCModel
-- interface -- 该服务的接口逻辑存放位置
-- script -- 该服务的定时脚本、配置脚本、自定义脚本等的存放位置
-- base_api.py -- 该服务的基础接口授权相关内容
-- url_main.py -- 该服务的接口路由入口
-- http_xi_test.py/srv_xi_test.py/ws_xi_test.py -- 服务的启动文件
在项目根目录下 http_XXX.py/srv_XXX.py/ws_XXX.py -- 可运行服务 以http_加服务名
比如 参照示例,开启一个新的服务 xi_test,切换到相应的python环境,然后运行sanicGuider命令,按照指引生成项目,除项目名必须指定外其余均可默认
数据迁移工具采用与tortoise-orm配套的aerich迁移工具
这里采用service的方式启停服务,也可以采用sanic官方提供的部署方式或者直接使用supervisor运行
采用root账户运行:
采用一般账户运行(该一般账户必须被允许常驻服务):
FAQs
A web framework who is use sanic + tortoise-orm + redis to quick create http&websocket server.
We found that msanic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.