Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tusharsadhwani/python-starter
A straightforward starter template for Python packages.
https://github.com/tusharsadhwani/python-starter
packaging python
Last synced: 15 days ago
JSON representation
A straightforward starter template for Python packages.
- Host: GitHub
- URL: https://github.com/tusharsadhwani/python-starter
- Owner: tusharsadhwani
- Created: 2021-07-31T12:14:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-30T00:29:34.000Z (4 months ago)
- Last Synced: 2024-10-15T02:29:42.730Z (28 days ago)
- Topics: packaging, python
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# python-starter
A straightforward starter template for Python packages.
Includes things like:
- All necessary files and paths in `.gitignore`
- `setup.cfg` configuration
- Local development using `requirements.txt` and `requirements-dev.txt`
- Tools like `mypy`, `black`, `pytest` and `tox` set up out of the box## Usage
Install [cookiecutter](https://pypi.org/p/cookiecutter) and run the following:
```text
cookiecutter gh:tusharsadhwani/py
```Or if you have `pipx` installed, you can use it directly like so:
```text
pipx run cookiecutter gh:tusharsadhwani/py
```Cookiecutter will ask you information like the project name, your email and
GitHub username, and then it will produce the following tree structure:```text
.
├── src
│ └──
│ ├── __init__.py
│ ├── __main__.py
│ └── py.typed
├── tests
│ └── _test.py
├── LICENSE
├── mypy.ini
├── README.md
├── requirements-dev.txt
├── requirements.txt
├── setup.cfg
├── setup.py
└── tox.ini
```Now create and activate a virtual environment, and run:
```text
pip install -r requirements-dev.txt
```You're ready to start writing code!
To ensure that the project installation was correct:
- Run `pytest` to run the sample test case, and ensure it passes.
- Type the name of your project in the terminal, to run the sample CLI command.