# locust

> Developer-friendly load testing framework

- **URL**: https://www.freshcrate.ai/projects/locust
- **Author**: Jonatan Heyman
- **Category**: Frameworks
- **Latest version**: `2.44.1` (2026-06-01)
- **License**: MIT
- **Source**: https://github.com/locustio/locust
- **Homepage**: https://pypi.org/project/locust/
- **Language**: Python
- **GitHub**: 27,725 stars, 3,202 forks
- **Registry**: pypi (`locust`)
- **Tags**: `pypi`

## Description

# Locust

[![PyPI](https://img.shields.io/pypi/v/locust.svg)](https://pypi.org/project/locust/)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/locust?color=brightgreen)](https://pypi.org/project/locust/)
[![Downloads](https://static.pepy.tech/personalized-badge/locust?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/locust)
[![GitHub contributors](https://img.shields.io/github/contributors/locustio/locust.svg)](https://github.com/locustio/locust/graphs/contributors)
[![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine)

Locust is an open source performance/load testing tool for HTTP and other protocols. Its developer-friendly approach lets you define your tests in regular Python code.

Locust tests can be run from command line or using its web-based UI. Throughput, response times and errors can be viewed in real time and/or exported for later analysis.

You can import regular Python libraries into your tests, and with Locust's pluggable architecture it is infinitely expandable. Unlike when using most other tools, your test design will never be limited by a GUI or domain-specific language.

To get started right away, head over to the [documentation](http://docs.locust.io/en/stable/installation.html).

## Features

#### Write user test scenarios in plain old Python

If you want your users to loop, perform some conditional behaviour or do some calculations, you just use the regular programming constructs provided by Python. Locust runs every user inside its own greenlet (a lightweight process/coroutine). This enables you to write your tests like normal (blocking) Python code instead of having to use callbacks or some other mechanism. Because your scenarios are “just python” you can use your regular IDE, and version control your tests as regular code (as opposed to some other tools that use XML or binary formats)

```python
from locust import HttpUser, task, between

class QuickstartUser(HttpUser):
    wait_time = between(1, 2)

    def on_start(self):
        self.client.post("/login", json={"username":"foo", "password":"bar"})

    @task
    def hello_world(self):
        self.client.get("/hello")
        self.client.get("/world")

    @task(3)
    def view_item(self):
        for item_id in range(10):
            self.client.get(f"/item?id={item_id}", name="/item")
```

#### Distributed & Scalable - supports hundreds of thousands of users

Locust makes it easy to run load tests distributed over multiple machines. It is event-based (using [gevent](http://www.gevent.org/)), which makes it possible for a single process to handle many thousands concurrent users. While there may be other tools that are capable of doing more requests per second on a given hardware, the low overhead of each Locust user makes it very suitable for testing highly concurrent workloads.

#### Web-based UI

Locust has a user friendly web interface that shows the progress of your test in real-time. You can even change the load while the test is running. It can also be run without the UI, making it easy to use for CI/CD testing.

<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/bottlenecked-server-light.png" alt="Locust UI charts" height="100" width="200"/>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/bottlenecked-server-dark.png" alt="Locust UI charts" height="100" width="200"/>
<img src="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/bottlenecked-server-light.png" alt="Locust UI charts" height="100" width="200"/>
</picture>
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-running-statistics-light.png" alt="Locust UI stats" height="100" width="200"/>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-running-statistics-dark.png" alt="Locust UI stats" height="100" width="200"/>
<img src="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/webui-running-statistics-light.png" alt="Locust UI stats" height="100" width="200"/>
</picture>
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/locust-workers-light.png" alt="Locust UI workers" height="100" width="200"/>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/locust-workers-dark.png" alt="Locust UI workers" height="100" width="200"/>
<img src="https://raw.githubusercontent.com/locustio/locust/refs/heads/master/docs/images/locust-workers-lig

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `2.44.1` | 2026-06-01 | High | ## What's Changed * up pre-commit 3.xx to 4.xxx by @even-even in https://github.com/locustio/locust/pull/3412 * Add aiolocust and azure load testing to docs by @cyberw in https://github.com/locustio/locust/pull/3414 * docs: guard custom web routes without web UI by @puneetdixit200 in https://github.com/locustio/locust/pull/3416 * Add hostname, locustfile and profile to otel Resource by @cyberw in https://github.com/locustio/locust/pull/3420 * Add logging support to for OTEL by @cyberw in ht |
| `2.44.0` | 2026-05-11 | High | ## What's Changed * fix(fasthttp): catch FAILURE_EXCEPTIONS during response body read by @jorgetamayo21 in https://github.com/locustio/locust/pull/3397 * Fix FastHttpUser crash on Python 3.13+ due to GC collecting __dict__ reference cycle by @armorbreak001 in https://github.com/locustio/locust/pull/3398 * Add first seen / last seen timestamps to failure stats by @tugkanboz in https://github.com/locustio/locust/pull/3403 * fix(fasthttp): handle zlib.error for truncated gzip streams under high |
| `2.43.4` | 2026-04-21 | Low | Imported from PyPI (2.43.4) |
| `2.43.3` | 2026-02-12 | Low | ## What's Changed * Add missing event hook parameter documentation by @veeceey in https://github.com/locustio/locust/pull/3344 * Bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 in /locust/webui by @dependabot[bot] in https://github.com/locustio/locust/pull/3345 * Bump tar from 7.4.3 to 7.5.7 in /locust/webui by @dependabot[bot] in https://github.com/locustio/locust/pull/3346 * Bump cryptography from 43.0.3 to 46.0.5 by @dependabot[bot] in https://github.com/locustio/locust/pull/3347 * Bump |
| `2.43.2` | 2026-02-01 | Low | ## What's Changed * Update operator docs by @amadeuppereira in https://github.com/locustio/locust/pull/3333 * Bump sphinx-rtd-theme from 3.0.2 to 3.1.0 by @dependabot[bot] in https://github.com/locustio/locust/pull/3339 * Bump flask-cors from 6.0.1 to 6.0.2 by @dependabot[bot] in https://github.com/locustio/locust/pull/3343 * Bump hatch from 1.16.2 to 1.16.3 by @dependabot[bot] in https://github.com/locustio/locust/pull/3342 * Bump werkzeug from 3.1.4 to 3.1.5 by @dependabot[bot] in https:/ |
| `2.43.1` | 2026-01-12 | Low | Update various WebUI dependencies, no other changes.  ## What's Changed * Bump @emotion/styled from 11.14.0 to 11.14.1 in /locust/webui in the emotion group by @dependabot[bot] in https://github.com/locustio/locust/pull/3322 * Bump the eslint group in /locust/webui with 5 updates by @dependabot[bot] in https://github.com/locustio/locust/pull/3319 * Bump the all_dependencies group with 2 updates by @dependabot[bot] in https://github.com/locustio/locust/pull/3318 * Stabilize tests by @amadeu |
| `2.43.0` | 2025-12-30 | Low | Happy new year!  ## What's Changed * Bump glob from 10.4.5 to 10.5.0 in /locust/webui by @dependabot[bot] in https://github.com/locustio/locust/pull/3304 * Bump js-yaml from 4.1.0 to 4.1.1 in /locust/webui by @dependabot[bot] in https://github.com/locustio/locust/pull/3305 * Capture stacktrace on KeyboardInterrupt on greenlets by @amadeuppereira in https://github.com/locustio/locust/pull/3306 * Refactor parse_options by @andrewbaldwin44 in https://github.com/locustio/locust/pull/3310 * So |
| `2.42.6` | 2025-11-29 | Low | ## What's Changed * GH Actions: Bump actions/checkout from 5 to 6 in the all_dependencies group by @dependabot[bot] in https://github.com/locustio/locust/pull/3287 * Fix Toml Parser Being Called on Conf Files by @andrewbaldwin44 in https://github.com/locustio/locust/pull/3293 * Only log "OpenTelemetry enabled" message when success by @amadeuppereira in https://github.com/locustio/locust/pull/3294 * Add otel unit tests by @amadeuppereira in https://github.com/locustio/locust/pull/3295 * Log |
| `2.42.5` | 2025-11-20 | Low | ## What's Changed * Log when otel is enabled by @amadeuppereira in https://github.com/locustio/locust/pull/3284   **Full Changelog**: https://github.com/locustio/locust/compare/2.42.4...2.42.5 |
| `2.42.4` | 2025-11-20 | Low | ## What's Changed * Enables FURB ruff lint by @jairhenrique in https://github.com/locustio/locust/pull/3265 * Updates pytest dependency range by @jairhenrique in https://github.com/locustio/locust/pull/3263 * Allow multiple dropdown in Web UI by @jFompe in https://github.com/locustio/locust/pull/3261 * Includes npm and uv on dependabot file by @jairhenrique in https://github.com/locustio/locust/pull/3269 * Add OpenTelemetry support by @amadeuppereira in https://github.com/locustio/locust/pu |

## Citation

- HTML: https://www.freshcrate.ai/projects/locust
- Markdown: https://www.freshcrate.ai/projects/locust.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/locust/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
