# Installation

### 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
