This release is a pre-release and may not be stable for production use.
YYXXGAME-PKG
yyxx-game-pkg 是一个专门为元游公司后台开发的 Python 内部接口集合。
元游信息
目录
上手指南
环境配置
1.环境安装python3.11以上版本
安装步骤
1.Clone代码
git clone https://github.com/yyxxgame/yyxxgame-pkg.git
2.安装poetry
- curl -sSL https://install.python-poetry.org | python3
- export PATH="/root/.local/bin:$PATH"
3.配置虚拟环境并激活
- poetry env use python3
- poetry env list
- poetry shell
4.添加包
关于poetry的使用,参考文档:http://yydocs.yyxxgame.com/web/#/183/1758
- poetry add numpy # 基本使用
- poetry add numpy --optional # 添加额外包(针对项目单独使用的包)
如果使用
--optional,需要手动修改pyproject.toml文件
- 1.在
[tool.poetry.extras]增加相应extra分组和包- 2.命令行
poetry lock更新poetry.lock文件- 3.命令行
poetry install -E center_api安装optional中的包
# example
[tool.poetry.extras]
center_api = ["flask", "numpy"]
stat = ["pandas", "numpy"]
5.安装依赖
# 开发 yyxxgame-pkg 安装依赖
# 安装基础依赖,以及额外center_api依赖
- poetry install -E stat
- poetry install -E stat -E center_api # 安装多个额外依赖
- poetry install --extras "stat center_api"
# 项目中使用 yyxxgame-pkg 安装依赖
- poetry add yyxx-game-pkg[stat]
- pip install yyxx-game-pkg[stat]
文件目录说明
yyxxgame-pkg
├── README.md
├── gen_version.py
├── images
│ └── logo.png
├── poetry.lock
├── pyproject.toml
├── tests
│ ├── __init__.py
│ ├── dispatch
│ ├── submit
│ ├── test_ip2region.py
│ ├── test_logger.py
│ ├── test_xtrace.py
│ ├── utils
│ └── xcelery
└── yyxx_game_pkg
├── __init__.py
├── helpers
├── ip2region
├── logger
├── stat
├── utils
└── xtrace
部署
develop
提交注释中添加[BUILD]关键字并推送会触发github actions的dev版本构建并发布到yyxx-game-pkg-dev
release
新建tag并推送会触发github actions的正式版本构建并发布到yyxx-game-pkg
模块介绍
yyxxgame-pkg包含以下模块:
xtrace
xtrace 模块封装了链路追踪的帮助类,可以帮助开发人员快速地实现链路追踪功能。
stat
stat模块包含yyxxgame内部统计业务的底层框架,目前包含dispatch、submit、xcelery几个模块
代码示例
参考test 中的调用例子
版本控制
该项目使用Git进行版本管理。您可以在repository参看当前可用版本。
Metadata
Release files for yyxx-game-pkg-compat-dev 2023.8.4.1.dev10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yyxx_game_pkg_compat_dev-2023.8.4.1.dev10.tar.gz | 4.4 MB | Without provenance | Details for yyxx_game_pkg_compat_dev-2023.8.4.1.dev10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yyxx_game_pkg_compat_dev-2023.8.4.1.dev10-py3-none-any.whl | Python 3 | none | any | Details for yyxx_game_pkg_compat_dev-2023.8.4.1.dev10-py3-none-any.whl |
Total release size: 8.8 MB
Release files / yyxx_game_pkg_compat_dev-2023.8.4.1.dev10.tar.gz
| Download URL | yyxx_game_pkg_compat_dev-2023.8.4.1.dev10.tar.gz |
|---|---|
| Size | 4.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba1f38e531540be584514c3127ac885596e9cdc7de2891f01d94641578efe172
|
|
BLAKE2b-256 checksum How to use checksums |
e8e1042fa8987d8ba0d1a57ac5e14f87ed3f37a21bc6ced10b9b5f82c1213fea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure
|
Release files / yyxx_game_pkg_compat_dev-2023.8.4.1.dev10-py3-none-any.whl
| Download URL | yyxx_game_pkg_compat_dev-2023.8.4.1.dev10-py3-none-any.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74376b7502a3d2db21b6a89ce681158a137ae5e8212ccca86bdc3bf145d4ae9d
|
|
BLAKE2b-256 checksum How to use checksums |
e64d2ac52ecd22ff8991da7b03ca9dfb4b96bf133b5b69888c877df770310a82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure
|
Security for yyxx-game-pkg-compat-dev 2023.8.4.1.dev10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.