Skip to content

Installation

FalconPy leverages the Python Package Index for distribution, making installation and maintenance easy. There are two packages for FalconPy, the production package crowdstrike-falconpy (also referred to as the ‘stable release’), and the development package crowdstrike-falconpy-dev.

For most developer scenarios, the production package will be the preferred solution.

Stable releases of FalconPy are available on the Python Package Index and are the default installation option.

Virtual environment installation using Poetry

Section titled “Virtual environment installation using Poetry”
Terminal window
poetry add crowdstrike-falconpy

Virtual environment installation using Pipenv

Section titled “Virtual environment installation using Pipenv”
Terminal window
pipenv install crowdstrike-falconpy
Terminal window
python3 -m pip install crowdstrike-falconpy

You may also call pip3 directly to perform an installation:

Terminal window
pip3 install crowdstrike-falconpy

Upgrading the package to the latest stable release follows a similar pattern.

Upgrading in a virtual environment using Poetry

Section titled “Upgrading in a virtual environment using Poetry”

Updates are performed as dictated by the contents of your pyproject.toml file. If this file is pinned to a specific version, the following command will have no effect.

Terminal window
poetry update crowdstrike-falconpy

Upgrading in a virtual environment using Pipenv

Section titled “Upgrading in a virtual environment using Pipenv”

Updates are performed as dictated by the contents of your Pipfile. If this file is pinned to a specific version, the following command will have no effect.

Terminal window
pipenv update crowdstrike-falconpy
Terminal window
python3 -m pip install crowdstrike-falconpy --upgrade

or:

Terminal window
pip3 install crowdstrike-falconpy --upgrade

The Bleeding Edge release is the latest release of the production package after new changes but prior to the release of this package to the production index. The period of time between the Bleeding Edge release and the production release is referred to as soak time and typically lasts for a few days to a week. If you’d like to try the Bleeding Edge version of the stable release, you will need to use the PyPI test index.

In order to install the Bleeding Edge release, you will need to add the test index to your pyproject.toml file.

PLEASE NOTE: The source command is available in Poetry v1.2.0+. For scenarios where you are unable to the upgrade to the latest version of Poetry, these changes will need to be manually implemented within your pyproject.toml file.

Terminal window
poetry source add -s testpypi https://test.pypi.org/simple/

This will add the following to your pyproject.toml file.

[[tool.poetry.source]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
default = false
secondary = true

Once the test index is enabled for your project, you can update the crowdstrike-falconpy package using this new index.

First we remove the production package.

Terminal window
poetry remove crowdstrike-falconpy

Then we add in the Bleeding Edge package.

Terminal window
poetry add --source testpypi crowdstrike-falconpy

This will update your pyproject.toml file as follows.

crowdstrike-falconpy = {version = "^1.x.x", source = "testpypi"}

When you have completed testing and want to swap back to the production package, you can revert these changes quickly.

Remove the Bleeding Edge package.

Terminal window
poetry remove crowdstrike-falconpy

Install the production package.

Terminal window
poetry add crowdstrike-falconpy

You can specify the index you wish to install from using the --pypi-mirror flag.

Terminal window
pipenv install --pypi-mirror https://test.pypi.org/simple crowdstrike-falconpy
Terminal window
python3 -m pip install -i https://test.pypi.org/simple crowdstrike-falconpy

or:

Terminal window
pip3 install -i https://test.pypi.org/simple crowdstrike-falconpy

This package is updated as part of our regular build cycle, you may move to the Bleeding Edge release at any time and maintain it in your environment exactly as you would the stable release.

Using Poetry or Pipenv to upgrade to the Bleeding Edge release

Section titled “Using Poetry or Pipenv to upgrade to the Bleeding Edge release”

You may use Poetry or Pipenv to upgrade to the latest Bleeding Edge release by following the installation procedure detailed above.

To upgrade to the Bleeding Edge version you can use the following command:

Terminal window
python3 -m pip install -i https://test.pypi.org/simple crowdstrike-falconpy --upgrade

or:

Terminal window
pip3 install -i https://test.pypi.org/simple crowdstrike-falconpy --upgrade

Uninstalling and removing the FalconPy package entirely can be performed quickly regardless of your preferred solution.

Uninstalling from a virtual environment using Poetry

Section titled “Uninstalling from a virtual environment using Poetry”
Terminal window
poetry remove crowdstrike-falconpy

Uninstalling from a virtual environment using Pipenv

Section titled “Uninstalling from a virtual environment using Pipenv”
Terminal window
pipenv uninstall crowdstrike-falconpy
Terminal window
python3 -m pip uninstall crowdstrike-falconpy

or:

Terminal window
pip3 uninstall crowdstrike-falconpy

Please note: This will uninstall whichever version of FalconPy you have installed, bleeding edge or stable.


The FalconPy development package (crowdstrike-falconpy-dev) is released from the dev branch as part of the code review and testing process. New library functionality and changes will be released to the development package prior to the production package and are available for pre-release testing.

NOTE: The development package uses a different module name, falconpydev. You will need to update your import to match.

The development package can be installed to your local or virtual environment using the same commands.

Virtual environment installation using Poetry

Section titled “Virtual environment installation using Poetry”
Terminal window
poetry add crowdstrike-falconpy-dev

Virtual environment installation using Pipenv

Section titled “Virtual environment installation using Pipenv”
Terminal window
pipenv install crowdstrike-falconpy-dev
Terminal window
python3 -m pip install crowdstrike-falconpy-dev

You may also call pip3 directly to perform an installation:

Terminal window
pip3 install crowdstrike-falconpy-dev

Upgrading to the most recent development release

Section titled “Upgrading to the most recent development release”

You can upgrade to the latest release by installing updates via the Python Package Index.

Upgrading in a virtual environment using Poetry

Section titled “Upgrading in a virtual environment using Poetry”

Updates are performed as dictated by the contents of your pyproject.toml file. If this file is pinned to a specific version, the following command will have no effect.

Terminal window
poetry update crowdstrike-falconpy-dev

Upgrading in a virtual environment using Pipenv

Section titled “Upgrading in a virtual environment using Pipenv”

Updates are performed as dictated by the contents of your Pipfile. If this file is pinned to a specific version, the following command will have no effect.

Terminal window
pipenv update crowdstrike-falconpy-dev
Terminal window
python3 -m pip install crowdstrike-falconpy-dev --upgrade

or

Terminal window
pip3 install crowdstrike-falconpy-dev --upgrade

Uninstalling and removing the development package

Section titled “Uninstalling and removing the development package”

As before, uninstalling the development package is also a simple process.

Uninstalling from a virtual environment using Poetry

Section titled “Uninstalling from a virtual environment using Poetry”
Terminal window
poetry remove crowdstrike-falconpy

Uninstalling from a virtual environment using Pipenv

Section titled “Uninstalling from a virtual environment using Pipenv”
Terminal window
pipenv uninstall crowdstrike-falconpy
Terminal window
python3 -m pip uninstall crowdstrike-falconpy-dev

or:

Terminal window
pip3 uninstall crowdstrike-falconpy-dev
Page Updated: v1.3.2