trpc-fastapi-python 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- trpc_fastapi_python-1.0.0/.flake8 +3 -0
- trpc_fastapi_python-1.0.0/.gitignore +32 -0
- trpc_fastapi_python-1.0.0/.style.yapf +6 -0
- trpc_fastapi_python-1.0.0/.yapfignore +25 -0
- trpc_fastapi_python-1.0.0/CHANGELOG.md +6 -0
- trpc_fastapi_python-1.0.0/CODE-OF-CONDUCT.md +55 -0
- trpc_fastapi_python-1.0.0/CODE-OF-CONDUCT.zh_CN.md +53 -0
- trpc_fastapi_python-1.0.0/CONTRIBUTING.md +65 -0
- trpc_fastapi_python-1.0.0/CONTRIBUTING.zh_CN.md +62 -0
- trpc_fastapi_python-1.0.0/CONTRIBUTORS.md +39 -0
- trpc_fastapi_python-1.0.0/CONTRIBUTORS.zh_CN.md +37 -0
- trpc_fastapi_python-1.0.0/LICENSE +210 -0
- trpc_fastapi_python-1.0.0/PKG-INFO +373 -0
- trpc_fastapi_python-1.0.0/README.md +328 -0
- trpc_fastapi_python-1.0.0/README.zh_CN.md +304 -0
- trpc_fastapi_python-1.0.0/build.sh +12 -0
- trpc_fastapi_python-1.0.0/clean.sh +32 -0
- trpc_fastapi_python-1.0.0/coverage.sh +15 -0
- trpc_fastapi_python-1.0.0/dist_pkg.sh +24 -0
- trpc_fastapi_python-1.0.0/docs/fastapi.md +0 -0
- trpc_fastapi_python-1.0.0/examples/README.md +102 -0
- trpc_fastapi_python-1.0.0/examples/client/test_basic_methods.sh +119 -0
- trpc_fastapi_python-1.0.0/examples/client/test_service_rpc.py +47 -0
- trpc_fastapi_python-1.0.0/examples/client/test_sse.sh +24 -0
- trpc_fastapi_python-1.0.0/examples/client/test_static_files.sh +132 -0
- trpc_fastapi_python-1.0.0/examples/client/test_websocket_client.py +28 -0
- trpc_fastapi_python-1.0.0/examples/greeter.py +45 -0
- trpc_fastapi_python-1.0.0/examples/http_sse_service.py +35 -0
- trpc_fastapi_python-1.0.0/examples/http_websocket_service.py +75 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/__init__.py +9 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/_http_service.py +301 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/_static_http_service.py +146 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/static/css/style.css +194 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/static/example.txt +3 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/static/html/page1.html +111 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/static/html/page2.html +130 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/static/js/script.js +136 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/templates/index.html +119 -0
- trpc_fastapi_python-1.0.0/examples/normal_http/templates/static_page.html +167 -0
- trpc_fastapi_python-1.0.0/examples/rpc_http/__init__.py +6 -0
- trpc_fastapi_python-1.0.0/examples/rpc_http/stub/setup.py +28 -0
- trpc_fastapi_python-1.0.0/examples/rpc_http/stub/trpc_trpc_python_group_helloworld/__init__.py +1 -0
- trpc_fastapi_python-1.0.0/examples/rpc_http/stub/trpc_trpc_python_group_helloworld/helloworld.proto +16 -0
- trpc_fastapi_python-1.0.0/examples/rpc_http/stub/trpc_trpc_python_group_helloworld/helloworld_pb2.py +29 -0
- trpc_fastapi_python-1.0.0/examples/rpc_http/stub/trpc_trpc_python_group_helloworld/pb.py +10 -0
- trpc_fastapi_python-1.0.0/examples/rpc_http/stub/trpc_trpc_python_group_helloworld/rpc.py +200 -0
- trpc_fastapi_python-1.0.0/examples/rpc_http/stub/trpc_trpc_python_group_helloworld/rpc_stream.py +9 -0
- trpc_fastapi_python-1.0.0/examples/run_examples.sh +302 -0
- trpc_fastapi_python-1.0.0/examples/trpc_main.py +103 -0
- trpc_fastapi_python-1.0.0/examples/trpc_python.yaml +79 -0
- trpc_fastapi_python-1.0.0/examples/trpc_python_merge_threads.yaml +82 -0
- trpc_fastapi_python-1.0.0/examples/trpc_python_separate.yaml +83 -0
- trpc_fastapi_python-1.0.0/examples/trpc_python_separate_thread.yaml +85 -0
- trpc_fastapi_python-1.0.0/format.sh +9 -0
- trpc_fastapi_python-1.0.0/pyproject.toml +101 -0
- trpc_fastapi_python-1.0.0/requirements.txt +4 -0
- trpc_fastapi_python-1.0.0/stop.sh +7 -0
- trpc_fastapi_python-1.0.0/tests/__init__.py +6 -0
- trpc_fastapi_python-1.0.0/tests/conftest.py +104 -0
- trpc_fastapi_python-1.0.0/tests/test_app.py +139 -0
- trpc_fastapi_python-1.0.0/tests/test_callback.py +117 -0
- trpc_fastapi_python-1.0.0/tests/test_codec.py +177 -0
- trpc_fastapi_python-1.0.0/tests/test_config.py +88 -0
- trpc_fastapi_python-1.0.0/tests/test_registry.py +267 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/__init__.py +103 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_callback.py +147 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_codec.py +287 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_config.py +202 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_constants.py +57 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_handler_adapter.py +188 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_registry.py +55 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_routes.py +157 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_server_transport.py +68 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_trpc_server_process.py +354 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/_utils.py +105 -0
- trpc_fastapi_python-1.0.0/trpc_fastapi/version.py +12 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.idea
|
|
2
|
+
.vscode
|
|
3
|
+
.DS_Store
|
|
4
|
+
*.lock
|
|
5
|
+
*.log
|
|
6
|
+
examples/*.log
|
|
7
|
+
|
|
8
|
+
trpc_fastapi.egg-info
|
|
9
|
+
|
|
10
|
+
build
|
|
11
|
+
dist
|
|
12
|
+
.venv
|
|
13
|
+
venv
|
|
14
|
+
venv*
|
|
15
|
+
__pycache__
|
|
16
|
+
|
|
17
|
+
.coverage
|
|
18
|
+
htmlcov
|
|
19
|
+
cov.tmp
|
|
20
|
+
coverage.xml
|
|
21
|
+
test-ngtest-ut-trpc_mcp.xml
|
|
22
|
+
.pytest_cache
|
|
23
|
+
|
|
24
|
+
node_modules
|
|
25
|
+
package-lock.json
|
|
26
|
+
pyrightconfig.json
|
|
27
|
+
|
|
28
|
+
# local notes and captured responses
|
|
29
|
+
baseline/
|
|
30
|
+
docs/run.md
|
|
31
|
+
docs/source_code_guide.md
|
|
32
|
+
docs/trpc_fastapi_源码理解.md
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
English | [中文](CODE-OF-CONDUCT.zh_CN.md)
|
|
2
|
+
|
|
3
|
+
# Community Code of Conduct
|
|
4
|
+
|
|
5
|
+
Welcome to our open source project!
|
|
6
|
+
|
|
7
|
+
We are committed to creating a friendly, respectful, and inclusive community.
|
|
8
|
+
|
|
9
|
+
To ensure a positive experience in our project, we have established the following code of conduct, which we require all participants to abide by, and provide a safe and inclusive environment for all community members.
|
|
10
|
+
|
|
11
|
+
## Our Pledge
|
|
12
|
+
|
|
13
|
+
As participants, contributors, and maintainers of our community, we pledge to:
|
|
14
|
+
- Treat everyone with openness, inclusivity, and collaboration;
|
|
15
|
+
- Respect individuals with different backgrounds and viewpoints, regardless of gender, sexual orientation, disability, race, ethnicity, religion, age, or any other factor;
|
|
16
|
+
- Focus on contributing and improving the project, rather than attacking or criticizing individuals;
|
|
17
|
+
- Build trust with community members and promote our project through constructive feedback;
|
|
18
|
+
- Provide a safe, supportive, and encouraging environment for community members to promote learning and personal growth.
|
|
19
|
+
|
|
20
|
+
## Our standards
|
|
21
|
+
|
|
22
|
+
Our community members should adhere to the following standards:
|
|
23
|
+
- Respect the opinions, viewpoints, and experiences of others;
|
|
24
|
+
- Avoid using insulting, discriminatory, or harmful language;
|
|
25
|
+
- Do not harass, intimidate, or threaten others;
|
|
26
|
+
- Do not publicly or privately disclose others' private information, such as contact information or addresses;
|
|
27
|
+
- Respect the privacy of others;
|
|
28
|
+
- Establish a safe, inclusive, and respectful environment for community members.
|
|
29
|
+
|
|
30
|
+
## Our responsibility
|
|
31
|
+
|
|
32
|
+
Project maintainers have a responsibility to create a friendly, respectful, and inclusive environment for our community members.
|
|
33
|
+
|
|
34
|
+
They should:
|
|
35
|
+
- Clearly and publicly explain the community guidelines;
|
|
36
|
+
- Handle reports of guideline violations and resolve disputes appropriately;
|
|
37
|
+
- Protect the privacy and security of all community members;
|
|
38
|
+
- Maintain a fair, transparent, and responsible attitude.
|
|
39
|
+
|
|
40
|
+
## Scope
|
|
41
|
+
|
|
42
|
+
This code of conduct applies to all project spaces, including GitHub, mailing lists, forums, social media, gatherings, and conferences.
|
|
43
|
+
|
|
44
|
+
Violations of the code of conduct will be dealt with, including but not limited to warnings, temporary or permanent bans, revocation of contribution rights, and revocation of project access rights.
|
|
45
|
+
|
|
46
|
+
## Implementation guidelines
|
|
47
|
+
|
|
48
|
+
If you encounter behavior that violates this code of conduct, you can:
|
|
49
|
+
- Communicate privately with the relevant person to try to resolve the issue;
|
|
50
|
+
- Report the violation to the project maintainers(maintainer mailing list), who will take necessary action based on the situation;
|
|
51
|
+
- If you are not satisfied with the way the maintainers handle the situation, you can seek help from higher-level organizations or institutions.
|
|
52
|
+
|
|
53
|
+
Our community is a diverse, open, and inclusive community, and we welcome everyone's participation and contribution.
|
|
54
|
+
|
|
55
|
+
We believe that only in a safe, respectful, and inclusive environment can we create the best project together.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[English](CODE-OF-CONDUCT.md) | 中文
|
|
2
|
+
|
|
3
|
+
# 社区行为准则
|
|
4
|
+
|
|
5
|
+
欢迎来到我们的开源项目!我们致力于创建一个友好、尊重和包容的社区,我们希望所有人都能为此做出贡献。
|
|
6
|
+
|
|
7
|
+
为了确保在我们的项目中有一个积极的体验,我们制定了以下行为准则,我们要求所有参与者遵守这些准则,并向所有社区成员提供一个安全和包容的环境。
|
|
8
|
+
|
|
9
|
+
## 我们的承诺
|
|
10
|
+
|
|
11
|
+
作为我们社区的参与者、贡献者和维护者,我们承诺:
|
|
12
|
+
- 以开放、包容和合作的态度对待所有人;
|
|
13
|
+
- 尊重不同背景和观点的人,不论是性别、性取向、残疾、种族、民族、宗教、年龄或任何其他因素;
|
|
14
|
+
- 专注于对项目的贡献和改进,而不是对个人的攻击或抨击;
|
|
15
|
+
- 与社区成员建立互信关系,通过积极的反馈来推动我们的项目发展;
|
|
16
|
+
- 为社区成员提供一个安全、支持和鼓励的环境,以促进学习和个人成长。
|
|
17
|
+
|
|
18
|
+
## 我们的标准
|
|
19
|
+
|
|
20
|
+
我们的社区成员应该遵守以下标准:
|
|
21
|
+
- 尊重他人的意见、观点和经验;
|
|
22
|
+
- 避免使用侮辱性、歧视性或有损的语言;
|
|
23
|
+
- 不要骚扰、恐吓或威胁他人;
|
|
24
|
+
- 不要公开或私下发布他人的私人信息,例如联系方式或地址;
|
|
25
|
+
- 尊重他人的隐私权;
|
|
26
|
+
- 为社区成员建立安全、包容和尊重的环境。
|
|
27
|
+
|
|
28
|
+
## 我们的责任
|
|
29
|
+
|
|
30
|
+
项目维护者有责任为我们的社区成员创造一个友好、尊重和包容的环境。
|
|
31
|
+
|
|
32
|
+
他们应该:
|
|
33
|
+
- 明确和公开地说明社区准则;
|
|
34
|
+
- 处理准则违规行为的举报,通过适当的方式解决纠纷;
|
|
35
|
+
- 保护所有社区成员的隐私和安全;
|
|
36
|
+
- 保持公正、透明和负责任的态度。
|
|
37
|
+
|
|
38
|
+
## 管理范围
|
|
39
|
+
|
|
40
|
+
本行为准则适用于所有的项目空间,包括 GitHub、邮件列表、论坛、社交媒体、聚会和会议等。
|
|
41
|
+
|
|
42
|
+
违反准则的行为将受到处理,包括但不限于警告、暂时或永久禁言、撤销贡献权、撤销项目访问权等。
|
|
43
|
+
|
|
44
|
+
## 实施指南
|
|
45
|
+
|
|
46
|
+
如果你遇到了违反本准则的行为,你可以:
|
|
47
|
+
- 私下与相关人员沟通,以尝试解决问题;
|
|
48
|
+
- 向项目维护者报告违规行为,维护者会根据情况采取必要的行动;
|
|
49
|
+
- 如果你不满意维护者的处理方式,你可以向更高级别的机构或组织寻求帮助。
|
|
50
|
+
|
|
51
|
+
我们的社区是一个多样化、开放和包容的社区,我们欢迎所有人的参与和贡献。
|
|
52
|
+
|
|
53
|
+
我们相信,只有在一个安全、尊重和包容的环境中,我们才能共同创造出最优秀的项目。
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
English | [中文](CONTRIBUTING.zh_CN.md)
|
|
2
|
+
|
|
3
|
+
# How to Contribute
|
|
4
|
+
|
|
5
|
+
Thank you for your interest and support in tRPC!
|
|
6
|
+
|
|
7
|
+
We welcome and appreciate any form of contribution, including but not limited to submitting issues, providing improvement suggestions, improving documentation, fixing bugs, and adding features.
|
|
8
|
+
|
|
9
|
+
This document aims to provide you with a detailed contribution guide to help you better participate in the project.
|
|
10
|
+
|
|
11
|
+
Please read this guide carefully before contributing and make sure to follow the rules here.
|
|
12
|
+
|
|
13
|
+
We look forward to working with you to make this project better together!
|
|
14
|
+
|
|
15
|
+
## Before submitting an issue
|
|
16
|
+
|
|
17
|
+
Please make sure that you have reviewed the project's documentation, FAQ, and existing issues.
|
|
18
|
+
|
|
19
|
+
This can avoid submitting known issues repeatedly and save your and the project maintainer's time.
|
|
20
|
+
|
|
21
|
+
When you decide to submit an issue, please follow these rules:
|
|
22
|
+
- Select appropriate labels for the issue. This helps us to quickly locate the problem and solve it as soon as possible.
|
|
23
|
+
- Ensure that the issue title is concise and accurately summarizes the problem. Avoid using vague words such as "problem" or "error".
|
|
24
|
+
|
|
25
|
+
In the issue description, please provide a detailed description of the problem you encountered.
|
|
26
|
+
|
|
27
|
+
This includes but is not limited to the following:
|
|
28
|
+
- Problem description: briefly describe the symptoms and impact of the problem.
|
|
29
|
+
- Reproduction steps: describe in detail how to reproduce the problem, so that we can locate and solve the problem more quickly.
|
|
30
|
+
- Environment information: relevant information including operating system, browser, project version, etc.
|
|
31
|
+
- Error log: if there are relevant error logs, please provide them.
|
|
32
|
+
- Expected results: describe what the correct result should be.
|
|
33
|
+
- Screenshots or screen recordings: if possible, provide screenshots or screen recordings of the problem.
|
|
34
|
+
|
|
35
|
+
Please be polite and friendly.
|
|
36
|
+
|
|
37
|
+
We attach great importance to the environment of the project and hope that everyone can grow together in a friendly and inclusive environment.
|
|
38
|
+
|
|
39
|
+
## Rules for submitting PRs
|
|
40
|
+
|
|
41
|
+
We welcome you to submit code for the project.
|
|
42
|
+
|
|
43
|
+
Before submitting a PR, please make sure that you have read this contribution guide.
|
|
44
|
+
|
|
45
|
+
Here are some suggestions and rules regarding submitting PRs.
|
|
46
|
+
|
|
47
|
+
Please read them carefully before submitting:
|
|
48
|
+
- Ensure that your code conforms to the project's code specifications. This includes but is not limited to code style, comment specifications, etc. This helps us to maintain the cleanliness and consistency of the project.
|
|
49
|
+
- Before submitting a PR, please make sure that you have tested your code locally. Ensure that the code has no obvious errors and can run normally.
|
|
50
|
+
- Please select appropriate labels for your PR. This helps us to process your PR more quickly.
|
|
51
|
+
- Ensure that your PR title is concise and accurately summarizes your changes. Avoid using vague words such as "update" or "modify".
|
|
52
|
+
- In the PR description, please provide a detailed description of your changes. This includes but is not limited to the following:
|
|
53
|
+
- Reason for modification: briefly explain why this modification is necessary.
|
|
54
|
+
- Modification content: describe in detail what you have modified and how you have implemented it.
|
|
55
|
+
- Scope of impact: describe the functions or modules that may be affected by the modification.
|
|
56
|
+
- Testing: describe the testing you have done locally and the results.
|
|
57
|
+
- If your PR resolves a certain issue, please associate the corresponding issue in the PR description. For example: Fixes #123.
|
|
58
|
+
|
|
59
|
+
## Communication and Consultation
|
|
60
|
+
|
|
61
|
+
We welcome you to participate in the project's communication and consultation.
|
|
62
|
+
|
|
63
|
+
You can interact with us through the following channels:
|
|
64
|
+
- Submit your questions or suggestions in the project's discussions.
|
|
65
|
+
- Join our technical communication group.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[English](CONTRIBUTING.md) | 中文
|
|
2
|
+
|
|
3
|
+
# 如何作出贡献
|
|
4
|
+
|
|
5
|
+
首先,感谢您对本开源项目的关注和支持!
|
|
6
|
+
|
|
7
|
+
我们非常欢迎和感谢任何形式的贡献,包括但不限于提交问题、提出改进意见、完善文档、修复缺陷以及新增功能。
|
|
8
|
+
|
|
9
|
+
本文档旨在为您提供一份详尽的贡献指南,以便您更好地参与到项目中。
|
|
10
|
+
|
|
11
|
+
请在参与贡献之前仔细阅读本指南,并确保遵循其中的规则和建议。
|
|
12
|
+
|
|
13
|
+
我们期待与您一起打造一个更加完善的开源项目!
|
|
14
|
+
|
|
15
|
+
## 提交 issue 的规则
|
|
16
|
+
|
|
17
|
+
在提交 issue 之前,请先确保您已经查看了项目的文档、常见问题解答以及已有的 issue。
|
|
18
|
+
|
|
19
|
+
这样可以避免重复提交已知问题,节省您和项目维护者的时间。
|
|
20
|
+
|
|
21
|
+
当您确定需要提交一个 issue 时,请遵循以下规则:
|
|
22
|
+
- 为 issue 选择合适的标签。这有助于我们更快地找到问题所在,以便尽快解决。
|
|
23
|
+
- 请确保您的 issue 标题简洁明了,能够准确概括问题所在。避免使用模糊的词语,如“问题”、“错误”等。
|
|
24
|
+
|
|
25
|
+
在 issue 描述中,请详细说明您遇到的问题。
|
|
26
|
+
|
|
27
|
+
包括但不限于以下内容:
|
|
28
|
+
- 问题描述:简要说明问题的现象和影响。
|
|
29
|
+
- 复现步骤:详细描述如何复现问题,让我们能够更快地定位和解决问题。
|
|
30
|
+
- 环境信息:包括操作系统、浏览器、项目版本等相关信息。
|
|
31
|
+
- 错误日志:如果有相关错误日志,请一并提供。
|
|
32
|
+
- 期望结果:描述您期望的正确结果是什么。
|
|
33
|
+
- 截图或录屏:如果可能,请提供问题现象的截图或录屏。
|
|
34
|
+
|
|
35
|
+
请保持礼貌和友好。我们非常重视项目的氛围,希望每个人都能够在友好、包容的环境中共同成长。
|
|
36
|
+
|
|
37
|
+
## 提交 PR 的规则
|
|
38
|
+
|
|
39
|
+
我们非常欢迎您为项目提交代码。
|
|
40
|
+
|
|
41
|
+
在提交 PR 之前,请确保您已经阅读了项目的文档以及本贡献指南。
|
|
42
|
+
|
|
43
|
+
以下是关于提交 PR 的一些建议和规则,请在提交前仔细阅读:
|
|
44
|
+
|
|
45
|
+
- 请确保您的代码符合项目的代码规范。这包括但不限于代码风格、注释规范等。这有助于我们保持项目的整洁和一致性。
|
|
46
|
+
- 在提交 PR 之前,请确保您已经在本地测试过您的代码。确保代码没有明显的错误,并能够正常运行。
|
|
47
|
+
- 请为您的 PR 选择合适的标签。这有助于我们更快地处理您的 PR。
|
|
48
|
+
- 请确保您的 PR 标题简洁明了,能够准确概括您的修改。避免使用模糊的词语,如“更新”、“修改”等。
|
|
49
|
+
- 在 PR 描述中,请详细说明您的修改内容。包括但不限于以下内容:
|
|
50
|
+
- 修改原因:简要说明为什么要进行这次修改。
|
|
51
|
+
- 修改内容:详细描述您修改了哪些内容,以及修改的具体实现。
|
|
52
|
+
- 影响范围:说明修改可能影响到的功能或模块。
|
|
53
|
+
- 测试情况:描述您在本地测试的情况,以及测试结果。
|
|
54
|
+
- 如果您的 PR 解决了某个 issue,请在 PR 描述中关联对应的 issue。例如:Fixes #123。
|
|
55
|
+
|
|
56
|
+
## 技术交流与问题咨询
|
|
57
|
+
|
|
58
|
+
我们非常欢迎您参与到项目的技术交流和问题咨询中来。
|
|
59
|
+
|
|
60
|
+
您可以通过以下途径与我们互动:
|
|
61
|
+
- 在项目的 discussions 中提交您的问题或建议
|
|
62
|
+
- 加入我们的技术交流群
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
English | [中文](CONTRIBUTORS.zh_CN.md)
|
|
2
|
+
|
|
3
|
+
# Contributor Guidelines
|
|
4
|
+
|
|
5
|
+
Thank you for your interest and support for tRPC!
|
|
6
|
+
|
|
7
|
+
This document outlines the roles and responsibilities of contributors in the project, as well as the process for becoming a Contributor and losing Maintainer status. We hope that this document will help every contributor understand the growth path and make a greater contribution to the project's development.
|
|
8
|
+
|
|
9
|
+
## Contributor Roles and Responsibilities
|
|
10
|
+
|
|
11
|
+
we have two main contributor roles: Contributor and Maintainer.
|
|
12
|
+
|
|
13
|
+
Here is a brief introduction to these two roles:
|
|
14
|
+
1. Contributor: A contributor to the project who can contribute code, documentation, testing, and other resources. Contributors provide valuable resources to the project, helping it to continuously improve and develop.
|
|
15
|
+
2. Maintainer: A maintainer of the project who is responsible for the day-to-day maintenance of the project, including reviewing and merging PRs, handling issues, and releasing versions. Maintainers are key members of the project and have a significant impact on the project's development direction and decision-making.
|
|
16
|
+
|
|
17
|
+
## How to become a Maintainer
|
|
18
|
+
|
|
19
|
+
We welcome every contributor to contribute to the project's development and encourage contributors to upgrade to the role of Maintainer.
|
|
20
|
+
|
|
21
|
+
The following are the conditions for upgrading from Contributor to Maintainer:
|
|
22
|
+
1. Continuous contribution: Contributors need to contribute to the project continuously for a period of time (e.g., 3 months). This demonstrates the contributor's attention and enthusiasm for the project.
|
|
23
|
+
2. Quality assurance: The code or documentation submitted by contributors needs to maintain a high level of quality, meet the project's specifications, and have a positive impact on the project.
|
|
24
|
+
3. Active participation: Contributors need to actively participate in project discussions and decision-making, providing constructive opinions and suggestions for the project's development.
|
|
25
|
+
4. Team collaboration: Contributors need to have good teamwork skills, communicate friendly with other contributors and maintainers, and work together to solve problems.
|
|
26
|
+
5. Responsibility: Contributors need to have a certain sense of responsibility and be willing to undertake some of the project maintenance work, including reviewing PRs and handling issues. When a contributor meets the above conditions, existing maintainers will evaluate them.
|
|
27
|
+
|
|
28
|
+
If they meet the requirements of Maintainer, they will be invited to become a new Maintainer.
|
|
29
|
+
|
|
30
|
+
## Losing Maintainers status
|
|
31
|
+
|
|
32
|
+
Maintainer have important responsibilities in the project, and we hope that every Maintainer can maintain their attention and enthusiasm for the project.
|
|
33
|
+
|
|
34
|
+
However, we also understand that everyone's time and energy are limited, so when Maintainers cannot continue to fulfill their responsibilities, they will be downgraded to the role of Contributor:
|
|
35
|
+
1. Long-term inactivity: If a Maintainer has not participated in project maintenance work, including reviewing PRs and handling issues, for a period of time (e.g., 3 months), they will be considered inactive.
|
|
36
|
+
2. Quality issues: If a Maintainer's work in the project has serious quality issues that affect the project's development, they will be considered not meeting the requirements of Maintainer.
|
|
37
|
+
3. Team collaboration issues: If a Maintainer has serious communication or teamwork issues with other contributors and maintainers, such as disrespecting others' opinions, frequent conflicts, or refusing to collaborate, which affects the project's normal operation and atmosphere, they will be considered not meeting the requirements of Maintainer.
|
|
38
|
+
4. Violation of rules: If a Maintainer violates the project's rules or code of conduct, including but not limited to leaking sensitive information or abusing privileges, they will be considered not meeting the requirements of Maintainer.
|
|
39
|
+
5. Voluntary application: If a Maintainer cannot continue to fulfill their responsibilities due to personal reasons, they can voluntarily apply to be downgraded to the role of Contributor.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[English](CONTRIBUTORS.md) | 中文
|
|
2
|
+
|
|
3
|
+
# 贡献者管理说明文档
|
|
4
|
+
|
|
5
|
+
感谢您对本开源项目的关注和支持!本文档将阐述贡献者在项目中的角色、职责以及如何从 Contributor 升级为 Maintainer,以及 Maintainer 降级为 Contributor 的规则。我们希望通过这份文档,让每位贡献者都能清楚地了解自己的成长路径,并为项目的发展做出更大的贡献。
|
|
6
|
+
|
|
7
|
+
## 贡献者角色及职责
|
|
8
|
+
|
|
9
|
+
在本开源项目中,我们主要设有两个贡献者角色:Contributor 和 Maintainer。
|
|
10
|
+
|
|
11
|
+
以下是对这两个角色的简要介绍:
|
|
12
|
+
1. Contributor:项目的贡献者,可以是代码贡献者、文档贡献者、测试贡献者等。Contributor 为项目提供了宝贵的资源,帮助项目不断完善和发展。
|
|
13
|
+
2. Maintainer:项目的维护者,负责项目的日常维护工作,包括审查和合并 PR、处理 Issue、发布版本等。Maintainer 是项目的核心成员,对项目的发展方向和决策具有重要的影响力。
|
|
14
|
+
|
|
15
|
+
## Contributor 升级为 Maintainer
|
|
16
|
+
|
|
17
|
+
我们非常欢迎每位 Contributor 为项目的发展做出贡献,并鼓励 Contributor 向 Maintainer 的角色发展。
|
|
18
|
+
|
|
19
|
+
以下是从 Contributor 升级为 Maintainer 的条件:
|
|
20
|
+
1. 持续贡献:Contributor 需要在一段时间内(例如 3 个月)持续为项目贡献代码、文档或其他资源。这表明 Contributor 对项目的关注度和热情。
|
|
21
|
+
2. 质量保证:Contributor 提交的代码或文档等资源需要保持较高的质量,符合项目的规范要求,并对项目产生积极的影响。
|
|
22
|
+
3. 积极参与:Contributor 需要积极参与到项目的讨论和决策中来,为项目的发展提供建设性的意见和建议。
|
|
23
|
+
4. 团队协作:Contributor 需要具备良好的团队协作精神,能够与其他贡献者和 Maintainer 友好沟通,共同解决问题。
|
|
24
|
+
5. 责任担当:Contributor 需要具备一定的责任心,愿意承担项目维护的部分工作,包括审查 PR、处理 Issue 等。
|
|
25
|
+
|
|
26
|
+
当 Contributor 满足以上条件时,现有的 Maintainer 将会对其进行评估,如果达到 Maintainer 的要求,将会邀请其成为新的 Maintainer。
|
|
27
|
+
|
|
28
|
+
## Maintainer 降级为 Contributor
|
|
29
|
+
|
|
30
|
+
Maintainer 在项目中承担了重要的职责,我们希望每位 Maintainer 都能够保持对项目的关注和热情。
|
|
31
|
+
|
|
32
|
+
然而,我们也理解每个人的时间和精力是有限的,因此,当 Maintainer 无法继续履行职责时,将会降级为 Contributor:
|
|
33
|
+
1. 长时间不活跃:如果 Maintainer 在一段时间内(例如 3 个月)没有参与项目的维护工作,包括审查 PR、处理 Issue 等,将被视为不活跃。
|
|
34
|
+
2. 质量问题:如果 Maintainer 在项目中的工作出现严重的质量问题,导致项目的发展受到影响,将被视为不符合 Maintainer 的要求。
|
|
35
|
+
3. 团队协作问题:如果 Maintainer 在与其他贡献者和 Maintainer 的协作过程中出现严重的沟通问题或团队协作问题,如不尊重他人意见、频繁产生冲突、拒绝协作等,影响到项目的正常运作和氛围,将被视为不符合 Maintainer 的要求。
|
|
36
|
+
4. 违反规定:如果 Maintainer 违反了项目的规定或行为准则,包括但不限于泄露敏感信息、滥用权限等,将被视为不符合 Maintainer 的要求。
|
|
37
|
+
5. 主动申请:如果 Maintainer 由于个人原因无法继续履行职责,可以主动申请降级为 Contributor。
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Tencent is pleased to support the open source community by making tRPC-FastAPI-Python available.
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2026 Tencent. All rights reserved.
|
|
4
|
+
|
|
5
|
+
tRPC-FastAPI-Python is licensed under the Apache-2.0.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Terms of the Apache-2.0:
|
|
9
|
+
--------------------------------------------------------------------
|
|
10
|
+
Apache License
|
|
11
|
+
Version 2.0, January 2004
|
|
12
|
+
http://www.apache.org/licenses/
|
|
13
|
+
|
|
14
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
15
|
+
|
|
16
|
+
1. Definitions.
|
|
17
|
+
|
|
18
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
19
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
20
|
+
|
|
21
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
22
|
+
the copyright owner that is granting the License.
|
|
23
|
+
|
|
24
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
25
|
+
other entities that control, are controlled by, or are under common
|
|
26
|
+
control with that entity. For the purposes of this definition,
|
|
27
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
28
|
+
direction or management of such entity, whether by contract or
|
|
29
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
30
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
31
|
+
|
|
32
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
33
|
+
exercising permissions granted by this License.
|
|
34
|
+
|
|
35
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
36
|
+
including but not limited to software source code, documentation
|
|
37
|
+
source, and configuration files.
|
|
38
|
+
|
|
39
|
+
"Object" form shall mean any form resulting from mechanical
|
|
40
|
+
transformation or translation of a Source form, including but
|
|
41
|
+
not limited to compiled object code, generated documentation,
|
|
42
|
+
and conversions to other media types.
|
|
43
|
+
|
|
44
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
45
|
+
Object form, made available under the License, as indicated by a
|
|
46
|
+
copyright notice that is included in or attached to the work
|
|
47
|
+
(an example is provided in the Appendix below).
|
|
48
|
+
|
|
49
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
50
|
+
form, that is based on (or derived from) the Work and for which the
|
|
51
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
52
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
53
|
+
of this License, Derivative Works shall not include works that remain
|
|
54
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
55
|
+
the Work and Derivative Works thereof.
|
|
56
|
+
|
|
57
|
+
"Contribution" shall mean any work of authorship, including
|
|
58
|
+
the original version of the Work and any modifications or additions
|
|
59
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
60
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
61
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
62
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
63
|
+
means any form of electronic, verbal, or written communication sent
|
|
64
|
+
to the Licensor or its representatives, including but not limited to
|
|
65
|
+
communication on electronic mailing lists, source code control systems,
|
|
66
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
67
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
68
|
+
excluding communication that is conspicuously marked or otherwise
|
|
69
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
70
|
+
|
|
71
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
72
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
73
|
+
subsequently incorporated within the Work.
|
|
74
|
+
|
|
75
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
79
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
80
|
+
Work and such Derivative Works in Source or Object form.
|
|
81
|
+
|
|
82
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
83
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
84
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
85
|
+
(except as stated in this section) patent license to make, have made,
|
|
86
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
87
|
+
where such license applies only to those patent claims licensable
|
|
88
|
+
by such Contributor that are necessarily infringed by their
|
|
89
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
90
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
91
|
+
institute patent litigation against any entity (including a
|
|
92
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
93
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
94
|
+
or contributory patent infringement, then any patent licenses
|
|
95
|
+
granted to You under this License for that Work shall terminate
|
|
96
|
+
as of the date such litigation is filed.
|
|
97
|
+
|
|
98
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
99
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
100
|
+
modifications, and in Source or Object form, provided that You
|
|
101
|
+
meet the following conditions:
|
|
102
|
+
|
|
103
|
+
(a) You must give any other recipients of the Work or
|
|
104
|
+
Derivative Works a copy of this License; and
|
|
105
|
+
|
|
106
|
+
(b) You must cause any modified files to carry prominent notices
|
|
107
|
+
stating that You changed the files; and
|
|
108
|
+
|
|
109
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
110
|
+
that You distribute, all copyright, patent, trademark, and
|
|
111
|
+
attribution notices from the Source form of the Work,
|
|
112
|
+
excluding those notices that do not pertain to any part of
|
|
113
|
+
the Derivative Works; and
|
|
114
|
+
|
|
115
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
116
|
+
distribution, then any Derivative Works that You distribute must
|
|
117
|
+
include a readable copy of the attribution notices contained
|
|
118
|
+
within such NOTICE file, excluding those notices that do not
|
|
119
|
+
pertain to any part of the Derivative Works, in at least one
|
|
120
|
+
of the following places: within a NOTICE text file distributed
|
|
121
|
+
as part of the Derivative Works; within the Source form or
|
|
122
|
+
documentation, if provided along with the Derivative Works; or,
|
|
123
|
+
within a display generated by the Derivative Works, if and
|
|
124
|
+
wherever such third-party notices normally appear. The contents
|
|
125
|
+
of the NOTICE file are for informational purposes only and
|
|
126
|
+
do not modify the License. You may add Your own attribution
|
|
127
|
+
notices within Derivative Works that You distribute, alongside
|
|
128
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
129
|
+
that such additional attribution notices cannot be construed
|
|
130
|
+
as modifying the License.
|
|
131
|
+
|
|
132
|
+
You may add Your own copyright statement to Your modifications and
|
|
133
|
+
may provide additional or different license terms and conditions
|
|
134
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
135
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
136
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
137
|
+
the conditions stated in this License.
|
|
138
|
+
|
|
139
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
140
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
141
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
142
|
+
this License, without any additional terms or conditions.
|
|
143
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
144
|
+
the terms of any separate license agreement you may have executed
|
|
145
|
+
with Licensor regarding such Contributions.
|
|
146
|
+
|
|
147
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
148
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
149
|
+
except as required for reasonable and customary use in describing the
|
|
150
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
151
|
+
|
|
152
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
153
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
154
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
155
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
156
|
+
implied, including, without limitation, any warranties or conditions
|
|
157
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
158
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
159
|
+
appropriateness of using or redistributing the Work and assume any
|
|
160
|
+
risks associated with Your exercise of permissions under this License.
|
|
161
|
+
|
|
162
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
163
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
164
|
+
unless required by applicable law (such as deliberate and grossly
|
|
165
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
166
|
+
liable to You for damages, including any direct, indirect, special,
|
|
167
|
+
incidental, or consequential damages of any character arising as a
|
|
168
|
+
result of this License or out of the use or inability to use the
|
|
169
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
170
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
171
|
+
other commercial damages or losses), even if such Contributor
|
|
172
|
+
has been advised of the possibility of such damages.
|
|
173
|
+
|
|
174
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
175
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
176
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
177
|
+
or other liability obligations and/or rights consistent with this
|
|
178
|
+
License. However, in accepting such obligations, You may act only
|
|
179
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
180
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
181
|
+
defend, and hold each Contributor harmless for any liability
|
|
182
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
183
|
+
of your accepting any such warranty or additional liability.
|
|
184
|
+
|
|
185
|
+
END OF TERMS AND CONDITIONS
|
|
186
|
+
|
|
187
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
188
|
+
|
|
189
|
+
To apply the Apache License to your work, attach the following
|
|
190
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
191
|
+
replaced with your own identifying information. (Don't include
|
|
192
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
193
|
+
comment syntax for the file format. We also recommend that a
|
|
194
|
+
file or class name and description of purpose be included on the
|
|
195
|
+
same "printed page" as the copyright notice for easier
|
|
196
|
+
identification within third-party archives.
|
|
197
|
+
|
|
198
|
+
Copyright [yyyy] [name of copyright owner]
|
|
199
|
+
|
|
200
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
201
|
+
you may not use this file except in compliance with the License.
|
|
202
|
+
You may obtain a copy of the License at
|
|
203
|
+
|
|
204
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
205
|
+
|
|
206
|
+
Unless required by applicable law or agreed to in writing, software
|
|
207
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
208
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
|
+
See the License for the specific language governing permissions and
|
|
210
|
+
limitations under the License.
|