A CLI app for performing RESTX operations via HTTP requests.
Project description
RESTX
Description
A Python CLI application for sending HTTP requests using different methods (GET, POST, PUT, PATCH, DELETE).
Installation
Using pip
pip install restx
Or using poetry
poetry add restx
Usage
HTTP GET (All Records)
restx get <url_with_endpoint>
# Example: restx get https://jsonplaceholder.typicode.com/posts/
HTTP GET (Read Single Record)
restx get <url_with_endpoint>
# Example: restx get https://jsonplaceholder.typicode.com/posts/54
HTTP POST (Create a Record)
restx post <url_with_endpoint> --payload '<payload json>'
# Example: restx post "https://jsonplaceholder.typicode.com/posts" --payload '{"userId": 12, "title": "test doc body"}'
HTTP PUT (Update a Record)
restx put <url_with_endpoint> --payload '<payload json>'
# Example: restx put "https://jsonplaceholder.typicode.com/posts" --payload '{"userId": 12, "title": "test doc body"}'
HTTP PATCH (Partial Update a Record)
restx patch <url_with_endpoint> --payload '<payload json>'
# Example: restx patch "https://jsonplaceholder.typicode.com/posts" --payload '{"title": "test doc body"}'
HTTP DELETE (Delete a Record)
restx delete <url_with_endpoint> --payload '<payload json>'
# Example: restx delete "https://jsonplaceholder.typicode.com/posts/23"
Contributions
Contributions are welcome! Please follow these guidelines:
- Submit bug reports or feature requests through the issue tracker.
- Set up a development environment by cloning the repository and installing dependencies.
License
This project is licensed under the MIT. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
restx-0.1.9.tar.gz
(3.6 kB
view hashes)
Built Distribution
restx-0.1.9-py3-none-any.whl
(5.4 kB
view hashes)