Importing and managing requirements

Using the ActiveState Platform you can import and manage your requirements for your Python, Perl, or Ruby project by importing the specific requirements files directly into your project. The Platform supports the following requirements file formats:

Python projects

  • requirements.txt
  • pipfile
  • pipfile.lock
  • Pyproject.toml
  • Poetry.lock

Perl projects

  • cpan files
  • META.json files

Ruby projects

  • Gemfile.lock

In order for the import to be successful, the format of the requirement file must be associated with the matching language. The Platform parses each entry in your requirements list, validates the syntax, and identifies any issues. When the file is valid, the Platform attempts to match each package requirement with a package and version available.

Updating existing projects using requirement files

  1. Find the project you want to update in your Projects tab.
  2. Click Configuration.
  3. Click Import from File.
  4. Paste your requirements file into the area provided, or type in your requirements manually.
  5. Click Import.
  6. We recommend waiting for your dependencies to be resolved before clicking Save. Or you can Save immediately and begin your project build.
  7. You can monitor your build status from the Download Builds tab of your project’s page.
  8. Once the build completes successfully, you will be sent an email with directions to install your new runtime via the command line, or update the existing project using the state pull command.

requirements.txt file syntax (for Python Projects)

If you have an existing Python project that you want to add to the Platform, you can export a requirements.txt file to get a list of packages and versions to import into your Platform project, or you can type in the list of packages and versions manually. The syntax of the file must meet the following criteria:

  • You must specify one requirement per line.
  • You can specify just the package name and let the Platform choose the version each time a build is created. The Platform will choose the latest version unless a different version is required based on the other packages included in the project.
  • You can provide requirement specifiers for individual packages using the standard pip requirement specifier syntax shown in the table below:
Requirement specifierNameDescription
==Equal toAn exact match is required.

requests==2.18.4

>Greater thanUse any version greater than the specified version.

requests>2.18.4

>=Greater than or equal toUse any version greater than the specified version.

requests>=2.18.4

<Less thanUse any version less than the specified version.

requests<2.18.4

<=Less than or equal toUse any version less than or equal to the specified version.

requests<=2.18.4

~=Compatible versionUse any version greater than or equal to the specified version, but not greater than the current release series.

~=1.4.2 matches 1.4.2 through 1.4.9) but does not match 1.5.0



The following requirement specifier syntax is not applicable to the ActiveState Platform and is not supported:

  • Environment markers (e.g. MyProject ==5.4 ; python_version '2.7') are not supported. Instead, you should specify the appropriate package requirement specifier for your Platform project’s Python version.
  • Direct references (e.g. MyProject @ file:///somewhere/...) are not supported because all requirements for a Platform project must come from the Platform.