Skip to main content

Benchmarking tool to compare REST and GraphQL API performance

Project description

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

pip install apibeat

Benchmark REST API with default GET method

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

Use a different HTTP method (REST)

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apibeat-0.1.7.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apibeat-0.1.7-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file apibeat-0.1.7.tar.gz.

File metadata

  • Download URL: apibeat-0.1.7.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for apibeat-0.1.7.tar.gz
Algorithm Hash digest
SHA256 beda9f33ed637f5dc51ca604d6894ba5d7dbfadc24896996bd22e3485c2c3f9a
MD5 84a33e0295ab3eff08444be7881f6510
BLAKE2b-256 fb5b619bbf18fd7bd1970674d39de6db2969312fb95e23148faddf1a69c73d5f

See more details on using hashes here.

File details

Details for the file apibeat-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: apibeat-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for apibeat-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9aa8c224721fef8973ba5d3ce454fd12554bc67c25d145102aebc018235c6656
MD5 d4b8479550b5bc68d2246ca80eb9610b
BLAKE2b-256 b2afb2beaa04389efcf012d103121ec1fb00c078a3bc017dba22154bbd8fc88a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page