{"id":32382803,"url":"https://github.com/threeal/python-cpp-bindings-starter","last_synced_at":"2026-07-05T01:31:22.155Z","repository":{"id":314255508,"uuid":"1054711472","full_name":"threeal/python-cpp-bindings-starter","owner":"threeal","description":"A minimalist template for starting a new Python project with C++ bindings","archived":false,"fork":false,"pushed_at":"2025-09-11T10:24:01.000Z","size":11,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-11T13:24:52.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/threeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-11T08:20:24.000Z","updated_at":"2025-09-11T08:38:46.000Z","dependencies_parsed_at":"2025-09-11T13:24:55.285Z","dependency_job_id":"ead0937c-0151-4bdd-8abe-ccba7ce22dab","html_url":"https://github.com/threeal/python-cpp-bindings-starter","commit_stats":null,"previous_names":["threeal/python-cpp-bindings-starter"],"tags_count":null,"template":true,"template_full_name":"threeal/python-starter","purl":"pkg:github/threeal/python-cpp-bindings-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fpython-cpp-bindings-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fpython-cpp-bindings-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fpython-cpp-bindings-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fpython-cpp-bindings-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threeal","download_url":"https://codeload.github.com/threeal/python-cpp-bindings-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fpython-cpp-bindings-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893633,"owners_count":26409279,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-25T01:50:18.563Z","updated_at":"2025-10-25T01:50:43.193Z","avatar_url":"https://github.com/threeal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Starter\n\nA minimalist template for starting a new [Python](https://www.python.org/) project with C++ bindings.\n\nThis template provides a basic Python project containing an example package with built-in support for formatting, linting, testing, and continuous integration.\n\n## Key Features\n\n- Uses [uv](https://docs.astral.sh/uv/) as the package manager.\n- Supports C++ bindings using [nanobind](https://nanobind.readthedocs.io/).\n- Supports formatting and linting with [dprint](https://dprint.dev/) and [Ruff](https://github.com/astral-sh/ruff).\n- Supports testing and coverage checks with [Pytest](https://docs.pytest.org/en/stable/).\n- Fixes formatting and linting issues during pre-commit hooks using [Lefthook](https://lefthook.dev/).\n- Includes preconfigured workflows for [Dependabot](https://docs.github.com/en/code-security/dependabot) and [GitHub Actions](https://github.com/features/actions).\n\n## Usage\n\nThis guide explains how to use this template to start a new Python project, from creation to release.\n\n### Create a New Project\n\nFollow [this link](https://github.com/new?template_name=python-starter\u0026template_owner=threeal) to create a new project based on this template. For more information about creating a repository from a template on GitHub, refer to [this documentation](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template).\n\nAlternatively, you can clone this repository locally to begin using this template.\n\n### Set Up Tools\n\n#### Set Up Package Manager\n\nThis template uses [uv](https://docs.astral.sh/uv/) as the package manager. If uv is not installed, follow [this guide](https://docs.astral.sh/uv/getting-started/installation/) to install it. Then, synchronize the project dependencies with:\n\n```sh\nuv sync\n```\n\nFor more information on uv, including adding dependencies or running tools, refer to [this documentation](https://docs.astral.sh/uv/guides/).\n\n#### Set Up Git Hooks\n\nThis template uses [Lefthook](https://lefthook.dev/) to manage Git hooks, especially for the pre-commit hook. Lefthook will be installed as a development dependency by the package manager, and the pre-commit hook can be installed with:\n\n```sh\nuv run lefthook install\n```\n\nAfter that, each commit to the project will trigger a hook that checks for formatting and linting. This ensures that committed files follow the specified rules.\n\nFor more information on Lefthook and how it manages hooks, refer to [this documentation](https://lefthook.dev/usage/index.html).\n\n### Developing the Project\n\n#### Choose a License\n\nBy default, this template is [unlicensed](https://unlicense.org/). Before modifying this template, it is recommended to replace the [`LICENSE`](./LICENSE) file with the license that will be used by the new project. For more information about licensing a repository, refer to [this documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository).\n\nAlternatively, you can remove the `LICENSE` file or leave it as is to keep the new project unlicensed.\n\n#### Writing the Package\n\nModify the source files under the [`src`](./src) directory to start writing the package. If you're new to Python, refer to [this documentation](https://wiki.python.org/moin/BeginnersGuide) for guidance.\n\nYou can replace the [`src/bonacci`](./src/bonacci) directory with your package name. You can also add as many packages as you want to the `src` directory. Just make sure to update the contents of the [`pyproject.toml`](./pyproject.toml) file according to your package information.\n\n#### Writing C++ Extensions\n\nThis template includes C++ bindings using [nanobind](https://nanobind.readthedocs.io/).\nReplace the [`src/bonacci_bindings`](./src/bonacci_bindings) with your C++ extension package name. When adding new C++ source files, make sure to update the [`CMakeLists.txt`](./CMakeLists.txt) file. For more information on nanobind, refer to [this documentation](https://nanobind.readthedocs.io/en/latest/).\n\n#### Testing the Package\n\nTest files in this template are named `test_*.py` and located in the [`tests`](./tests) directory. Write the necessary tests for your package and run them with:\n\n```sh\nuv run pytest -v --cov\n```\n\nThis template uses [Pytest](https://docs.pytest.org/en/stable/) as the testing framework. For more information on testing with Pytest, refer to [this documentation](https://docs.pytest.org/en/stable/getting-started.html).\n\n#### Push the Changes\n\nAfter writing and testing the package, commit the changes and push them to GitHub. Each push to the `main` branch will trigger a GitHub Actions workflow for continuous integration. For more details on GitHub Actions workflows, refer to [this documentation](https://docs.github.com/en/actions/about-github-actions/understanding-github-actions).\n\nInstead of pushing directly to the `main` branch, it is recommended to push to a separate branch and then create a pull request to merge into `main`. This allows changes to be reviewed and checked by GitHub Actions before merging. For more details on pull requests, refer to [this documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).\n\n### Releasing the Project\n\n#### Specify Version Number\n\nUpdate the version number of the package in the [`pyproject.toml`](./pyproject.toml) file to match the version you plan to release. The version number usually follows the semantic versioning system. Refer to [this documentation](https://packaging.python.org/en/latest/discussions/versioning/) for more information on versioning in Python projects.\n\n#### Build the Package\n\nBefore releasing, build only the source distribution package with:\n\n```sh\nuv build --sdist\n```\n\nThis will create a source tarball under the `dist` directory. For wheels, download the artifacts from the CI build workflow which builds wheels for all supported platforms.\n\n#### Release on GitHub\n\nCreate a new tag in the `main` branch corresponding to the version number of the release, and then draft a new release using that tag. You can optionally include the source distribution (sdist) or wheels from CI artifacts as assets in the release. Refer to [this documentation](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) for more information on managing releases on GitHub.\n\n#### Publish on PyPI\n\nEnsure both source distribution and wheels are in the `dist` directory before publishing, then run:\n\n```sh\nuv publish\n```\n\nThe command will prompt you to enter your username or token for publishing on PyPI. After publishing, wait a few minutes for the package to become available on PyPI. For more information on publishing to PyPI, refer to [this documentation](https://docs.astral.sh/uv/guides/package/#publishing-your-package).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeal%2Fpython-cpp-bindings-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreeal%2Fpython-cpp-bindings-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeal%2Fpython-cpp-bindings-starter/lists"}