This is the comprehensive guide to deploying ActiveState projects on your local machine. If you’re just getting started, you may want to begin with the First Steps guide for a streamlined introduction.
After creating your project, you need to deploy the runtime on your machine by checking it out and activating it. You can check out multiple projects or the same project to different locations on your system.
This guide covers:
All checkout methods work with your activestate.yaml file, which acts as a configuration file and shortcut to your project. For more information about this file, see the glossary.
To check out your project and download a project folder containing your project’s activestate.yaml file to your current working directory:
state checkout <orgname>/<projectname>
For example: state checkout myOrg/Project1
What this does:
activestate.yaml configuration filestate projects to see all locationsTo download the activestate.yaml file directly into your current working directory:
state checkout <orgname>/<projectname> .
For example: state checkout myOrg/Project1 .
When to use this:
To checkout a project to a specific location on your system:
state checkout <orgname>/<projectname> <location>
For example: state checkout myOrg/Project1 C:/Projects/MyProject
Benefits:
To download all project files (.dll, .bat, .exe, etc.) to a specific location:
state checkout <orgname>/<projectname> --runtime-path <folder location>
For example: state checkout myOrg/Project1 --runtime-path C:/Perl
When to use this:
To checkout a specific branch of a project:
state checkout --branch <branchname> <org/project> <path>
For example: state checkout --branch experimental myOrg/Project1 ./test-env
After checking out your project, you need to activate it to use the runtime environment.
The state shell command creates an isolated environment for your project:
state shell
From project directory:
activestate.yaml filestate shellFrom anywhere:
state shell <orgname>/<projectname>
Benefits:
exit)Usage:
# Navigate to project directory
cd my-project
# Start shell environment
state shell
# Your prompt will change to indicate active environment
(my-project) $ python --version
Python 3.9.7
# Exit when done
(my-project) $ exit
The state use command sets a project as your system default:
state use <orgname>/<projectname>
Benefits:
Commands:
# Set default project
state use myOrg/myproject
# Check current default
state use show
# Remove default
state use reset
Only one project can be set as the system default at a time. Setting a new default will replace the previous one.
You can work with multiple ActiveState projects simultaneously using different strategies.
Open separate terminal windows for different projects:
Terminal 1:
state shell myorg/project1
Terminal 2:
state shell myorg/project2
Benefits:
Use one project as default and override with shells:
# Set primary project as default
state use myorg/main-project
# Override in specific terminal
state shell myorg/experimental-project
When to use:
To see all projects currently available locally:
state projects
Output includes:
activestate.yaml files are)Example output:
Organization/Project Local Checkout Path Cache Path
example/python-project /home/user/projects/python /home/user/.cache/activestate/...
example/data-analysis /home/user/analysis /home/user/.cache/activestate/...
state use show to verify current defaultstate auth --show for private projectsIf you have the same project checked out multiple times:
state shellstate projects - List all checkouts to identify conflictsstate shell orgname/projectnameAfter successfully checking out and activating your project: