An open API service indexing awesome lists of open source software.

https://github.com/aniketmaurya/python-project-template

A template to kick-start your Python project โœจ๐Ÿš€
https://github.com/aniketmaurya/python-project-template

litserve packaging-python pip python python3 ruff

Last synced: about 1 month ago
JSON representation

A template to kick-start your Python project โœจ๐Ÿš€

Awesome Lists containing this project

README

        


Python Project Template ๐Ÿ



A template to kick-start your open-source Python project.




Tests


codecov


black


license



Open in GitHub Codespaces

# Features

- ๐Ÿš€ Modern Python project structure
- ๐Ÿ“ฆ Pre-configured [pyproject.toml](pyproject.toml)
- ๐Ÿค– ML server template with [LitServe](https://github.com/Lightning-AI/LitServe)
- ๐Ÿงช Testing setup with [pytest](https://docs.pytest.org/en/latest/)
- ๐Ÿ‘ท CI/CD with [GitHub Actions](https://github.com/aniketmaurya/python-project-template/blob/main/.github/workflows)
- ๐Ÿ“ 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

```bash
git clone https://github.com/aniketmaurya/python-project-template.git
cd python-project-template
pip install .
```

## Development Installation

```bash
git clone https://github.com/aniketmaurya/python-project-template.git
cd python-project-template
pip install -e ".[dev]"
```

## Usage

```python
from python_project_template import do_something_awesome

print(do_something_awesome())
```

# Development

1. Clone the repository

```bash
git clone https://github.com/aniketmaurya/python-project-template.git
cd python-project-template
```

2. Create a virtual environment

```bash
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```

3. Install development dependencies

```bash
pip install -e ".[dev]"
```

## Running Tests

```bash
pytest tests/
```

# Contributing

Contributions are always welcome! Here's how you can help:

1. Fork the repository
2. Create a new branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Commit your changes (`git commit -m 'Add some amazing feature'`)
5. Push to the branch (`git push origin feature/amazing-feature`)
6. Open a Pull Request

Please make sure to update tests as appropriate and follow the existing coding style.

# License

[MIT](https://choosealicense.com/licenses/mit/) - Feel free to use this template for your projects!