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, andDELETErequests. - 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/Moataz0000/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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file restquest-1.2.2.tar.gz.
File metadata
- Download URL: restquest-1.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36405c469d3a5af0c2bc8d6dae08382c5685dc9ceb70bca91d3656eb952d7036
|
|
| MD5 |
97256e46b468ce4cc7aa88a0e496fc0d
|
|
| BLAKE2b-256 |
447a5b326e488da63262ecf8a43ef39cfa1aa4f9eeac8f550d653e3ced76b9bd
|
File details
Details for the file restquest-1.2.2-py3-none-any.whl.
File metadata
- Download URL: restquest-1.2.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da5bd7307d4264c10f5c50976813551efaddae5d6450fadc52ed953ec872dd23
|
|
| MD5 |
63fa255faaedb685ec00a02ee4540efc
|
|
| BLAKE2b-256 |
afe7719429cf5b743e3376189e2c897c2debaebf0e55f8507315331f3471bdf0
|