Python Project Template ๐
A template to kick-start your open-source Python project.
Features
- ๐ Modern Python project structure
- ๐ฆ Pre-configured pyproject.toml
- ๐ค ML server template with LitServe
- ๐งช Testing setup with pytest
- ๐ท CI/CD with GitHub Actions
- ๐ Auto-generated documentation
- ๐ฏ Type hints and static type checking
- ๐ Code formatting with ruff and isort
- ๐ Linting with ruff
Project Structure
python-project-template/
โโโ .github/
โ โโโ workflows/ # GitHub Actions workflows
โโโ docs/ # Documentation
โโโ src/ # Source code
โ โโโ python_project_template/
โโโ tests/ # Test files
โโโ .gitignore
โโโ LICENSE
โโโ README.md
โโโ pyproject.toml # Project metadata and dependencies
โโโ setup.py # Package installation
Installation
From Source
git clone https://github.com/aniketmaurya/python-project-template.git
cd python-project-template
pip install .
Development Installation
git clone https://github.com/aniketmaurya/python-project-template.git
cd python-project-template
pip install -e ".[dev]"
Usage
from python_project_template import do_something_awesome
print(do_something_awesome())
Development
- Clone the repository
git clone https://github.com/aniketmaurya/python-project-template.git
cd python-project-template
- Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install development dependencies
pip install -e ".[dev]"
Running Tests
pytest tests/
Contributing
Contributions are always welcome! Here's how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please make sure to update tests as appropriate and follow the existing coding style.
License
MIT - Feel free to use this template for your projects!