--- id: locust version: "2.46.3" license: MIT license_treatment: permissive maintenance: active --- # locust — Developer-friendly load testing framework License: permissive · Maintenance: active · Downloads: 14.1M/mo ## 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 above — 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 pip install locust uv add locust 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_current - Install friction: low - Maintenance: active - Downloads: 14.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags load testing framework, performance testing python, http load testing, distributed load testing, concurrent user simulation, stress testing tool, web service load test, load-testing, performance-testing, distributed-testing [View on SkillFed](https://skillfed.io/packages/locust) · [View on PyPI](https://pypi.org/project/locust/)