pynit (0.1.1)

Published 2022-12-07 21:31:32 +01:00 by DataHearth in DataHearth/pynit


pip install --index-url  pynit

About this package

Small CLI tool to initialize a python project


pynit speed up the process of creating a new python project. It can initialise the project with git, a virtual environment (using the venv module) and creating a basic folder structure if wanted.


Small CLI tool to initialize a python project

Usage: pynit [OPTIONS] <COMMAND>

  help  Print this message or the help of the given subcommand(s)

  -v, --verbose          Output will be more verbose
  -c, --complete         Initialize with minimal fields for "pyproject.toml"
      --git              Initialize folder with a git repository
      --venv <VENV>      Initialize a new virtual environment with given name in initialized directory
      --layout <LAYOUT>  Define a layout for your project ( [possible values: src, flat]
  -h, --help             Print help information
  -V, --version          Print version information

2 subcommands are available: new and init. Each of them have the same flags (defined globally).

Global flags


Adding this flag will make the STDOUT more verbose.

NOTE: the flag doesn't do anything currently as logging is not yet implemented.


--complete allows you to control how much questions will be asked during the initialisation of the pyproject.toml. By default, only required fields will be asked: build-sytem section, and project.version.


Initialise a git repository


Add a virtual environment to your python project with a given name.


Add a default popular folder structure to your project. Two options are available: flat and src.

For more information, check out this setuptools section.


new acts like cargo new. It take one argument which is the project name. Project name will be the folder name and used as default when asking questions to create a basic pyproject.toml.

The directory must NOT exist before creating the project.


$ pynit --git --venv .env --layout flat new my_project
$ exa -a --tree --level=2 my_project
├── .env
│  ├── ...
├── .git
│  ├── ...
├── .gitignore
├── my_project
│  └──
└── pyproject.toml


Like new, init does the same thing. Except it'll initiase the current directory.

NOTE: if a .gitignore and/or a pyproject.toml is present, they'll be truncated.


Requires Python: >=3.7
2022-12-07 21:31:32 +01:00
Antoine Langlois <>
822 KiB
Assets (2)
Versions (1) View all
0.1.1 2022-12-07