{"id":19590085,"url":"https://github.com/sparticleinc/gptbase-enterprise-server","last_synced_at":"2026-06-12T12:31:31.947Z","repository":{"id":206800364,"uuid":"716438764","full_name":"sparticleinc/gptbase-enterprise-server","owner":"sparticleinc","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-30T13:20:38.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-26T13:46:25.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sparticleinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-09T06:16:58.000Z","updated_at":"2024-08-30T13:20:42.000Z","dependencies_parsed_at":"2024-01-14T15:08:32.776Z","dependency_job_id":"9ffc695f-279b-4af2-8239-ce7573a395dd","html_url":"https://github.com/sparticleinc/gptbase-enterprise-server","commit_stats":null,"previous_names":["sparticleinc/gptbase-enterprise-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sparticleinc/gptbase-enterprise-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparticleinc%2Fgptbase-enterprise-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparticleinc%2Fgptbase-enterprise-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparticleinc%2Fgptbase-enterprise-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparticleinc%2Fgptbase-enterprise-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sparticleinc","download_url":"https://codeload.github.com/sparticleinc/gptbase-enterprise-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparticleinc%2Fgptbase-enterprise-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34245217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T08:23:23.134Z","updated_at":"2026-06-12T12:31:31.918Z","avatar_url":"https://github.com/sparticleinc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 服务开发指南\n\n## 一、框架说明\n\n### 1.1 Python\u003e=3.10\n\n### 1.2 [FastAPI](https://fastapi.tiangolo.com/zh/) WEB框架\n\n### 1.3 [Tortoise-ORM](https://tortoise.github.io/contrib/fastapi.html)  数据库ORM【使用PostgreSQL数据库】\n\n### 1.4 uvicorn 服务运行库\n\n## 二、快速开始\n\n- 安装Python 3.10\n- 拉取代码\n- 设置python虚拟环境\n    - `pip install virtualenv`\n    - `virtualenv venv`\n- 安装依赖 `pip install -r requirements.txt`\n- 安装vscode，并安装扩展pylance\n- 在项目根目录下创建.env，对应setting.py里面的配置\n- 运行代码：`uvicorn circleo.app:app --reload` 或者  `python main.py`\n- 安装pre-commit，执行：`pip install pre-commit`以及`pre-commit install`用于提交代码前格式检查\n\n## 三、代码提交规范\n\n- 新功能开发、较大改动的bug以及代码重构需要通过开分支提交，并请求其他成员进行代码review以及合并。通过github pull request\n  提交合并请求。\n- 分支说明\n    - main分支为开发环境分支，最新代码在main分支体现\n    - 合并到main分支前需要先解决代码冲突，由请求合并方负责冲突解决\n    - 正式版本将代码从main分支开出最新的wk分支（如果一周多个发布，则为合并）\n\n## 四、运维说明\n\n### 4.1 环境说明\n\n### 4.2 服务部署\n\n### 4.3 运行日志\n\n\u003e 通过elastic查看\n\n## 五、ORM生成初始化脚本\n\n- Init ORM: `aerich init -t gptbase_enterprise.settings.TORTOISE_ORM` (Only fisrt, no need)\n- Init database: `aerich init-db` (Only fisrt, no need)\n- Make migrations: `aerich migrate`\n- Migrate(to DB): `aerich upgrade`\n- 注意：如果是同一功能的提交，尽量只使用一个sql脚本\n- 小技巧：如果已经使用`aerich migrate`并进行了`aerich upgrade`。可以使用`aerich downgrade`\n  回退版本，然后再进行`aerich migrate`以及`aerich upgrade`\n\n## 六、国际化\n\n### 6.1 翻译使用规范\n\n## 七、EMQ事件通知\n\n## 八、程序结构说明\n\n## 九、HTTP 返回码\n\n- 200 OK 接口请求正常\n- 204 No Content 接口请求正常，但是服务器没有返回数据\n- 400 Bad Request 客户端请求参数错误，例如，指定数字类型但是传入的是字符串\n- 401 Unauthorized 没有登录授权\n- 403 Forbidden 没有权限\n- 404 Not Found 资源或接口不存在\n- 405 Method Not Allowed 请求方式错误\n- 422 Unprocessable Entity 请求参数格式错误\n- 500 Internal Server Error 服务器错误，未处理异常","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparticleinc%2Fgptbase-enterprise-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparticleinc%2Fgptbase-enterprise-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparticleinc%2Fgptbase-enterprise-server/lists"}