Metadata-Version: 2.4
Name: apibeat
Version: 0.1.8
Summary: Benchmarking tool to compare REST and GraphQL API performance
Home-page: https://github.com/demonking15543/api-performance-monitor
Author: Vijay Rajpoot
Author-email: demonking15543@gmail.com
Keywords: api,benchmark,graphql,rest,latency,performance,cli
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# apibeat

**A simple CLI tool to benchmark and compare REST vs GraphQL API performance by measuring average latency.**



## Features

- Measure average latency of REST and GraphQL endpoints  
- Support custom HTTP methods (GET, POST, etc.) for REST  
- Accept GraphQL queries via CLI  
- Simple, clean CLI interface  
- Useful for API optimization and performance comparisons  

---

## Installation

### Install from PyPI

```bash
pip install apibeat
```

### Benchmark REST API with default GET method

```bash
 apibeat --url https://api.example.com/data

```

### Use a different HTTP method (REST)

```bash
apibeat --url https://api.example.com/data --method POST
```

### Use a different HTTP method (GraphQL Apis)

```bash
apibeat --type graphql --url https://api.example.com/graphql --query "{ users { id name } }"
```
## CLI Arguments

| Argument  | Description                                   | Required            | Default |
|-----------|-----------------------------------------------|---------------------|---------|
| `--url`   | The API endpoint URL to benchmark              | Yes                 | `NA`     |
| `--type`  | API type: `rest` or `graphql`                  | No                  | `rest`  |
| `--method`| HTTP method for REST requests                   | No (only for REST)  | `GET`   |
| `--query` | GraphQL query string (required if `--type graphql`) | Conditional         |  `NA`       |



For any questions or support, please open an issue or contact [demonking15543@gmail.com](mailto:demonking15543@gmail.com).
