Skip to content

HFerrahoglu/apitest-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A lightweight CLI tool for testing HTTP APIs. Send GET/POST requests, save them, create reusable templates, search response content, and analyze sentiment on demand. Built with Python, featuring colorful outputs and JSON response storage.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages