Skip to main content

A CLI tool for testing HTTP APIs with request saving, templates, and sentiment analysis.

Project description

API Test CLI

A command-line tool for testing HTTP APIs. Send requests, save them, create templates, search response content, and optionally analyze response sentiment.

Installation

pip install apitest-cli

Usage

Run apitest --help for a list of commands. Below are examples:

Send a GET Request

apitest get https://jsonplaceholder.typicode.com/posts

Search in Response

apitest get https://jsonplaceholder.typicode.com/posts --search "title"

Analyze Sentiment

apitest get https://jsonplaceholder.typicode.com/posts --analyze

Send a POST Request

apitest post https://jsonplaceholder.typicode.com/posts --data '{"title": "Hello", "body": "Test"}' --header "Content-Type: application/json"

Save a Request

apitest save myrequest

Replay a Saved Request

apitest replay myrequest

Create a Template

apitest template mytemplate --url https://jsonplaceholder.typicode.com/posts --method GET --header "Content-Type: application/json"

Use a Template

apitest use-template mytemplate

Features

  • Send GET/POST requests with custom headers and JSON data.
  • Save and replay requests.
  • Create and use request templates.
  • Search keywords in responses with highlighted results.
  • Optional sentiment analysis of response text (English only).
  • Responses saved as JSON files in responses/ directory.

Requirements

  • Python 3.8+
  • Install dependencies: pip install click requests rich textblob
  • Download TextBlob corpora (optional): python -m textblob.download_corpora

License

MIT

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

apitest-cli-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

apitest_cli-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file apitest-cli-0.1.0.tar.gz.

File metadata

  • Download URL: apitest-cli-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for apitest-cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff72f4a04fb4d0553d23371156be1739fd62803052f0462b88f6cbab3cccfbb1
MD5 19c517cac340aec7f6adbb2bbbe35295
BLAKE2b-256 145d2521018daea3a9404ed2ee1aa75009792d203139404dcbc4c1995349ac8e

See more details on using hashes here.

File details

Details for the file apitest_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: apitest_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for apitest_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cccf25f4af6ca444b21520cc2386681d4a5f40b31737a1d406521323b0680f3
MD5 9e8d4c0d2ac295671acd354d29b1d23c
BLAKE2b-256 4215483aeb4b97c3e96b0620ce000ed458e5638f1f44b053e2b3b4afd1d32468

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