You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

apitest-cli

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apitest-cli

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

0.1.0
pipPyPI
Maintainers
1

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.