piel.cli#

Submodules#

Functions#

main([args])

CLI Interface for piel There are available many helper commands to help you set up your

activate_shell()

Enters the custom piel nix environment with all the supported tools installed and configured packages.

get_python_install_directory()

Gets the piel installation directory.

main([args])

CLI Interface for piel There are available many helper commands to help you set up your

get_piel_install_directory()

Gets the piel installation directory.

return_path(→ pathlib.Path)

Returns a pathlib.Path to be able to perform operations accordingly internally.

echo_and_check_subprocess(command, **kwargs)

Runs a subprocess and prints the command. Raises an exception if the subprocess fails.

get_python_install_directory()

Gets the piel installation directory.

main([args])

CLI Interface for piel There are available many helper commands to help you set up your

develop()

Development related commands.

build_documentation([args])

Verifies and builds the documentation.

generate_poetry2nix_flake([args])

Generates the poetry2nix flakes file. Requires nix to be installed.

build_piel_cachix_command([args])

Enters the custom piel nix environment with all the supported tools installed and configured packages.

main([args])

CLI Interface for piel There are available many helper commands to help you set up your

main([args])

CLI Interface for piel There are available many helper commands to help you set up your

run()

Running related commands.

run_python()

Runs a python shell where piel is installed.

append_to_bashrc_if_does_not_exist(line)

Appends a line to .bashrc if it does not exist.

echo_and_run_subprocess(command, **kwargs)

Runs a subprocess and prints the command.

echo_and_check_subprocess(command, **kwargs)

Runs a subprocess and prints the command. Raises an exception if the subprocess fails.

get_python_install_directory()

Gets the piel installation directory.

get_piel_home_directory()

Gets the piel home directory.

install_nix()

Installs the nix package manager.

create_and_activate_venv(→ None)

Creates and activates the piel virtual environment.

Package Contents#

main(args=None)#

CLI Interface for piel There are available many helper commands to help you set up your environment and design your projects.

activate_shell()#

Enters the custom piel nix environment with all the supported tools installed and configured packages. Runs the nix-shell command on the piel/environment/nix/ directory.

get_python_install_directory()#

Gets the piel installation directory.

Returns:

The piel installation directory.

Return type:

pathlib.Path

main(args=None)#

CLI Interface for piel There are available many helper commands to help you set up your environment and design your projects.

get_piel_install_directory()#

Gets the piel installation directory.

return_path(input_path: piel.types.PathTypes, as_piel_module: bool = False) pathlib.Path#

Returns a pathlib.Path to be able to perform operations accordingly internally.

This allows us to maintain compatibility between POSIX and Windows systems. When the as_piel_module flag is enabled, it will analyse whether the input path can be treated as a piel module, and treat the returned path as a module would be treated. This comes useful when analysing files generated in this particular structure accordingly.

Usage:

return_path(‘path/to/file’)

Parameters:

input_path (str) – Input path.

Returns:

Pathlib path.

Return type:

pathlib.Path

echo_and_check_subprocess(command: list, **kwargs)#

Runs a subprocess and prints the command. Raises an exception if the subprocess fails.

Parameters:
  • command

  • **kwargs

Returns:

get_python_install_directory()#

Gets the piel installation directory.

Returns:

The piel installation directory.

Return type:

pathlib.Path

main(args=None)#

CLI Interface for piel There are available many helper commands to help you set up your environment and design your projects.

develop()#

Development related commands.

build_documentation(args=None)#

Verifies and builds the documentation.

generate_poetry2nix_flake(args=None)#

Generates the poetry2nix flakes file. Requires nix to be installed.

Returns:

build_piel_cachix_command(args=None)#

Enters the custom piel nix environment with all the supported tools installed and configured packages. Runs the nix-shell command on the piel/environment/nix/ directory.

main(args=None)#

CLI Interface for piel There are available many helper commands to help you set up your environment and design your projects.

main(args=None)#

CLI Interface for piel There are available many helper commands to help you set up your environment and design your projects.

run()#

Running related commands.

run_python()#

Runs a python shell where piel is installed.

append_to_bashrc_if_does_not_exist(line: str)#

Appends a line to .bashrc if it does not exist.

Parameters:

line

Returns:

echo_and_run_subprocess(command: list, **kwargs)#

Runs a subprocess and prints the command.

Parameters:
  • command

  • **kwargs

Returns:

echo_and_check_subprocess(command: list, **kwargs)#

Runs a subprocess and prints the command. Raises an exception if the subprocess fails.

Parameters:
  • command

  • **kwargs

Returns:

get_python_install_directory()#

Gets the piel installation directory.

Returns:

The piel installation directory.

Return type:

pathlib.Path

get_piel_home_directory()#

Gets the piel home directory.

Returns:

The piel home directory.

Return type:

pathlib.Path

install_nix()#

Installs the nix package manager.

create_and_activate_venv() None#

Creates and activates the piel virtual environment.

Returns:

None.

Return type:

None