Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

restx

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restx

A CLI app for performing REST API CRUD operations via HTTP/HTTPS requests.

  • 0.1.14
  • PyPI
  • Socket score

Maintainers
1

RESTX

CI/CD

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 '<json payload>'
# 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 '<json payload>'
# 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 '<json payload>'
# Example: restx patch "https://jsonplaceholder.typicode.com/posts" --payload '{"title": "test doc body"}'
HTTP DELETE (Delete a Record)
restx delete <url_with_endpoint> --payload '<json payload>'
# Example: restx delete "https://jsonplaceholder.typicode.com/posts/23"
To provide custom Headers
restx <command> <url> --header '<json header>'
# Example:
# restx post https://jsonplaceholder.typicode.com/posts --payload '{"userId": 1, "id": 1, "title": "sunt aut facere, "body": "recusandae consequuntur expedita et"}' --header '{"Content-Type": "application/json"}'
For help
restx --help
restx <get|post|put|patch|delete> --help
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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc