Creating your project

To work with the State Tool you need to create an ActiveState Platform project. You can specify the programming language to use, the software packages to include, and the operating systems to deploy the project to.

You can create and configure your project in two ways:

  1. Use the State Tool to create your first Python or Perl project on the command line using the State Tool.
  2. Navigate to the ActiveState Platform website and create your Python, Perl, or Tcl project in the Dashboard.

Creating a project using the command line

To create your account using the State Tool:

  1. Sign up for the ActiveState Platform if you don’t already have an account.

    state auth signup

    You will be prompted to accept the Terms of Service agreement and then enter the details for your new account.

  2. Sign in with your account.

    state auth
  3. Create a new project using the state init command and push it to the ActiveState Platform.

    state init <org>/<project_name> --language=<language>[version]
    • <org> is either your username or the name of an organization you belong to.
    • <project_name> is the name of the project to create.
    • <language> is the runtime language for your project (perl, python3, or python2) and you can optionally specify the version using the syntax @version_number.

    Follow the instructions on screen and switch to the directory where the project is initialized and run state push.

    For example:

    state init ActiveCo/python-web-dev --language=python3@3.6.6
    cd ActiveCo/python-web-dev
    state push
  4. Optional. Configure the operating systems for your project. By default, only the platform you run the state init command on is added.

    For example, if you initialize the project on Linux, but you only want macOS and Windows, you can remove Linux and add the latest platforms for macOS and Windows 10:

    state platforms remove Linux 4.9.125
    state platforms add Darwin 16.6.0
    state platforms add Windows 10.0.17134.1

    For more information on managing platforms, see the platforms command.

  5. Configure packages for your project. You can either add packages individually, or all at once using a requirements.txt file (Python) or cpanfile or META.json file (Perl).

    To add an individual package:

    state packages add pandas@1.0.0

    To add packages using a requirements.txt file:

    state packages import --file requirements.txt 

    TIP: You can search for specific packages on the Platform using the state packages search subcommand. For example: state packages search pandas lists the versions of pandas that are available.

    Run state pull after you add packages to sync you local project with the latest commit on the ActiveState Platform.

    For more information on managing packages, see the packages command.

Creating a project using the Dashboard

To create your account and project using the Dashboard:

  1. Navigate to and create an account if you don’t already have one, otherwise just sign in.
  2. Click the Projects tab and then click Build a Custom Runtime.
  3. Choose the language and operating systems to use.
  4. Add the packages to include in your project. You can search for packages individually, or use a requirements.txt file to add all of the required packages and versions at once.
  5. Click Commit Changes to build your project.

For more information on projects, see the Projects documentation.