Skip to main content

A Python package to test API endpoints easily

Project description

restquest

Overview

restquest 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 restquest from PyPI:

pip install restquest

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.2.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.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: restquest-1.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 635905776d37a8b6215147dba05121fb3f147b47cfdc2ee1d88cd5b4682a3826
MD5 a908bce62b5336199da4e23de01da728
BLAKE2b-256 3fc85643a0ef24d57be30289ae55ecf2f1a47f46b31481c65a60ae84054f19f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: restquest-1.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08d2148cff776b30000b2b34fbef3979e60e652ab5735361f02b488b578ffbb7
MD5 e9e78d3c89b508d97340d79946211fb6
BLAKE2b-256 77d8004443e3bcde7e03227b612519fb64e22f65feb8ca526bfa7761ab12c83f

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