Config
instant-python relies on a YAML file to know how your project should be generated. The config command walks
you through an interactive wizard and produces this file for you.
Running it will create an ipy.yml file in the current directory containing all your answers.
Later this file can be used with the init command.
File format
The configuration file contains four top level keys:
- general – project information
- dependencies – packages that must be installed
- git – repository settings
- template – project structure and built‑in features
Warning
These keys are all required, if any of them is missing, the command will raise an error.
Restrictions
The configuration file has some restrictions that vary depending on the section.
General
- All the fields in the
generalsection are required. - The
slugof the project cannot contain spaces or special characters, it must fulfill toml specifications. - The
licensefield must one of the following values:MIT,ApacheorGPL. These are the more popular licenses, but you can use any other license changing theLICENSEfile later. - The
python_versionmust be one of the following values:3.10,3.11,3.12or3.13. This is the version that will be used to create the virtual environment and install the dependencies. - The
dependency_managermust be eitheruvofpdm. These are the two supported dependency managers that we found more useful. Future versions may support more dependency managers.
Dependencies
- If you don't want to install any dependencies, you can leave the
dependenciessection empty. But it's important to keep the section in the file. - If a dependency is specified, the
nameandversionfields are required. - Only dependencies marked as development dependencies can be assigned to a
group. Otherwise, the command will raise an error.
Git
- The
initializefield is required, and must be eithertrueorfalse. - If
initializeis set totrue, theusernameandemailfields must be provided.
Template
- The
namefield is required, and must be one of the available templates:standard,domain_driven_design,clean_architectureorcustom. - When the template is
domain_driven_designis it possible to specify the name for abounded_contextand itsaggregate_root. If any of these fields is specified for other templates, the command will raise an error. - The
built_in_featuresfield is optional, but if specified, it must be a list of features that are available in the template. The list of available features can be found in the out-of-the-box section.