How to use ansys-templates
#
Because ansys-templates
is a command line tool, its usage is intended via
the command line. You can check available commands with:
ansys-templates --help
The following help content is returned:
Usage: ansys-templates [OPTIONS] COMMAND [ARGS]...
Ansys tool for creating Python projects.
Options:
--help Show this message and exit.
Commands:
list List all available templates names.
new Create a new project from desired template.
version Display current version.
Listing all templates#
You can list all templates with:
ansys-templates list
The following templates are returned:
Available templates in ``ansys-templates`` are:
doc-project: Create a documentation project using Sphinx.
pybasic: Create a basic Python Package.
pyansys: Create a PyAnsys Python Package project.
pyansys-advanced: Create an advanced PyAnsys Python Package project.
pyansys-openapi-client: Create an OpenAPI Client Package project.
pyace: Create a Python project for any method developers.
pyace-flask: Create a Flask project initialized for any developer.
pyace-grpc: Create gRPC project initialized for any developer.
pyace-fast: Create a FastAPI project initialized for any developer.
solution: Create a Solution based on the Solution Application Framework. **For Ansys Internal Use Only**
Creating a new PyAnsys project#
You can use a given template to create a new PyAnsys project with ansys-templates
new
followed by the name of the template that you want to use:
ansys-templates new <template_name>
For example, to create a new Python Package project with the pybasic template:
ansys-templates new pybasic
You can see all templates available with ansys-templates list
. Or, see more
information about how to use this command with:
ansys-templates new --help
Checking the current version#
Check the your current installed version of PyAnsys templates with:
ansys-templates version