# Python

## pip

Download the [get-pip.py](https://bootstrap.pypa.io/get-pip.py)

```bash
# install pip
sudo python get-pip.py

# check pip
pip freeze
pip freeze | sort | column -t
```

## miniconda

```bash
# create new environment
conda create --name [env_name]

# activate the environment
conda activate [env_name]
```

## Framework

### Flask

#### Start an app

```python
// Some code
sudo sed -i 's/8080/5000/g' app.py; python app.py
```

### Django

### Gunicorn

<details>

<summary>Start app</summary>

```sh
# start python app with 3 workers
# myapp.py
gunicorn -w 3 myapp:app
```

</details>


---

# 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://mamawhocode.gitbook.io/devops/fundamentals/python.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.
