{"id":21974276,"url":"https://github.com/frequenz-floss/setuptools-betterproto","last_synced_at":"2025-03-22T23:26:04.169Z","repository":{"id":233018980,"uuid":"785728297","full_name":"frequenz-floss/setuptools-betterproto","owner":"frequenz-floss","description":"A modern setuptools plugin to generate Python files from proto files using betterproto","archived":false,"fork":false,"pushed_at":"2024-05-23T08:56:56.000Z","size":1116,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"v0.x.x","last_synced_at":"2024-05-23T09:04:38.697Z","etag":null,"topics":["betterproto","code-generation","frequenz","grpc","grpclib","library","plugin","proto","protobuf","protocol-buffers","python","setuptools"],"latest_commit_sha":null,"homepage":"https://frequenz-floss.github.io/setuptools-betterproto/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frequenz-floss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-12T13:52:25.000Z","updated_at":"2024-06-03T09:36:01.687Z","dependencies_parsed_at":"2024-04-13T00:09:50.069Z","dependency_job_id":"dafad9b7-28a1-4cff-97df-15df512da8bf","html_url":"https://github.com/frequenz-floss/setuptools-betterproto","commit_stats":null,"previous_names":["frequenz-floss/setuptools-betterproto"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Fsetuptools-betterproto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Fsetuptools-betterproto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Fsetuptools-betterproto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frequenz-floss%2Fsetuptools-betterproto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frequenz-floss","download_url":"https://codeload.github.com/frequenz-floss/setuptools-betterproto/tar.gz/refs/heads/v0.x.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245034030,"owners_count":20550378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["betterproto","code-generation","frequenz","grpc","grpclib","library","plugin","proto","protobuf","protocol-buffers","python","setuptools"],"created_at":"2024-11-29T15:40:36.366Z","updated_at":"2025-03-22T23:26:04.137Z","avatar_url":"https://github.com/frequenz-floss.png","language":"Python","readme":"# Archived\n\n\u003e [!WARNING]\n\u003e This repository has been archived due to doubts casted about [betterproto](https://github.com/danielgtaylor/python-betterproto) being a sustaintable project.\n\n# Betterproto Setuptools plugin\n\n[![Build Status](https://github.com/frequenz-floss/setuptools-betterproto/actions/workflows/ci.yaml/badge.svg)](https://github.com/frequenz-floss/setuptools-betterproto/actions/workflows/ci.yaml)\n[![PyPI Package](https://img.shields.io/pypi/v/setuptools-betterproto)](https://pypi.org/project/setuptools-betterproto/)\n[![Docs](https://img.shields.io/badge/docs-latest-informational)](https://frequenz-floss.github.io/setuptools-betterproto/)\n\n## Introduction\n\nA modern [`setuptools`](https://setuptools.pypa.io/) plugin to generate Python\nfiles from proto files using [betterproto].\n\nThis plugin is based on\n[`repo-config`](https://frequenz-floss.github.io/frequenz-repo-config-python/)'s\n[`grpc_tools`\nplugin](https://frequenz-floss.github.io/frequenz-repo-config-python/v0.9/reference/frequenz/repo/config/setuptools/grpc_tools/).\n\n## Supported Platforms\n\nThe following platforms are officially supported (tested):\n\n- **Python:** 3.11\n- **Operating System:** Ubuntu Linux 20.04\n- **Architectures:** amd64, arm64\n\n## Quick Start\n\nTo add automatic [betterproto] code generation to your project, you need to add\nthis package to your build-dependencies in the `pyproject.toml` file, for\nexample:\n\n```toml\n[build-system]\nrequires = [\n  \"setuptools == 68.1.0\",\n  \"setuptools-betterproto == 0.1.0\",\n]\nbuild-backend = \"setuptools.build_meta\"\n```\n\nThis uses a default configuration as follows:\n\n* `proto_path`: This is the root directory where the proto files are located.\n  By default, it is set to `.`.\n* `proto_glob`: This is the glob pattern to match the proto files. The search\n  is done recursively. By default, it is set to `*.proto`.\n* `include_paths`: This is a list of paths to be added to the protobuf\n  compiler's include path. By default, it is set to `[]`, but the `proto_path`\n  directory is always automatically added.\n* `out_path`: This is the directory where the generated Python files will be\n  placed. By default, it is set to `.`.\n\nThese defaults can be changed via the `pypackage.toml` file too. For example:\n\n```toml\n[tool.setuptools_betterproto]\nproto_path = \"proto\"\ninclude_paths = [\"api-common-protos\"]\nout_path = \"src\"\n```\n\nYou should add [betterproto] as a dependency too, for example:\n\n```toml\ndependencies = [\"betterproto == 2.0.0b6\"]\n```\n\nOnce this is done, the conversion of the proto files to Python files should be\nautomatic. Just try building the package with:\n\n```sh\npython -m pip install build\npython -m build\n```\n\nA new command to generate the files will be also added to `setuptools`, you can\nrun it manually with:\n```sh\npython -c 'import setuptools; setuptools.setup()' compile_betterproto\n```\n\nYou can also pass the configuration options via command line for quick testing,\ntry passing `--help` at the end of the command to see the available options.\n\n## Contributing\n\nIf you want to know how to build this project and contribute to it, please\ncheck out the [Contributing Guide](CONTRIBUTING.md).\n\n## Similar projects\n\n* [`setuptools-proto`](https://github.com/jameslan/setuptools-proto/): We didn't use this project because it seems a bit inactive and not widely used. It also seems to need some configuration as code, which we wanted to avoid.\n\n[betterproto]: https://github.com/danielgtaylor/python-betterproto\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrequenz-floss%2Fsetuptools-betterproto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrequenz-floss%2Fsetuptools-betterproto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrequenz-floss%2Fsetuptools-betterproto/lists"}