[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACDRVH48A1WBYH9DEETW7F":3,"skill-same:01M6ACDRVH48A1WBYH9DEETW7F":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6ACDRVH48A1WBYH9DEETW7F","python-development",null,"Guides Python SDK development in Apache Beam, including environment setup, testing, building, and running pipelines. Use when working with Python code in sdks\u002Fpython\u002F.","apache\u002Fbeam","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACCXED4SMY85J25QX8K9SY",8718,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam\u002Fblob\u002Fmaster\u002F.agent\u002Fskills\u002Fpython-development\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,9,39,40,41,42],"python","python development","development","environment","running","when","sdks","python code","environment setup","with","guides","pipelines","use","testing","python sdk","code","setup","sdk","beam","2026-11-10 10:12:30",false,"---\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\nname: python-development\ndescription: Guides Python SDK development in Apache Beam, including environment setup, testing, building, and running pipelines. Use when working with Python code in sdks\u002Fpython\u002F.\n---\n\n# Python Development in Apache Beam\n\n## Project Structure\n\n### Key Directories\n- `sdks\u002Fpython\u002F` - Python SDK root\n  - `apache_beam\u002F` - Main Beam package\n    - `transforms\u002F` - Core transforms (ParDo, GroupByKey, etc.)\n    - `io\u002F` - I\u002FO connectors\n    - `ml\u002F` - Beam ML code (RunInference, etc.)\n    - `runners\u002F` - Runner implementations and wrappers\n    - `runners\u002Fworker\u002F` - SDK worker harness\n  - `container\u002F` - Docker container configuration\n  - `test-suites\u002F` - Test configurations\n  - `scripts\u002F` - Utility scripts\n\n### Configuration Files\n- `setup.py` - Package configuration\n- `pyproject.toml` - Build configuration\n- `tox.ini` - Test automation\n- `pytest.ini` - Pytest configuration\n- `ruff.toml` - Linting rules\n- `.isort.cfg` - Import sorting\n- `pyrefly.toml` - Type checking\n\n## Environment Setup\n\n### Using pyenv (Recommended)\n```bash\n# Install Python\npyenv install 3.X  # Use supported version from gradle.properties\n\n# Create virtual environment\npyenv virtualenv 3.X beam-dev\npyenv activate beam-dev\n```\n\n### Install in Editable Mode\n```bash\ncd sdks\u002Fpython\npip install -e .[gcp,test]\n```\n\n### Enable Pre-commit Hooks\n```bash\npip install pre-commit\npre-commit install\n\n# To disable\npre-commit uninstall\n```\n\n## Running Tests\n\n### Unit Tests (filename: `*_test.py`)\n```bash\n# Run all tests in a file\npytest -v apache_beam\u002Fio\u002Ftextio_test.py\n\n# Run tests in a class\npytest -v apache_beam\u002Fio\u002Ftextio_test.py::TextSourceTest\n\n# Run a specific test\npytest -v apache_beam\u002Fio\u002Ftextio_test.py::TextSourceTest::test_progress\n```\n\n### Integration Tests (filename: `*_it_test.py`)\n\n#### On Direct Runner\n```bash\npython -m pytest -o log_cli=True -o log_level=Info \\\n  apache_beam\u002Fml\u002Finference\u002Fpytorch_inference_it_test.py::PyTorchInference \\\n  --test-pipeline-options='--runner=TestDirectRunner'\n```\n\n#### On Dataflow Runner\n```bash\n# First build SDK tarball\npip install build && python -m build --sdist\n\n# Run integration test\npython -m pytest -o log_cli=True -o log_level=Info \\\n  apache_beam\u002Fml\u002Finference\u002Fpytorch_inference_it_test.py::PyTorchInference \\\n  --test-pipeline-options='--runner=TestDataflowRunner --project=\u003Cproject>\n                           --temp_location=gs:\u002F\u002F\u003Cbucket>\u002Ftmp\n                           --sdk_location=dist\u002Fapache-beam-2.XX.0.dev0.tar.gz\n                           --region=us-central1'\n```\n\n## Building Python SDK\n\n### Build Source Distribution\n```bash\ncd sdks\u002Fpython\npip install build && python -m build --sdist\n# Output: sdks\u002Fpython\u002Fdist\u002Fapache-beam-X.XX.0.dev0.tar.gz\n```\n\n### Build Wheel (faster installation)\n```bash\n.\u002Fgradlew :sdks:python:bdistPy311linux  # For Python 3.11 on Linux\n```\n\n### Build and Push SDK Container Image\n```bash\n.\u002Fgradlew :sdks:python:container:py311:docker \\\n  -Pdocker-repository-root=gcr.io\u002Fyour-project\u002Fyour-name \\\n  -Pdocker-tag=custom \\\n  -Ppush-containers\n\n# Container image will be pushed to: gcr.io\u002Fyour-project\u002Fyour-name\u002Fbeam_python3.11_sdk:custom\n```\n\nTo use this container image, supply it via `--sdk_container_image`.\n\n## Running Pipelines with Modified Code\n\n```bash\n# Install modified SDK\npip install \u002Fpath\u002Fto\u002Fapache-beam.tar.gz[gcp]\n\n# Run pipeline\npython my_pipeline.py \\\n  --runner=DataflowRunner \\\n  --sdk_location=\u002Fpath\u002Fto\u002Fapache-beam.tar.gz \\\n  --project=my_project \\\n  --region=us-central1 \\\n  --temp_location=gs:\u002F\u002Fmy-bucket\u002Ftemp\n```\n\n## Common Issues\n\n### `NameError` when running DoFn\nGlobal imports, functions, and variables in the main pipeline module are not serialized by default. Use:\n```bash\n--save_main_session\n```\n\n### Specifying Additional Dependencies\nUse `--requirements_file=requirements.txt` or custom containers.\n\n## Test Markers\n- `@pytest.mark.it_postcommit` - Include in PostCommit test suite\n\n## Gradle Commands for Python\n```bash\n# Run WordCount\n.\u002Fgradlew :sdks:python:wordCount\n\n# Check environment\n.\u002Fgradlew :checkSetup\n```\n\n## Code Quality Tools\n```bash\n# Linting\nruff check apache_beam\u002F\n\n# Type checking\npyrefly check apache_beam\u002F\n\n# Formatting (via yapf)\nyapf -i apache_beam\u002Ffile.py\n\n# Import sorting\nisort apache_beam\u002Ffile.py\n```\n","# Python Development in Apache Beam\n\n## Project Structure\n\n### Key Directories\n- `sdks\u002Fpython\u002F` - Python SDK root\n  - `apache_beam\u002F` - Main Beam package\n    - `transforms\u002F` - Core transforms (ParDo, GroupByKey, etc.)\n    - `io\u002F` - I\u002FO connectors\n    - `ml\u002F` - Beam ML code (RunInference, etc.)\n    - `runners\u002F` - Runner implementations and wrappers\n    - `runners\u002Fworker\u002F` - SDK worker harness\n  - `container\u002F` - Docker container configuration\n  - `test-suites\u002F` - Test configurations\n  - `scripts\u002F` - Utility scripts\n\n### Configuration Files\n- `setup.py` - Package configuration\n- `pyproject.toml` - Build configuration\n- `tox.ini` - Test automation\n- `pytest.ini` - Pytest configuration\n- `ruff.toml` - Linting rules\n- `.isort.cfg` - Import sorting\n- `pyrefly.toml` - Type checking\n\n## Environment Setup\n\n### Using pyenv (Recommended)\n```bash\n# Install Python\npyenv install 3.X  # Use supported version from gradle.properties\n\n# Create virtual environment\npyenv virtualenv 3.X beam-dev\npyenv activate beam-dev\n```\n\n### Install in Editable Mode\n```bash\ncd sdks\u002Fpython\npip install -e .[gcp,test]\n```\n\n### Enable Pre-commit Hooks\n```bash\npip install pre-commit\npre-commit install\n\n# To disable\npre-commit uninstall\n```\n\n## Running Tests\n\n### Unit Tests (filename: `*_test.py`)\n```bash\n# Run all tests in a file\npytest -v apache_beam\u002Fio\u002Ftextio_test.py\n\n# Run tests in a class\npytest -v apache_beam\u002Fio\u002Ftextio_test.py::TextSourceTest\n\n# Run a specific test\npytest -v apache_beam\u002Fio\u002Ftextio_test.py::TextSourceTest::test_progress\n```\n\n### Integration Tests (filename: `*_it_test.py`)\n\n#### On Direct Runner\n```bash\npython -m pytest -o log_cli=True -o log_level=Info \\\n  apache_beam\u002Fml\u002Finference\u002Fpytorch_inference_it_test.py::PyTorchInference \\\n  --test-pipeline-options='--runner=TestDirectRunner'\n```\n\n#### On Dataflow Runner\n```bash\n# First build SDK tarball\npip install build && python -m build --sdist\n\n# Run integration test\npython -m pytest -o log_cli=True -o log_level=Info \\\n  apache_beam\u002Fml\u002Finference\u002Fpytorch_inference_it_test.py::PyTorchInference \\\n  --test-pipeline-options='--runner=TestDataflowRunner --project=\u003Cproject>\n                           --temp_location=gs:\u002F\u002F\u003Cbucket>\u002Ftmp\n                           --sdk_location=dist\u002Fapache-beam-2.XX.0.dev0.tar.gz\n                           --region=us-central1'\n```\n\n## Building Python SDK\n\n### Build Source Distribution\n```bash\ncd sdks\u002Fpython\npip install build && python -m build --sdist\n# Output: sdks\u002Fpython\u002Fdist\u002Fapache-beam-X.XX.0.dev0.tar.gz\n```\n\n### Build Wheel (faster installation)\n```bash\n.\u002Fgradlew :sdks:python:bdistPy311linux  # For Python 3.11 on Linux\n```\n\n### Build and Push SDK Container Image\n```bash\n.\u002Fgradlew :sdks:python:container:py311:docker \\\n  -Pdocker-repository-root=gcr.io\u002Fyour-project\u002Fyour-name \\\n  -Pdocker-tag=custom \\\n  -Ppush-containers\n\n# Container image will be pushed to: gcr.io\u002Fyour-project\u002Fyour-name\u002Fbeam_python3.11_sdk:custom\n```\n\nTo use this container image, supply it via `--sdk_container_image`.\n\n## Running Pipelines with Modified Code\n\n```bash\n# Install modified SDK\npip install \u002Fpath\u002Fto\u002Fapache-beam.tar.gz[gcp]\n\n# Run pipeline\npython my_pipeline.py \\\n  --runner=DataflowRunner \\\n  --sdk_location=\u002Fpath\u002Fto\u002Fapache-beam.tar.gz \\\n  --project=my_project \\\n  --region=us-central1 \\\n  --temp_location=gs:\u002F\u002Fmy-bucket\u002Ftemp\n```\n\n## Common Issues\n\n### `NameError` when running DoFn\nGlobal imports, functions, and variables in the main pipeline module are not serialized by default. Use:\n```bash\n--save_main_session\n```\n\n### Specifying Additional Dependencies\nUse `--requirements_file=requirements.txt` or custom containers.\n\n## Test Markers\n- `@pytest.mark.it_postcommit` - Include in PostCommit test suite\n\n## Gradle Commands for Python\n```bash\n# Run WordCount\n.\u002Fgradlew :sdks:python:wordCount\n\n# Check environment\n.\u002Fgradlew :checkSetup\n```\n\n## Code Quality Tools\n```bash\n# Linting\nruff check apache_beam\u002F\n\n# Type checking\npyrefly check apache_beam\u002F\n\n# Formatting (via yapf)\nyapf -i apache_beam\u002Ffile.py\n\n# Import sorting\nisort apache_beam\u002Ffile.py\n```\n",{"name":5,"description":7},"master","aba9e790548a6870a46d2c085c817c2754f4a301",".agent\u002Fskills\u002Fpython-development",4812,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam","https:\u002F\u002Fbeam.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-15 01:40:19",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add apache\u002Fbeam --skill python-development",{"tool":63,"command":64},"bunx","bunx skills add apache\u002Fbeam --skill python-development",{"tool":66,"command":67},"pnpm","pnpm dlx skills add apache\u002Fbeam --skill python-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam\u002Fblob\u002Fmaster\u002F.agent\u002Fskills\u002Fpython-development\u002FSKILL.md",true,[71,77],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"scripts\u002Fsimplicite-log2json.py","SCRIPT","脚本",4491,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Foptimize-simplicite-logs\u002Fscripts\u002Fsimplicite-log2json.py",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"scripts\u002FSimpliciteLog2Json.ps1",4284,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Foptimize-simplicite-logs\u002Fscripts\u002FSimpliciteLog2Json.ps1",[82,92,108,128,142,156],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":43},"01M6ACDYBTKYKDP9Z0BQKF7XMZ","yaml-development","Guides YAML SDK development in Apache Beam, including environment setup, testing, and key concepts. Use when working with Beam YAML code in sdks\u002Fpython\u002Fapache_beam\u002Fyaml\u002F.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam\u002Fblob\u002Fmaster\u002F.agent\u002Fskills\u002Fyaml-development\u002FSKILL.md",[],[26,89,90,40,29,30,91,32,33,34,36,27,9,39,41,24,42,37],"yaml development","yaml","concepts",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":43},"01M6ACDVK2M4QNJ2T0423H23SY","runners","Guides understanding and working with Apache Beam runners (Direct, Dataflow, Flink, Spark, etc.). Use when configuring pipelines for different execution environments or debugging runner-specific issues.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam\u002Fblob\u002Fmaster\u002F.agent\u002Fskills\u002Frunners\u002FSKILL.md",[],[94,9,42,99,100,101,36,102,103,104,105,35,29,106,33,34,107],"flink","execution","direct","issues","debugging","spark","environments","for","runner",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":119,"publishedAt":43},"01M6ACDPYBMSHSQNCFXVJ7VJW3","license-compliance","Ensures all new files include proper Apache 2.0 license headers. Use when creating any new file in the Apache Beam repository.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam\u002Fblob\u002Fmaster\u002F.agent\u002Fskills\u002Flicense-compliance\u002FSKILL.md",[114],{"categoryNo":115,"categoryName":116,"taxonomyType":117,"taxonomyTypeDesc":118},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[120,121,122,123,29,124,125,36,126,9,42,127],"compliance","license","license compliance","new","headers","files","repository","file",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":135,"publishedAt":43},"01M6ACDM2W664NC4FH95B3NC14","java-development","Guides Java SDK development in Apache Beam, including building, testing, running examples, and understanding the project structure. Use when working with Java code in sdks\u002Fjava\u002F, runners\u002F, or examples\u002Fjava\u002F.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam\u002Fblob\u002Fmaster\u002F.agent\u002Fskills\u002Fjava-development\u002FSKILL.md",[134],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[136,137,26,28,138,29,30,33,34,139,140,36,94,9,39,141,41,42,37],"java development","java","examples","project","structure","project structure",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":149,"publishedAt":43},"01M6ACDHGVH4F8ADMCFR7T34H8","io-connectors","Guides development and usage of I\u002FO connectors in Apache Beam. Use when working with I\u002FO connectors, creating new connectors, or debugging data source\u002Fsink issues.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam\u002Fblob\u002Fmaster\u002F.agent\u002Fskills\u002Fio-connectors\u002FSKILL.md",[148],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[150,151,152,153,33,34,36,154,9,102,26,103,42,155,123,29],"connectors","io","io connectors","usage","data","source",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":43},"01M6ACDF6YTQG62GC4JKAVQBJS","gradle-build","Guides understanding and using the Gradle build system in Apache Beam. Use when building projects, understanding dependencies, or troubleshooting build issues.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fbeam\u002Fblob\u002Fmaster\u002F.agent\u002Fskills\u002Fgradle-build\u002FSKILL.md",[],[163,164,165,29,34,166,36,167,168,169,9,102,170,42],"build","gradle","gradle build","dependencies","troubleshooting","system","projects","building projects"]