> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AppSignal for Python: Install

> Command-line tool to install AppSignal in a Python application. Documentation on usage, options and configuration methods.

export const VersionRequirements = ({versions = []}) => {
  if (!Array.isArray(versions) || versions.length === 0) {
    return null;
  }
  const boundaries = {
    upper: " or lower",
    exact: "",
    lower: " or higher"
  };
  const containerStyle = {
    marginTop: "0.5rem",
    marginBottom: "1.5rem"
  };
  const lineStyle = {
    display: "block",
    margin: "0 0 0.35rem 0",
    fontSize: "0.875rem",
    lineHeight: "1.4"
  };
  const pillBaseStyle = {
    display: "inline-block",
    padding: "0.1em 0.4em",
    borderRadius: "0.25rem",
    border: "1px solid",
    fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
    fontSize: "0.85em",
    fontWeight: 500
  };
  const pillColors = {
    "AppSignal for Elixir": {
      background: "#f3e8ff",
      borderColor: "#e9d5ff",
      color: "#9333ea"
    },
    "AppSignal for Front-end": {
      background: "#fef9c3",
      borderColor: "#fde68a",
      color: "#ca8a04"
    },
    "AppSignal for Go": {
      background: "#ccfbf1",
      borderColor: "#99f6e4",
      color: "#0d9488"
    },
    "AppSignal for JavaScript": {
      background: "#fef9c3",
      borderColor: "#fde68a",
      color: "#ca8a04"
    },
    "AppSignal for Node.js": {
      background: "#dcfce7",
      borderColor: "#bbf7d0",
      color: "#16a34a"
    },
    "AppSignal for Python": {
      background: "#dbeafe",
      borderColor: "#bfdbfe",
      color: "#2563eb"
    },
    "AppSignal for Ruby": {
      background: "#fee2e2",
      borderColor: "#fecaca",
      color: "#dc2626"
    },
    "AppSignal for Rust": {
      background: "#ffedd5",
      borderColor: "#fed7aa",
      color: "#ea580c"
    }
  };
  const defaultPillColor = {
    background: "#f4f4f5",
    borderColor: "#e4e4e7",
    color: "#52525b"
  };
  const getPillStyle = name => ({
    ...pillBaseStyle,
    ...pillColors[name] || defaultPillColor
  });
  const getBoundText = bound => {
    return boundaries[bound] || boundaries.lower;
  };
  return <div style={containerStyle}>
      {versions.map((v, i) => <p key={`${v.name}-${v.version}-${v.bound || "lower"}-${i}`} style={lineStyle}>
          This feature requires{" "}
          <code style={getPillStyle(v.name)}>{v.name}</code> version {v.version}
          {getBoundText(v.bound)}.
        </p>)}
    </div>;
};

<VersionRequirements
  versions={[
{ name: "AppSignal for Python", version: "0.1.0" }
]}
/>

The documentation tells you everything you need to know about installing AppSignal via the command-line tool.

## Description

The command-line tool helps with setting up the configuration for your application. Integration with Python applications may require additional steps, because the AppSignal installer does not know how your application is set up. We recommend you our [installation guide](/guides/new-application) when adding a new application to AppSignal and follow the steps per framework in our [integrations documentation](/python/instrumentations/).

Once the installation is complete, the [demo tool command](/python/command-line/demo) is run automatically to verify that the installation was successful. The demo tool command sends sample data from your application to the AppSignal servers, which helps you verify that everything is working properly.

## Configuration methods

There are two configuration methods provided by the command-line installer:

1. [Configuration via a configuration file](#1-configuration-file)
2. [Configuration via environment variables](#2-environment-variables).

### 1. Configuration file

AppSignal can be configured via a configuration file called `__appsignal__.py`, located in the root directory of your application. When chosing this option our installer will write your configuration to this file.

When configuring your AppSignal integration via the configuration file, the Push API key you provide to the installer will be written into the `__appsignal__.py` configuration file. We do not recommend adding this key to version control systems such as Git, SVN or Mercurial. Instead, use the `APPSIGNAL_PUSH_API_KEY` environment variable to store your API key.

You can read more about configuring your application in our [configuration documentation](/python/configuration).

### 2. Environment variables

AppSignal can be configured through system environment variables. If you select this option, no [configuration file](#1-configuration-file) will be generated.

You can read more about configuring your application in our [configuration documentation](/python/configuration).

## Usage

To install appsignal via the command-line, navigate to your project directory and run the following command:

<CodeGroup>
  ```bash Bash theme={null}
  python -m appsignal install --push-api-key <Push API key>
  # For example
  python -m appsignal install --push-api-key 1234-1234-1234-1234
  ```
</CodeGroup>

Your application's "Push API key" will be displayed in the [installation wizard](https://appsignal.com/redirect-to/organization?to=sites/new) and is also available in the administration section of your organization's settings, or via [this link](https://appsignal.com/redirect-to/organization?to=admin/api_keys).

## Available Options

| Option         | Usage                              | Description                                                |
| -------------- | ---------------------------------- | ---------------------------------------------------------- |
| `push-api-key` | `--push-api-key=<Push API key>`    | Set the Push API key used to authenticate the application. |
| `application`  | `--application=<application name>` | Set the name of the reported application.                  |
