{"id":13825505,"url":"https://github.com/funnyzak/pyproject-starter","last_synced_at":"2025-09-06T15:41:26.249Z","repository":{"id":60614754,"uuid":"544268784","full_name":"funnyzak/pyproject-starter","owner":"funnyzak","description":"A template for the python project. It uses poetry for dependency management and tox for testing.","archived":false,"fork":false,"pushed_at":"2025-02-21T06:58:59.000Z","size":467,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T15:54:36.733Z","etag":null,"topics":["poetry-python","python","python-project-starter","tox"],"latest_commit_sha":null,"homepage":"https://pyproject.yycc.dev","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/funnyzak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://github.com/funnyzak/funnyzak/blob/main/pro/Coffee.md"]}},"created_at":"2022-10-02T03:52:59.000Z","updated_at":"2024-12-30T22:27:22.000Z","dependencies_parsed_at":"2024-01-13T16:25:34.232Z","dependency_job_id":"6080ebe1-4537-480a-af69-cf319b9d33d6","html_url":"https://github.com/funnyzak/pyproject-starter","commit_stats":null,"previous_names":[],"tags_count":7,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyzak%2Fpyproject-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyzak%2Fpyproject-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyzak%2Fpyproject-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyzak%2Fpyproject-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funnyzak","download_url":"https://codeload.github.com/funnyzak/pyproject-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243872434,"owners_count":20361480,"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":["poetry-python","python","python-project-starter","tox"],"created_at":"2024-08-04T09:01:22.365Z","updated_at":"2025-03-17T17:31:18.823Z","avatar_url":"https://github.com/funnyzak.png","language":"Python","funding_links":["https://github.com/funnyzak/funnyzak/blob/main/pro/Coffee.md"],"categories":["Python"],"sub_categories":[],"readme":"# PyPoject Starter\n\n[![Build Status][build-status-image]][build-status]\n[![license][license-image]][repository-url]\n[![Documentation Status][doc-image]][doc-url]\n[![GitHub repo size][repo-size-image]][repository-url]\n[![codecov][cov-image]][cov-url]\n\n\u003c!-- [![Release][rle-image]][rle-url] --\u003e\n\u003c!-- [![Sourcegraph][sg-image]][sg-url] --\u003e\n\nA template for the python project. It uses [poetry](https://python-poetry.org/) for dependency management and [tox](https://github.com/tox-dev/tox) for testing.\n\n[cov-image]: https://codecov.io/gh/funnyzak/pyproject-starter/branch/main/graph/badge.svg?token=K1AKZ65LY1\n[cov-url]: https://codecov.io/gh/funnyzak/pyproject-starter\n[doc-image]: https://readthedocs.org/projects/pyproject-starter/badge/?version=latest\u0026style=flat\n[doc-url]: https://pyproject-starter.readthedocs.io/en/latest/?badge=latest\n[repo-size-image]: https://img.shields.io/github/repo-size/funnyzak/pyproject-starter?style=flat-square\u0026logo=github\u0026logoColor=white\u0026label=size\n[build-status-image]:  https://github.com/funnyzak/pyproject-starter/actions/workflows/ci.yml/badge.svg\n[build-status]: https://github.com/funnyzak/pyproject-starter/actions\n[license-image]: https://img.shields.io/github/license/funnyzak/pyproject-starter.svg?style=flat-square\n[repository-url]: https://github.com/funnyzak/pyproject-starter\n[sg-image]: https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=flat-square\n[sg-url]: https://sourcegraph.com/github.com/funnyzak/pyproject-starter\n[rle-image]: https://img.shields.io/github/release-date/funnyzak/pyproject-starter.svg?style=flat-square\u0026label=release\n[rle-url]: https://github.com/funnyzak/pyproject-starter/releases/latest\n\n## Features\n\nSome features in this template project:\n\n- Use [poetry](https://python-poetry.org/) for dependency management.\n- Use tox、pytest、pytest-cov、coverage for testing.\n- Use black、isort for code formatting.\n- Use flake8 link for code linting.\n- Use mypy for static type checking.\n- Use [pre-commit](https://pre-commit.com/) for code quality.\n- Use ipdb3 for debugging.\n- Multiple python versions support(Python 3.8.1+).\n- More features to be added 🚀 .\n\n## Project\n\nContains the following projects under `src` as demo:\n\n- [hello](https://github.com/funnyzak/pyproject-starter/tree/main/src/hello) is a simple hello world project.\n- [pdf_parse](https://github.com/funnyzak/pyproject-starter/tree/main/src/pdf_parse) is a project that parse pdf.\n\n## Prerequisite\n\nRun project need the following environment installed:\n\n- [Python 3.8.1+](https://www.python.org/)\n- [Poetry 1.3.2](https://python-poetry.org/)\n\nIf you want development, you need to install  [pre-commit V3](https://pre-commit.com/) for git hook scripts.\n\n## Installation\n\nfollowing the steps below to setup the project:\n\n```bash\n# Clone the repository\ngit clone git@github.com:funnyzak/pyproject-starter.git \u0026\u0026 cd pyproject-starter\n\n# Install all dependencies\npoetry install --sync --all-extras --with dev,test,coverage\n\n# install git hook scripts for development\npre-commit install\n\n# Other useful installation dependencies commands\n# Install dependencies with all extras\npoetry install --all-extras\n# Install dependencies with extras 'pdf' for pdf_parse project\npoetry install --extras \"pdf\"\n# Install dependencies with group 'dev'、'test' for development\npoetry install --with dev,test\n# Only install required dependencies for production\npoetry install\n\n# Specify python version\npoetry env use python3.9\n```\n\n## Usage\n\nThere are some useful commands for development:\n\n```bash\n# Run project =\u003e hello\npoetry run hello\n\n# Run project =\u003e pdf_parse: merge pdf\npoetry run merge_pdf_demo\n\n# Run project =\u003e pdf_parse: parse multi pdf to multi-layer pdf\npoetry run multi_layer_pdf_demo\n\n# Extract text to json from pdf\npoetry run extract_text_from_pdf\n\n# Debug \"hello\" project with ipdb3\npoetry run ipdb3 ./src/hello/main.py\n\n# Code test\npoetry run pytest -s\n\n# Run default coverage test\npoetry run tox\n\n# Run hello project coverage test at python 3.9 and 3.10\npoetry run tox -e py{39,310}-hello\n\n# Lint with black\npoetry run black ./src --check\n\n# Format code with black\npoetry run black ./src\n\n# Check with mypy\npoetry run mypy ./src\n\n# Check import order with isort\npoetry run isort ./src --check\n\n# Lint with flake8\npoetry run flake8 ./src\n```\n\n## Q\u0026A\n\n### Development\n\n#### Add new project\n\n1. Create a new folder under `src` folder.\n2. You can copy the `hello` project as a template.\n3. Add folder name to `packages` in `pyproject.toml` file.\n4. Code and test it.\n\n#### Tip for project\n\n- You can create test cases for the new project in `tests` folder.\n- You can define script commands for the new project in `pyproject.toml` file. like `poetry run hello` command.\n- You can add new project to `tox.ini` file for coverage test.\n- You can add new project to `mypy.ini` file for static type checking.\n\n### Environment setup\n\n#### install poetry\n\nSee [poetry installation](https://python-poetry.org/docs/#installation).\n\n#### install python3\n\nSee [python installation](https://www.python.org/downloads/).\n\n#### install pre-commit\n\nSee [pre-commit installation](https://pre-commit.com/#install).\n\n## References\n\nsome useful references:\n\n- [poetry](https://python-poetry.org/) is a dependency manager for Python that allows you to declare the libraries your project depends on and it will manage (install/update) them for you.\n- [PyPDF2](https://pypdf2.readthedocs.io/en/latest/user/adding-pdf-annotations.html#free-text) is a library for working with PDF files.\n- [flake8](https://flake8.pycqa.org/en/latest/) is a wrapper around these tools: PyFlakes, pycodestyle, and Ned Batchelder’s McCabe script.\n- [isort](https://pycqa.github.io/isort/) is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.\n- [black](https://black.readthedocs.io/en/stable/) is a Python code formatter.\n- [mypy](https://mypy.readthedocs.io/en/stable/config_file.html#per-module-and-global-options) is a static type checker for Python.\n- [pytest](https://docs.pytest.org/en/stable/) is a testing framework for Python.\n- [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) is a plugin for the pytest testing tool that measures coverage of Python code.\n- [coverage](https://coverage.readthedocs.io/en/coverage-5.5/) is a tool for measuring code coverage of Python programs.\n- [ipdb](https://pypi.org/project/ipdb/) is a IPython-enabled pdb.\n- [pre-commit](https://pre-commit.com/) is a framework for managing and maintaining multi-language pre-commit hooks.\n- [tox](https://tox.readthedocs.io/en/latest/) is a generic virtualenv management and test command line tool you can use for:\n  - checking your package installs correctly with different Python versions and interpreters\n  - running your tests in each of the environments, configuring your test tool of choice\n  - acting as a frontend to Continuous Integration servers, greatly reducing boilerplate and merging CI and shell-based testing.\n\n## Contribution\n\nIf you have any questions or suggestions, please feel free to open an issue or pull request.\n\n\u003ca href=\"https://github.com/funnyzak/pyproject-starter/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=funnyzak/pyproject-starter\" /\u003e\n\u003c/a\u003e\n\n## License\n\nMIT License © 2022 [funnyzak](https://github.com/funnyzak)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyzak%2Fpyproject-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunnyzak%2Fpyproject-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyzak%2Fpyproject-starter/lists"}