Hisar is a fast Python-based load testing tool designed to test the performance and robustness of your APIs and web applications. With Hisar, simulate thousands of requests and evaluate system behavior under stress.
✨ Features
- Easy to Use: Simple, intuitive command-line interface for quick load tests.
- Highly Scalable: Test thousands of concurrent users.
- Real-Time Metrics: View request success rates, latency, and throughput.
- Customizable: Set custom headers, payloads, and authentication.
- Multi-Protocol Support: HTTP/HTTPS, WebSocket, gRPC, and more.
- Integration Ready: CI/CD integration for automated performance testing.
- Detailed Reporting: Generate performance reports in CSV, JSON, or HTML formats.
🚀 Quick Start
Installation
You can install Hisar via pip:
pip install hisar
Basic Usage
Run a basic load test with a specified number of users and request rate:
hisar -u 100 -n 10 --url https://example.com/api
-u: Number of concurrent users.-n: Requests per second.--url: The target URL to test.
Advanced Usage
Customize headers, payloads, and authentication for more complex tests:
hisar -u 500 -n 50 \
--headers '{"Authorization": "Bearer YOUR_TOKEN"}' \
--data '{"key": "value"}' \
https://example.com/api
📋 Generate Reports
Generate a detailed report after the test:
hisar -r html --output report.html https://example.com/api
- Supported formats:
csv,json,html.
🛠️ Configuration Options
Hisar offers a wide range of configuration options:
- Concurrency: Number of concurrent users.
- Request Rate: Number of requests per second.
- Timeout: Set request timeout.
- Authentication: Support for OAuth, Basic Auth, etc.
- Payloads: Support for JSON, form-data, and more.
- Custom Headers: Add custom request headers.
🧪 Example Test Scenarios
Scenario 1: Simple API Load Test
hisar -u 200 -n 20 https://api.yourservice.com/endpoint
Scenario 2: WebSocket Test
hisar -u 100 ws://yourservice.com/socket
Scenario 3: gRPC Test
hisar -u 50 --grpc https://grpc.yourservice.com/Service/Method
🎯 Use Cases
- API Performance Testing: Test RESTful or gRPC APIs under heavy load.
- WebSocket Testing: Simulate real-time connections at scale.
- Stress Testing: Push your service to its limits and identify breaking points.
- Automated Testing: Integrate into CI/CD pipelines to run automated performance tests.
💻 Contributing
We welcome contributions from the community! If you want to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature/your-feature). - Open a Pull Request.
See the CONTRIBUTING.md for more details.
📝 License
This project is licensed under the MIT License. See the LICENSE file for more details.
Metadata
Release files for hisar 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hisar-0.1.0.tar.gz | 9.1 kB | Without provenance | Details for hisar-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hisar-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hisar-0.1.0-py3-none-any.whl |
Total release size: 18.6 kB
Release files / hisar-0.1.0.tar.gz
| Download URL | hisar-0.1.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1bd0b9cfa007dfb42720ceaff1e9f6979d6275a61f39c233d0e52f61f59b5ebe
|
|
BLAKE2b-256 checksum How to use checksums |
397ea73b696f39eaa98224496323aa647796f11fb0f8fcaf16f87f98205e558d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
|
Release files / hisar-0.1.0-py3-none-any.whl
| Download URL | hisar-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2231ce218009adce4b977bfc90d44be54a5a152efc4ab8bda3fc6dae4418e13f
|
|
BLAKE2b-256 checksum How to use checksums |
1d267fde6e73226698940a8acf12cdd864bf1bf66c082ef9e2910682b088080d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
|
Security for hisar 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.