Package: quaeso
██████╗ ██╗   ██╗ █████╗ ███████╗███████╗ ██████╗ 
██╔═══██╗██║   ██║██╔══██╗██╔════╝██╔════╝██╔═══██╗
██║   ██║██║   ██║███████║█████╗  ███████╗██║   ██║
██║▄▄ ██║██║   ██║██╔══██║██╔══╝  ╚════██║██║   ██║
╚██████╔╝╚██████╔╝██║  ██║███████╗███████║╚██████╔╝
 ╚══▀▀═╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚══════╝ ╚═════╝ 
---------------------------------------------------
python cli program to send requestsIs it just me or is curl a little too complicated?
Want something simpler in life? something made for humans? Try quaeso -- A Python program that reads a json/yml file for request data and sends the requestInstallationpip install this repo.
(Note: Incompatible with Python 2.x)pip3installquaeso(or)pipinstallquaesoUsage exampleTo get help with commandline argumentsquaeso--helpUsing Command-line Argumentsquaeso-f"some/folder/myrequest.yml"(or)quaeso-f"some/folder/myrequest.json"Colorize Outputquaeso-f"some/folder/myrequest.yml"-cDisclaimersometimes the quaeso command doesn't work in windows if the package is installed globally.to avoid this, install the package in a local virtual envfirst, create a envpython3-mvenvenv_for_quaesoactivate that env.\env_for_quaeso\Scripts\activateand then pip install. But you will have to activate that env everytime you want to use quaeso.IO Redirectionthe response is written to stdout and headers/status are written to stderr so that users can take IO redirection to their advantage. This works on windows, linux and mac.quaeso-f"some/folder/myrequest.yml">res.json2>res_headers.txtboth stdout and stderr can be redirected to the same filequaeso-f"some/folder/myrequest.yml">res.txt2>&1Sample request file (myrequest.yml)GETurl:https://cdn.animenewsnetwork.com/encyclopedia/api.xml?anime=4658method:getparams:offset:2limit:100headers:accept:text/xmlaccept-language:entimeout:5000File Download (quaeso -f "some/folder/myrequest.yml" > book.pdf)url:http://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdfmethod:getPOSTurl:https://jsonplaceholder.typicode.com/todos/method:POSTheaders:Authorization:Basic bXl1c2VybmFtZTpteXBhc3N3b3Jkcontent-type:application/jsondata:title:walk the dogcompleted:falsetimeout:5000PUTurl:https://jsonplaceholder.typicode.com/todos/1method:PUTheaders:content-type:application/jsondata:title:walk the dogcompleted:truetimeout:5000DELETEurl:https://jsonplaceholder.typicode.com/todos/1method:DELETEComplete request file with all available fields (myrequest.yml)method:XXX# (REQUIRED) GET, OPTIONS, HEAD, POST, PUT, PATCH, or DELETEurl:XXX# (REQUIRED) must be prefixed with http:// or https://params:# url query parameters. have as many as you likeoffset:0limit:10data:# data for POSTname:johnage:22hobbies:-running-eating-sleeping# you can also type data in json format instead of yamldata:|{"name": "john","age": 22,"hobbies": ["running", "eating", "sleeping"]}headers:# have as many as you likeContent-Type:application/jsonAuthorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5ccookies:# have as many as you likemycookie:cookievaluemyothercookie:othercookievaluetimeout:3.14# secondsallow_redirects:true# true or falseproxies:# have as many as you likehttp:http://10.10.1.10:3128https:https://10.10.1.11:1080ftp:ftp://10.10.1.10:3128# EITHER verify server's TLS certificate. true or falseverify:true# OR path to a CA bundle to useverify:some/folder/cacert.crt# EITHER path to single ssl client cert file (*.pem)cert:some/folder/client.pem# OR (*.cert), (*.key) pair.cert:-some/folder/client.cert-some/folder/client.keyDevelopment setupClone this repo and install packages listed in requirements.txtpip3install-rrequirements.txtMetaM. Zahash –zahash.z@gmail.comDistributed under the MIT license. SeeLICENSEfor more information.https://github.com/zahash/ContributingFork it (https://github.com/zahash/quaeso/fork)Create your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull Request