Installation, Upgrades & Removal
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
.
Production Package
For most developer scenarios, the production package will be the preferred solution.
Installing the stable release
Stable releases of FalconPy are available on the Python Package Index and are the default installation option.
Virtual environment installation using Poetry
poetry add crowdstrike-falconpy
Virtual environment installation using Pipenv
pipenv install crowdstrike-falconpy
Local installation
python3 -m pip install crowdstrike-falconpy
You may also call pip3
directly to perform an installation:
pip3 install crowdstrike-falconpy
Upgrading the stable release
Upgrading the package to the latest stable release follows a similar pattern.
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.
poetry update crowdstrike-falconpy
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.
pipenv update crowdstrike-falconpy
Upgrading your local environment
python3 -m pip install crowdstrike-falconpy --upgrade
or:
pip3 install crowdstrike-falconpy --upgrade
Installing the Bleeding Edge release
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.
Bleeding Edge installation using Poetry
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 yourpyproject.toml
file.
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.
poetry remove crowdstrike-falconpy
Then we add in the Bleeding Edge package.
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.
poetry remove crowdstrike-falconpy
Install the production package.
poetry add crowdstrike-falconpy
Bleeding Edge installation using Pipenv
You can specify the index you wish to install from using the --pypi-mirror
flag.
pipenv install --pypi-mirror https://test.pypi.org/simple crowdstrike-falconpy
Local installation
python3 -m pip install -i https://test.pypi.org/simple crowdstrike-falconpy
or:
pip3 install -i https://test.pypi.org/simple crowdstrike-falconpy
Upgrading to the Bleeding Edge release
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
You may use Poetry or Pipenv to upgrade to the latest Bleeding Edge release by following the installation procedure detailed above.
Local upgrades
To upgrade to the Bleeding Edge version you can use the following command:
python3 -m pip install -i https://test.pypi.org/simple crowdstrike-falconpy --upgrade
or:
pip3 install -i https://test.pypi.org/simple crowdstrike-falconpy --upgrade
Uninstalling and removing the package
Uninstalling and removing the FalconPy package entirely can be performed quickly regardless of your preferred solution.
Uninstalling from a virtual environment using Poetry
poetry remove crowdstrike-falconpy
Uninstalling from a virtual environment using Pipenv
pipenv uninstall crowdstrike-falconpy
Uninstalling locally
python3 -m pip uninstall crowdstrike-falconpy
or:
pip3 uninstall crowdstrike-falconpy
Please note: This will uninstall whichever version of FalconPy you have installed, bleeding edge or stable.
Development package
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.
Installing the development release
The development package can be installed to your local or virtual environment using the same commands.
Virtual environment installation using Poetry
poetry add crowdstrike-falconpy-dev
Virtual environment installation using Pipenv
pipenv install crowdstrike-falconpy-dev
Local installation
python3 -m pip install crowdstrike-falconpy-dev
You may also call pip3
directly to perform an installation:
pip3 install crowdstrike-falconpy-dev
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
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.
poetry update crowdstrike-falconpy-dev
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.
pipenv update crowdstrike-falconpy-dev
Upgrading your local environment
python3 -m pip install crowdstrike-falconpy-dev --upgrade
or
pip3 install crowdstrike-falconpy-dev --upgrade
Uninstalling and removing the development package
As before, uninstalling the development package is also a simple process.
Uninstalling from a virtual environment using Poetry
poetry remove crowdstrike-falconpy
Uninstalling from a virtual environment using Pipenv
pipenv uninstall crowdstrike-falconpy
Uninstalling locally
python3 -m pip uninstall crowdstrike-falconpy-dev
or:
pip3 uninstall crowdstrike-falconpy-dev