skillfed

locust

Developer-friendly load testing framework

locust v2.46.3 14.1M downloads/30d#1,250 on PyPI28,071
Permissive license MIT Active released

What it is and what it does

Locust is a developer-friendly load testing framework that lets you write performance tests in regular Python code rather than XML or domain-specific languages. Tests define user behavior using Python classes and decorators, with each simulated user running in its own lightweight greenlet (via gevent), enabling natural blocking-style code. The framework supports distributed testing across multiple machines to simulate concurrent users, and provides both a web-based UI for real-time monitoring and command-line execution for CI/CD integration.

You write test scenarios as Python code, import libraries freely, and leverage Locust's pluggable architecture to extend or adapt behavior. The framework can test HTTP services by default and is extensible to other protocols. Results—throughput, response times, errors—are viewable in real time and exportable for analysis. Its small, intentionally minimal codebase makes it easy to customize for specific use cases without being locked into a GUI or predefined patterns.

Use it for:

  • Simulate concurrent HTTP traffic to measure web service response times and throughput under load before production deployment.
  • Run distributed load tests across multiple machines to stress-test APIs with concurrent users.
  • Automate performance regression testing in CI/CD pipelines by running headless Locust tests and exporting results.
  • Test non-HTTP protocols or custom systems by writing a client in Python and plugging it into Locust's user model.
  • Monitor real-time test progress via the web UI and adjust load parameters mid-test without stopping the scenario.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Locust is a Python-based load testing framework that lets you write performance tests in regular Python code and run them against HTTP and other protocols, with real-time monitoring via a web UI or command line.

Yes. Locust is actively maintained, has no known vulnerabilities, installs with low friction, and is well-suited for teams that prefer writing tests in Python over GUI-based tools. The permissive MIT license removes legal friction. Install it if you need load testing with code-based test definition, distributed scaling, and real-time monitoring—especially for HTTP services or when you want to avoid proprietary testing platforms.

Install

locust on PyPI

pip

pip install locust

uv

uv add locust

poetry

poetry add locust

Installing locust

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release (13 days ago) and strong community engagement (28071 GitHub stars). Supports current Python versions (3.11–3.15).

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute Locust freely as long as you include the license notice.

Quickstart

pip install locust

from locust import HttpUser, task, between

class TestUser(HttpUser):
    wait_time = between(1, 2)
    
    @task
    def test_endpoint(self):
        self.client.get("/api/endpoint")

Requires Python 3.11 or later.

Verify before relying

  • Whether gevent-based concurrency model meets specific throughput or latency requirements for your workload.
  • Performance characteristics when scaling to hundreds of thousands of users.
  • Compatibility with custom protocol clients beyond HTTP.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 16 — configargparse, flask-cors, flask-login, flask, gevent, geventhttpclient, msgpack, psutil, pytest, python-engineio, python-socketio, pywin32, pyzmq, requests, typing-extensions, werkzeug
Maintenance actively maintained — 13 days since the last release
Last repo commit
First released
Downloads 14,055,255/month — #1,250 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: locust-2.46.3-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Topic :: Software Development :: TestingTopic :: Software Development :: Testing :: Traffic GenerationTopic :: System :: Distributed Computing

Tags

load testing frameworkperformance testing pythonhttp load testingdistributed load testingconcurrent user simulationstress testing toolweb service load test
load-testingperformance-testingdistributed-testing

More Testing packages