> For the complete documentation index, see [llms.txt](https://slush.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://slush.gitbook.io/docs/documentation/getting-started/installation.md).

# Installation

This guide will help you get up and running with Slush in just a few minutes.

### Install Slush

Install Slush using pip:

{% code overflow="wrap" %}

```bash
$ pip install slush
```

{% endcode %}

### Set Up a Virtual Environment (Recommended)

It’s a good practice to use a virtual environment to manage dependencies.

{% code overflow="wrap" %}

```bash
$ python -m venv venv
```

{% endcode %}

### Create a Simple Application

Create a new file called `main.py`:

{% code overflow="wrap" %}

```python
from slush.app import Slush

app = Slush()

@app.route("/hello", methods=["GET"])
def hello(request):
    return {"message": "Hello from Slush!"}
```

{% endcode %}

### Run the Development Server

Create a file named `run.py`:

{% code overflow="wrap" %}

```python
from main import app
from slush.server import run

run(app, port=8000, debug=True)
```

{% endcode %}

### Start the server

You have multiple options to get your project up and running.

{% stepper %}
{% step %}

### Use slush-cli to run the server

{% code overflow="wrap" %}

```bash
$ slush runserver main:app
```

{% endcode %}
{% endstep %}

{% step %}

### Turn off debugging mode when in production.

You can disable debug mode and auto-reloading by using the `--no-debug` flag:

{% code overflow="wrap" %}

```bash
$ slush runserver main:app --no-debug
```

{% endcode %}
{% endstep %}

{% step %}

### Use Gunicorn

{% code overflow="wrap" %}

```bash
$ gunicorn main:app
```

{% endcode %}
{% endstep %}

{% step %}

### Simply run the entrypoint file

{% code overflow="wrap" %}

```bash
$ python run.py
```

{% endcode %}
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://slush.gitbook.io/docs/documentation/getting-started/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
