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.1.tar.gz (4.9 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.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file apitest_cli-0.1.1.tar.gz.

File metadata

  • Download URL: apitest_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for apitest_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 418a3679cf46f0d61e48f973f7925ebaae7ee156d93e3eb1b1a5347c426e7d1a
MD5 656ea58dd9b7eab25e5a5d25eb233f5e
BLAKE2b-256 364e6d66e0714b32bb7b0da59d75e8ba282744378f5bf6b1250c2fcba9e88d3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apitest_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for apitest_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 743a457c79a2c48cedec60bcb85df7737df7776958c9ac2266f98d0394fada82
MD5 3e7ded1bb315abe68073bec2c012b196
BLAKE2b-256 c5c1a160735ae1a4b2d49b4dda31d47949f8396e26b720e7ce5081c91300ae57

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