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

# Installing

The way to download smtp-py

Chạy lệnh sau để cài `smtp-py`:

```bash
python -m pip install smtp-py
```

### Xác thực (API key)

Tạo API key tại `https://smtp.dev/tokens/`.

Bạn có 2 cách cấu hình nhanh:

1. Truyền thẳng `api_key` khi khởi tạo `SMTPDevClient`.
2. Set biến môi trường `XAPIKEY` hoặc `X_API_KEY` (khuyến nghị).

{% code title=".env" %}

```env
XAPIKEY=your_api_key_here
```

{% endcode %}

Sau đó xem tiếp [Usage](/smtp-py/getting-started/usage.md).
