Feat: add python sdk for Agones game server#4496
Open
hiromesh wants to merge 3 commits intoagones-dev:mainfrom
Open
Feat: add python sdk for Agones game server#4496hiromesh wants to merge 3 commits intoagones-dev:mainfrom
hiromesh wants to merge 3 commits intoagones-dev:mainfrom
Conversation
- Introduced core SDK functionality for managing GameServer lifecycle, including methods for connecting, marking readiness, and handling player connections. - Implemented Alpha and Beta features for player tracking and counters/lists management. - Added gRPC code generation script and necessary configuration files. - Included README documentation for installation and usage instructions. - Created .gitignore to exclude unnecessary files from version control. Signed-off-by: hiromesh <417969567@qq.com>
- Added Python Client SDK documentation with installation and usage instructions. - Updated README to include a link to the new Python Client SDK. - Enhanced the main SDK documentation index to reference the Python SDK. Signed-off-by: hiromesh <417969567@qq.com>
- Introduced Dockerfile for building Python SDK images, including installation of Python and necessary packages. - Added code generation script (gen.sh) for setting up a Python virtual environment and installing grpcio-tools. - Included test script (test.sh) for running pytest with required dependencies. - Updated Makefile to support Python SDK commands for generation and conformance testing. Signed-off-by: hiromesh <417969567@qq.com>
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
What this PR does / Why we need it:
Adds a Python SDK for the Agones game server platform, providing a gRPC client for communicating with the Agones sidecar.
The SDK follows the same architecture and API patterns as the existing Go, Rust, and Node.js SDKs:
Commits:
feat: add initial Python SDK for Agones game serveragones/sdk.py,agones/alpha.py,agones/beta.py— SDK implementationagones/_generated/— generated gRPC/protobuf codegenerate.sh— proto code generation script (strips HTTP/swagger annotations)pyproject.toml— package configurationtests/test_sdk.py,tests/test_alpha.py,tests/test_beta.py— 37 unit testsdocs: add Python Client SDK documentation and update READMEsite/content/en/docs/Guides/Client SDKs/python.md— full SDK documentation pagesite/content/en/docs/Guides/Client SDKs/_index.md— added Python to SDK indexsdks/README.md— added Python entrysdks/python/README.md— simplified to point to site docsfeat: add Python SDK Dockerfile and scriptsbuild/build-sdk-images/python/Dockerfile— Docker build imagebuild/build-sdk-images/python/gen.sh— code generation entrypointbuild/build-sdk-images/python/test.sh— test runner entrypointbuild/includes/sdk.mk— added Python targets and conformance testbuild/scripts/sdk-update-version/main.go— addedpyproject.tomlto version update listTesting:
All tests use
unittest.mock.MagicMockto mock gRPC stubs (same approach as Go'ssdkMockand Node.js'sspyOn).Which issue(s) this PR fixes:
None — new feature.
Special notes for your reviewer:
agones/_generated/) is checked in, same approach as the Node.js SDKgenerate.shstrips HTTP/swagger annotations from proto files before compilation to avoid unnecessary runtime dependencies