{"id":23207723,"url":"https://github.com/robotdad/python-template","last_synced_at":"2026-02-23T03:10:50.509Z","repository":{"id":268295116,"uuid":"903890005","full_name":"robotdad/python-template","owner":"robotdad","description":"Python project template","archived":false,"fork":false,"pushed_at":"2024-12-15T20:40:29.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T22:32:20.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/robotdad.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}},"created_at":"2024-12-15T20:17:58.000Z","updated_at":"2024-12-18T10:44:56.000Z","dependencies_parsed_at":"2024-12-15T21:38:50.803Z","dependency_job_id":null,"html_url":"https://github.com/robotdad/python-template","commit_stats":null,"previous_names":["robotdad/python-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotdad%2Fpython-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotdad%2Fpython-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotdad%2Fpython-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotdad%2Fpython-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robotdad","download_url":"https://codeload.github.com/robotdad/python-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247328300,"owners_count":20921162,"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":[],"created_at":"2024-12-18T17:25:37.270Z","updated_at":"2026-02-23T03:10:45.476Z","avatar_url":"https://github.com/robotdad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modern Python Project Template\n\nA comprehensive template for Python projects following modern development practices. This template includes a working example package (a simple calculator) to demonstrate project structure, testing patterns, and development workflows.\n\n## Features\n\n- **Modern Project Structure**\n  - `src` layout for proper packaging\n  - Clear separation of package code, tests, and documentation\n  - Example scripts directory for utilities and tools\n\n- **Development Tools**\n  - Type checking with mypy\n  - Code formatting with black\n  - Import sorting with isort\n  - Linting with ruff\n  - Security checking with bandit and safety\n  - Pre-commit hooks for automated checks\n\n- **Testing Framework**\n  - pytest configuration\n  - Example tests with fixtures\n  - Coverage reporting setup\n\n- **Documentation**\n  - Technical documentation structure\n  - API documentation examples\n  - Clean README template\n\n## Using This Template\n\n1. Create a new repository using this template\n2. Clone your new repository\n3. Make the following changes to customize for your project:\n\n### Initial Setup\n\n```bash\n# Create and activate virtual environment\nuv venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n\n# Install development dependencies\nuv pip install -e \".[dev]\"\n\n# Install pre-commit hooks\npre-commit install\n```\n\n### Required Changes\n\n1. Update `pyproject.toml`:\n   - Change `name` to your project name\n   - Update `description` and `authors`\n   - Modify `packages` to point to your package name\n   - Adjust dependencies as needed\n\n2. Rename/modify source code:\n   - Remove or replace the calculator example in `src/calculator/`\n   - Create your own package structure under `src/`\n\n3. Update documentation:\n   - Modify this README.md for your project\n   - Update or remove example documentation in `docs/`\n   - Add your own documentation\n\n4. Update tests:\n   - Remove example calculator tests\n   - Create your own tests in `tests/`\n   - Update `conftest.py` with your fixtures\n\n5. Update scripts:\n   - Remove `example_calculation.py`\n   - Add your own utility scripts as needed\n\n6. Choose your license\n   - This template is provided as MIT\n   - You should choose and update the [LICENSE](.LICENSE) for your needs\n   - Update `license` in `pyproject.toml` to match\n\n\n### Example Code\n\nThe template includes a simple calculator package that demonstrates:\n\n- Type hints and Pydantic models\n- Custom exceptions\n- History tracking\n- Unit testing\n- Pytest fixtures\n- Documentation standards\n\nYou can run the example:\n```bash\n# Run tests\npytest\n\n# Try the example script\npython scripts/example_calculation.py\n```\n\nReview the example code to understand the conventions, then remove or replace it with your own package.\n\n## Template Features in Detail\n\n### Source Layout\n\n```\nproject-name/\n├── src/               # Main package directory\n│   └── your_package/  # Your source code goes here\n├── tests/             # Test directory\n├── docs/              # Documentation\n├── scripts/           # Utility scripts\n└── notebooks/         # Jupyter notebooks (if needed)\n```\n\n### Quality Tools\n\n- **black**: Code formatting\n  - Line length: 88 characters\n  - Configured in pyproject.toml\n\n- **mypy**: Type checking\n  - Strict type checking enabled\n  - Pydantic plugin configured\n\n- **isort**: Import sorting\n  - Compatible with black\n  - Structured import sections\n\n- **ruff**: Fast linting\n  - Configured to work with black\n  - Common Python linting rules\n\n- **pre-commit**: Automated checks\n  - Runs before each commit\n  - Ensures code quality\n\n### Testing\n\n- **pytest**: Testing framework\n  - Example fixtures in conftest.py\n  - Coverage reporting configured\n  - Clear test organization\n\n### Environment Management\n\n- `.env.template` for configuration\n- Virtual environment setup\n- Dependency management in pyproject.toml\n\n## Development Workflow\n\n1. Create feature branch\n2. Make changes\n3. Run tests: `pytest`\n4. Run pre-commit: `pre-commit run --all-files`\n5. Commit and push\n6. Create pull request\n\n## Contributing\n\nContributions to improve this template are welcome! Please submit issues and pull requests on GitHub.\n\n## License\n\nThis template is MIT licensed. See the [LICENSE](LICENSE) file for details.\n\n## Credits\n\nCreated and maintained by [Your Name/Organization]. This template is designed to provide a solid foundation for Python projects while demonstrating best practices through working examples.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotdad%2Fpython-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotdad%2Fpython-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotdad%2Fpython-template/lists"}