Skip to main content

A Python package to test API endpoints easily

Project description

api-tester

Overview

api-tester is a command-line tool for testing REST API endpoints with various HTTP methods (GET, POST, PUT, PATCH, DELETE). It simplifies API testing by allowing developers to quickly send requests and view responses directly from the terminal.

Features

  • Supports GET, POST, PUT, PATCH, and DELETE requests.
  • User-friendly command-line interface.
  • Displays JSON responses in a readable format.
  • Custom headers and request body support.
  • Error handling and response status display.

Installation

You can install api-tester from PyPI:

pip install api-tester

Or install it locally in editable mode for development:

git clone https://github.com/yourusername/api-tester.git
cd api-tester
pip install -e .

Usage

Sending a GET request

api-tester GET https://jsonplaceholder.typicode.com/posts/1

Sending a POST request with JSON data

api-tester POST https://jsonplaceholder.typicode.com/posts -d '{"title": "Test Post", "body": "This is a test", "userId": 1}'

Sending a PUT request

api-tester PUT https://jsonplaceholder.typicode.com/posts/1 -d '{"title": "Updated Title"}'

Sending a DELETE request

api-tester DELETE https://jsonplaceholder.typicode.com/posts/1

Using custom headers

api-tester GET https://api.example.com/data -H 'Authorization: Bearer YOUR_TOKEN'

Contributing

Contributions are welcome! Feel free to fork the repository, create a new branch, and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Developed by Moataz Fawzy.

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

restquest-1.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

restquest-1.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file restquest-1.1.1.tar.gz.

File metadata

  • Download URL: restquest-1.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for restquest-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c8a3f77eb7d5ece32bbb843bd1b5435a1ee0d44d5f808e28885c91eefc801db8
MD5 0235ccaee5e4954cf5fbc61d7d7e66c4
BLAKE2b-256 9094a52940686b9895df3976367fc96dd2d03ec5e27a4ed6569440d85dca9317

See more details on using hashes here.

File details

Details for the file restquest-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: restquest-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for restquest-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90ef19797d1933e9ee801a2a9ba165a0d318a513f5c03f5931c7e1411e927a63
MD5 bc097535e6185c672104ea9f899f2dfe
BLAKE2b-256 7d8ecc4f622d69cb1be55990551beb2f70855d8480e7ab551cb9c57677a78acc

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