Skip to content

About

A Python tool to test REST APIs via the command line

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

API Tester Lite

A lightweight Python CLI tool for testing REST APIs — supports all major HTTP methods, custom headers, JSON request bodies, colour-coded responses, and response saving.

Built as a personal utility to speed up API validation during backend testing at SAP Labs, where daily work involved validating REST integrations across enterprise SAP systems.


Features

  • GET, POST, PUT, PATCH, DELETE support
  • Custom request headers (key:value pairs)
  • JSON request body for POST / PUT / PATCH
  • Colour-coded status codes — green (2xx), yellow (3xx), red (4xx/5xx)
  • Response timing (ms) and size (bytes)
  • Full response headers display
  • Save response to a JSON file

Installation

git clone https://github.com/DhwaniKariya/API_tester_lite.git
cd API_tester_lite
pip install requests

Usage

python api_tester.py

GET request

================================================
         API Tester Lite
================================================

Method [GET/POST/PUT/PATCH/DELETE]: GET
URL: https://jsonplaceholder.typicode.com/posts/1

Headers (key:value per line, blank line to finish):
  >

Sending GET -> https://jsonplaceholder.typicode.com/posts/1 ...

Status : 200
Time   : 143 ms
Size   : 292 bytes

Response Body:
{
  "userId": 1,
  "id": 1,
  "title": "sunt aut facere repellat provident occaecati",
  "body": "quia et suscipit..."
}

POST request with body and auth header

Method [GET/POST/PUT/PATCH/DELETE]: POST
URL: https://jsonplaceholder.typicode.com/posts

Headers (key:value per line, blank line to finish):
  > Authorization: Bearer your-token-here
  >

Request body (JSON, or press Enter to skip):
  > {"title": "test post", "body": "hello world", "userId": 1}

Status : 201
Time   : 91 ms
Size   : 65 bytes

Why I Built This

At SAP Labs, REST API validation was part of daily regression testing across enterprise integrations. Postman is powerful but slow to context-switch into during a test run. This tool lets you fire a request and inspect the full response without leaving the terminal — useful for quick validation, CI debugging, and log cross-referencing.


Author

Dhwani Kariya — MSc AI for Business, NCI Dublin | ex-SAP Labs Test Engineer

LinkedIn · GitHub

About

A Python tool to test REST APIs via the command line

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages