rc3


Namerc3 JSON
Version 0.0.10 PyPI version JSON
download
home_pagehttps://github.com/gswilcox01/rc3
SummaryRest CLI (rc)
upload_time2024-06-20 16:18:40
maintainerNone
docs_urlNone
authorGary Wilcox
requires_python>=3.12
licenseMIT License Copyright (c) 2024 Gary Wilcox Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords rest cli postman
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rc
rc = REST CLI  

rc is a tool to help execute REST API requests.  
rc is based on Collections, Environments and Requests.  Similar to the tool we all love/hate --- Postman.  

## Overview
* A Collection is a local directory (optionally checked in as a git repository somewhere).
* A Collection contains *.request files that each represent a single REST API Request that can be executed
* The output from executing a *.request file is normally:
    * The HTTP response body to standard out
    * A detailed *.response file saved in the same directory as the *.request file sent

## Installation & Upgrade
* Pre-reqs
    * Python 3.12+ (required)
    * VSCode (optional, but highly recommended)
* Install
    * pip install rc3
* Upgrade
    * pip install --upgrade rc3
* Windows User?
    * See:  [Windows Setup Issues](docs/WINDOWS_SETUP.md)

## Setup & Send your first request
* First create an empty directory somewhere (any name & location is fine)
  ```
  $ mkdir temp-collection
  $ cd temp-collection
  ```
* Next run "rc new" to create a new collection
  * Choose all default values, and you'll get an example collection you can explore
  ```
  $ rc new
  Enter a NAME for this COLLECTION [temp-collection]:
  Include example Requests in your new collection? [Y/n]:
  Importing collection into RC_HOME/rc-settings.json
  Collection 'temp-collection' has been successfully imported, try 'rc list' next...
  ```
* Next run "rc list" to see what's in the example collection you just created
  ```
  $ rc list
  Listing COLLECTIONS found in settings.json:
  NUM:   NAME:             LOCATION:                             
  1      example-rc        C:\git\example-rc
  2*     temp-collection   C:\temp-collection
  Listing ENVIRONMENTS found in current_collection:
  NUM:   NAME:       baseUrl:
  1*     dev         https://greetings-mvrsygo3gq-uc.a.run.app
  2      localhost   http://localhost:8080
  Listing REQUESTS found in current_collection:
  NUM:   FOLDER:             METHOD:   NAME:
  1*     /greetings-basic    GET       greeting
  2      /greetings-basic    GET       greetings
  3      /greetings-basic    POST      new-greeting
  4      /greetings-basic    DELETE    remove-greeting
  5      /greetings-basic    PUT       update-greeting
  6      /greetings-oauth2   GET       greeting
  7      /greetings-oauth2   POST      mint-admin-token
  8      /greetings-oauth2   POST      mint-token
  ```
* Next send the "greeting" request with the rc send command
  * Wait for it…
    * A greetings-demo project is running on Google Cloud Run
    * And it scales down to 0 instances when there is no demand (i.e. your first few requests will be SLOW…)  
  ```
  $ rc send greeting
  {                        
      "id": 1,             
      "text": "Hello",     
      "language": "English"
  }
  ```
* Next "cat" the generated greeting.response file that will have more verbose output from the send command
  ```
  $ cat greetings-basic/greeting.response
  {                                                                                     
    "status_code": 200,                                                               
    "time": "845.772ms",                                                              
    "size": {                                                                         
        "body": 44,                                                                   
        "headers": 442,                                                               
        "total": 486                                                                  
    },                                                                                
    "headers": {                                                                      
        "vary": "Origin,Access-Control-Request-Method,Access-Control-Request-Headers",
        "Date": "Wed, 08 May 2024 15:06:54 GMT",                                      
        "Server": "Google Frontend",
  
    ...
                                                    
  }
  ``` 

## Sending more requests from the example collection
* All the requests in the example collection can be sent to the greetings-demo app running on Google Cloud Run
* To view all requests in the example collection run "rc request --list"
  ```
  $ rc request --list
  Listing REQUESTS found in current_collection:
  NUM:   FOLDER:             METHOD:  NAME:              
  1*     /greetings-basic    GET      greeting
  2      /greetings-basic    GET      greetings
  3      /greetings-basic    POST     new-greeting
  4      /greetings-basic    DELETE   remove-greeting
  5      /greetings-basic    PUT      update-greeting
  6      /greetings-oauth2   GET      greeting
  7      /greetings-oauth2   POST     mint-admin-token
  8      /greetings-oauth2   POST     mint-token
  ```
* Try sending requests by NUMBER instead of by NAME using these commands:
  ```
  $ rc send 1
  $ rc send 2
  $ rc send 3
  ```
* Notes:
  * Make sure there is a greeting #8 before sending request 4, or you'll get a 404
  * Make sure you run request 7, before request 6, so you have a {{ token }} available in your global environment

## More command examples
* View all Collections, Environments, and Requests you have setup on this machine
    * rc list
* View all Requests for the current Collection (the following commands are equivalent):
    * rc list requests
    * rc list r
    * rc r
* Pick a new active request in the current collection (the following commands are equivalent):
    * rc request --pick new-greeting
    * rc request --pick 3
    * rc request 3
    * rc r 3
* View the definition of the active request:
    * rc request --info
    * rc r --info
    * rc r -i
* Send the current request (what you just picked)
    * rc send
* Edit the current request & send it UPON file close
    * rc send --edit
* Pick a new current request from a list & send it immediately
    * rc send --pick
* Pick a new current request (WITHOUT a list/prompt) & send it immediately
    * rc send --pick 7

## Working with files
* A common pattern might be to:
  * save a GET response
  * edit the JSON/response locally
  * then PUT/POST back to save or create a new record
* The "--file" option on the "rc send" command supports this flow
  * When the "--file" option is used you must pass a filename with the option
  * The contents of that filename will be used as the BODY of the request (overriding what's in the .request template)
* An example below using the example collection; uses a GET response as a template for a new POST request.
  ```
  $ rc send greeting > my.json
  $ vi my.json
  $ rc send new-greeting --file my.json 
  {
  "id": 6,
  "text": "Koar",
  "language": "Martian"
  }
  ```
* The "--file" option follows the convention of a "-" character for the filename represents STDIN
* Using this feature you can pipe the output of 1 request into another, example below
  ```
  $ rc send greeting | rc send new-greeting --file -
  {
      "id": 7,
      "text": "Hello",
      "language": "English"
  }
  ```
* If you wish to have file contents just override a portion of your .request template & not replace the entire BODY
  * see the #file helper function in the additional help document [Helper Functions](docs/HELPER_FUNCTIONS.md)

## Additional Commands
* For documentation on some more niche CLI commands See: [Additional Commands](docs/ADDITIONAL.md)
  * rc upgrade --- upgrades schemas & files in your collection
  * rc decode --- decodes/displays JWTs in your environment
  * rc keyring --- get/set/delete values in your OS keyring (Keychain, or Win Cred Locker)

## Viewing help
* View overall help and a list of all available sub-commands
    * rc
* View help for specific sub-commands
    * rc request --help
    * rc collection --help
    * rc environment --help

## Additional Concepts
## Import an existing collection from a git repo
* The example collection you created with the "rc new" command is also checked into a git repository here:
* https://github.com/gswilcox01/example-rc
* You can clone & import collections following the example below:
  ```
  $ git clone https://github.com/gswilcox01/example-rc.git
  Cloning into 'example-rc'...
  remote: Enumerating objects: 33, done.
  remote: Counting objects: 100% (33/33), done.
  remote: Compressing objects: 100% (17/17), done.
  remote: Total 33 (delta 14), reused 33 (delta 14), pack-reused 0
  Receiving objects: 100% (33/33), 4.87 KiB | 262.00 KiB/s, done.
  Resolving deltas: 100% (14/14), done.
  
  $ cd example-rc 
  
  $ rc import
  Importing collection into RC_HOME/rc-settings.json
  Collection 'example-rc' has been successfully imported, try 'rc list' next...
  ```

## Authentication
* Authentication can be defined in a Request, Folder, or in the collection.json file in the root of your collection
* Inheritance is walked until auth is defined, or the root of the collection is found in this order:
    * request > folder > parent folder > collection.json
* For examples of authentication see the following files in the example collection:
    * /greetings-basic/folder.json
    * /greetings-basic/greeting.request
    * /greetings-oauth2/mint-admin-token.request
    * /examples/example_Auth_Basic.request
    * /examples/example_Auth_Bearer.request
    * /examples/example_Auth_Token.request 

## Environment Variable substitution
* Similar to postman, env vars in handlebars will be replaced in request files before being sent.
* Example handlebar format:
    * {{ var_name }}
* Environments are searched in the following order for values:
  1. Current environment in collection
  2. Global environment in RC_HOME
  3. SHELL/OS ENVIRONMENT
* For examples of variable placeholders, see the following files in the example collection:
    * /greetings-basic/rc-folder.json
    * /greetings-oauth2/mint-admin-token.request

## Helper Functions
* Helper functions are similar to env var substitution, in that they use handlebar expressions that get replaced in your template
* A simple example is the #uuid helper function, which replaces the expression with a UUID
    * {{ #uuid }} 
* For more complete documentation on helper functions see: [Helper Functions](docs/HELPER_FUNCTIONS.md)
  * #uuid --- generates a new Type4 UUID
  * #pkce_cvcc --- generates a PKCE code_verifier & code_challenge
  * #prompt --- will prompt the user for input
  * #secure_prompt --- will prompt the user for input (that is masked on screen)
  * #keyring_prompt --- will read a value from your OS keyring, or secure prompt for a value 
  * #keyring --- will read a value from your OS keyring (Keychain or Win Cred Locker)
  * #file --- will inject '--file' option file contents into just a portion of your template

## Extracting values from a response:
* You can extract a value from any response and save it into the current or global Environment
* You can extract with either of:
  1. JsonPath (preferred)
  2. Python Regex
* For an example of each see the following files in the example collection:
  * /examples/example_Extract_JsonPath.request
  * /examples/example_Extract_Regex.request
* For an example of using multiple extracts on 1 request, and various "to" and "from" options see:
  * /examples/example_KitchenSink.request 
* Extract "from" options:
  * "body" --- will extract from the BODY of the response (this is the default)
  * "response" --- will extract from the verbose output saved to .response file
* Extract "to" options:
  * "current" --- will extract to the currently selected env
  * "global" --- will extract to the global env (this is the default)
  * "stdout" --- will replace the normal stdout, to just the extracted value(s)
  * "response" --- will extract to the verbose .response file that is generated
* Read more about Json Path here:
  * https://www.digitalocean.com/community/tutorials/python-jsonpath-examples
  * https://www.baeldung.com/guide-to-jayway-jsonpath
  * https://jsonpath.com/
* Read more about Python Regex here:
  * https://docs.python.org/3/howto/regex.html

## Settings:
* Settings are mostly only documented in the default settings.json file & the settings schema
* See: https://json.schemastore.org/rc3-settings-0.0.3.json
* Or after running "rc" for the first time see:
  * RC_HOME/rc-settings.json

## Proxies:
* rc leverages Python Requests defaults which honors these ENV VARS for proxy settings:
  * HTTP_PROXY
  * HTTPS_PROXY
  * NO_PROXY
  * ALL_PROXY
* NO_PROXY/Proxy Bypass:
  * Note:  IP addresses are not allowed/honored, and hostnames must be used
  * See: https://github.com/psf/requests/issues/4871
* See more info about Python Requests Proxies here:
  * https://requests.readthedocs.io/en/latest/user/advanced/#proxies

## CA certificates:
* By default rc will follow Python Requests default behaviour
  * Using the Python 'certifi' module truststore file
  * And verifying certs
* You can turn off cert verification in RC_HOME/settings.json with:
  * "ca_cert_verification": false,
* You can set a custom cert ca_bundle file in RC_HOME/settings.json with:
  * "ca_bundle": "/path/to/ca/bundlefile",
* You can alternatively set the path to a ca_bundle file with one of these ENV VARS:
  * REQUESTS_CA_BUNDLE
  * CURL_CA_BUNDLE
* For more details see:
  * https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification

## VSCode setup:
* Associate *.request & *.response files with the JSON editor
  * Open a file that needs mapping
  * CTRL + SHIFT + P
  * Choose "Change Language Mode"
  * Choose "Configure File Association for '.extension'"
  * Choose "JSON" from the list
				

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gswilcox01/rc3",
    "name": "rc3",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "rest, cli, postman",
    "author": "Gary Wilcox",
    "author_email": "gary@dugan-wilcox.com",
    "download_url": "https://files.pythonhosted.org/packages/4b/63/7f7e02f77255e5875dc9060aa58884bc4d190ced5b9c4ffe9596a2de8ca8/rc3-0.0.10.tar.gz",
    "platform": null,
    "description": "# rc\r\nrc = REST CLI  \r\n\r\nrc is a tool to help execute REST API requests.  \r\nrc is based on Collections, Environments and Requests.  Similar to the tool we all love/hate --- Postman.  \r\n\r\n## Overview\r\n* A Collection is a local directory (optionally checked in as a git repository somewhere).\r\n* A Collection contains *.request files that each represent a single REST API Request that can be executed\r\n* The output from executing a *.request file is normally:\r\n    * The HTTP response body to standard out\r\n    * A detailed *.response file saved in the same directory as the *.request file sent\r\n\r\n## Installation & Upgrade\r\n* Pre-reqs\r\n    * Python 3.12+ (required)\r\n    * VSCode (optional, but highly recommended)\r\n* Install\r\n    * pip install rc3\r\n* Upgrade\r\n    * pip install --upgrade rc3\r\n* Windows User?\r\n    * See:  [Windows Setup Issues](docs/WINDOWS_SETUP.md)\r\n\r\n## Setup & Send your first request\r\n* First create an empty directory somewhere (any name & location is fine)\r\n  ```\r\n  $ mkdir temp-collection\r\n  $ cd temp-collection\r\n  ```\r\n* Next run \"rc new\" to create a new collection\r\n  * Choose all default values, and you'll get an example collection you can explore\r\n  ```\r\n  $ rc new\r\n  Enter a NAME for this COLLECTION [temp-collection]:\r\n  Include example Requests in your new collection? [Y/n]:\r\n  Importing collection into RC_HOME/rc-settings.json\r\n  Collection 'temp-collection' has been successfully imported, try 'rc list' next...\r\n  ```\r\n* Next run \"rc list\" to see what's in the example collection you just created\r\n  ```\r\n  $ rc list\r\n  Listing COLLECTIONS found in settings.json:\r\n  NUM:   NAME:             LOCATION:                             \r\n  1      example-rc        C:\\git\\example-rc\r\n  2*     temp-collection   C:\\temp-collection\r\n  Listing ENVIRONMENTS found in current_collection:\r\n  NUM:   NAME:       baseUrl:\r\n  1*     dev         https://greetings-mvrsygo3gq-uc.a.run.app\r\n  2      localhost   http://localhost:8080\r\n  Listing REQUESTS found in current_collection:\r\n  NUM:   FOLDER:             METHOD:   NAME:\r\n  1*     /greetings-basic    GET       greeting\r\n  2      /greetings-basic    GET       greetings\r\n  3      /greetings-basic    POST      new-greeting\r\n  4      /greetings-basic    DELETE    remove-greeting\r\n  5      /greetings-basic    PUT       update-greeting\r\n  6      /greetings-oauth2   GET       greeting\r\n  7      /greetings-oauth2   POST      mint-admin-token\r\n  8      /greetings-oauth2   POST      mint-token\r\n  ```\r\n* Next send the \"greeting\" request with the rc send command\r\n  * Wait for it\u2026\r\n    * A greetings-demo project is running on Google Cloud Run\r\n    * And it scales down to 0 instances when there is no demand (i.e. your first few requests will be SLOW\u2026)  \r\n  ```\r\n  $ rc send greeting\r\n  {                        \r\n      \"id\": 1,             \r\n      \"text\": \"Hello\",     \r\n      \"language\": \"English\"\r\n  }\r\n  ```\r\n* Next \"cat\" the generated greeting.response file that will have more verbose output from the send command\r\n  ```\r\n  $ cat greetings-basic/greeting.response\r\n  {                                                                                     \r\n    \"status_code\": 200,                                                               \r\n    \"time\": \"845.772ms\",                                                              \r\n    \"size\": {                                                                         \r\n        \"body\": 44,                                                                   \r\n        \"headers\": 442,                                                               \r\n        \"total\": 486                                                                  \r\n    },                                                                                \r\n    \"headers\": {                                                                      \r\n        \"vary\": \"Origin,Access-Control-Request-Method,Access-Control-Request-Headers\",\r\n        \"Date\": \"Wed, 08 May 2024 15:06:54 GMT\",                                      \r\n        \"Server\": \"Google Frontend\",\r\n  \r\n    ...\r\n                                                    \r\n  }\r\n  ``` \r\n\r\n## Sending more requests from the example collection\r\n* All the requests in the example collection can be sent to the greetings-demo app running on Google Cloud Run\r\n* To view all requests in the example collection run \"rc request --list\"\r\n  ```\r\n  $ rc request --list\r\n  Listing REQUESTS found in current_collection:\r\n  NUM:   FOLDER:             METHOD:  NAME:              \r\n  1*     /greetings-basic    GET      greeting\r\n  2      /greetings-basic    GET      greetings\r\n  3      /greetings-basic    POST     new-greeting\r\n  4      /greetings-basic    DELETE   remove-greeting\r\n  5      /greetings-basic    PUT      update-greeting\r\n  6      /greetings-oauth2   GET      greeting\r\n  7      /greetings-oauth2   POST     mint-admin-token\r\n  8      /greetings-oauth2   POST     mint-token\r\n  ```\r\n* Try sending requests by NUMBER instead of by NAME using these commands:\r\n  ```\r\n  $ rc send 1\r\n  $ rc send 2\r\n  $ rc send 3\r\n  ```\r\n* Notes:\r\n  * Make sure there is a greeting #8 before sending request 4, or you'll get a 404\r\n  * Make sure you run request 7, before request 6, so you have a {{ token }} available in your global environment\r\n\r\n## More command examples\r\n* View all Collections, Environments, and Requests you have setup on this machine\r\n    * rc list\r\n* View all Requests for the current Collection (the following commands are equivalent):\r\n    * rc list requests\r\n    * rc list r\r\n    * rc r\r\n* Pick a new active request in the current collection (the following commands are equivalent):\r\n    * rc request --pick new-greeting\r\n    * rc request --pick 3\r\n    * rc request 3\r\n    * rc r 3\r\n* View the definition of the active request:\r\n    * rc request --info\r\n    * rc r --info\r\n    * rc r -i\r\n* Send the current request (what you just picked)\r\n    * rc send\r\n* Edit the current request & send it UPON file close\r\n    * rc send --edit\r\n* Pick a new current request from a list & send it immediately\r\n    * rc send --pick\r\n* Pick a new current request (WITHOUT a list/prompt) & send it immediately\r\n    * rc send --pick 7\r\n\r\n## Working with files\r\n* A common pattern might be to:\r\n  * save a GET response\r\n  * edit the JSON/response locally\r\n  * then PUT/POST back to save or create a new record\r\n* The \"--file\" option on the \"rc send\" command supports this flow\r\n  * When the \"--file\" option is used you must pass a filename with the option\r\n  * The contents of that filename will be used as the BODY of the request (overriding what's in the .request template)\r\n* An example below using the example collection; uses a GET response as a template for a new POST request.\r\n  ```\r\n  $ rc send greeting > my.json\r\n  $ vi my.json\r\n  $ rc send new-greeting --file my.json \r\n  {\r\n  \"id\": 6,\r\n  \"text\": \"Koar\",\r\n  \"language\": \"Martian\"\r\n  }\r\n  ```\r\n* The \"--file\" option follows the convention of a \"-\" character for the filename represents STDIN\r\n* Using this feature you can pipe the output of 1 request into another, example below\r\n  ```\r\n  $ rc send greeting | rc send new-greeting --file -\r\n  {\r\n      \"id\": 7,\r\n      \"text\": \"Hello\",\r\n      \"language\": \"English\"\r\n  }\r\n  ```\r\n* If you wish to have file contents just override a portion of your .request template & not replace the entire BODY\r\n  * see the #file helper function in the additional help document [Helper Functions](docs/HELPER_FUNCTIONS.md)\r\n\r\n## Additional Commands\r\n* For documentation on some more niche CLI commands See: [Additional Commands](docs/ADDITIONAL.md)\r\n  * rc upgrade --- upgrades schemas & files in your collection\r\n  * rc decode --- decodes/displays JWTs in your environment\r\n  * rc keyring --- get/set/delete values in your OS keyring (Keychain, or Win Cred Locker)\r\n\r\n## Viewing help\r\n* View overall help and a list of all available sub-commands\r\n    * rc\r\n* View help for specific sub-commands\r\n    * rc request --help\r\n    * rc collection --help\r\n    * rc environment --help\r\n\r\n## Additional Concepts\r\n## Import an existing collection from a git repo\r\n* The example collection you created with the \"rc new\" command is also checked into a git repository here:\r\n* https://github.com/gswilcox01/example-rc\r\n* You can clone & import collections following the example below:\r\n  ```\r\n  $ git clone https://github.com/gswilcox01/example-rc.git\r\n  Cloning into 'example-rc'...\r\n  remote: Enumerating objects: 33, done.\r\n  remote: Counting objects: 100% (33/33), done.\r\n  remote: Compressing objects: 100% (17/17), done.\r\n  remote: Total 33 (delta 14), reused 33 (delta 14), pack-reused 0\r\n  Receiving objects: 100% (33/33), 4.87 KiB | 262.00 KiB/s, done.\r\n  Resolving deltas: 100% (14/14), done.\r\n  \r\n  $ cd example-rc \r\n  \r\n  $ rc import\r\n  Importing collection into RC_HOME/rc-settings.json\r\n  Collection 'example-rc' has been successfully imported, try 'rc list' next...\r\n  ```\r\n\r\n## Authentication\r\n* Authentication can be defined in a Request, Folder, or in the collection.json file in the root of your collection\r\n* Inheritance is walked until auth is defined, or the root of the collection is found in this order:\r\n    * request > folder > parent folder > collection.json\r\n* For examples of authentication see the following files in the example collection:\r\n    * /greetings-basic/folder.json\r\n    * /greetings-basic/greeting.request\r\n    * /greetings-oauth2/mint-admin-token.request\r\n    * /examples/example_Auth_Basic.request\r\n    * /examples/example_Auth_Bearer.request\r\n    * /examples/example_Auth_Token.request \r\n\r\n## Environment Variable substitution\r\n* Similar to postman, env vars in handlebars will be replaced in request files before being sent.\r\n* Example handlebar format:\r\n    * {{ var_name }}\r\n* Environments are searched in the following order for values:\r\n  1. Current environment in collection\r\n  2. Global environment in RC_HOME\r\n  3. SHELL/OS ENVIRONMENT\r\n* For examples of variable placeholders, see the following files in the example collection:\r\n    * /greetings-basic/rc-folder.json\r\n    * /greetings-oauth2/mint-admin-token.request\r\n\r\n## Helper Functions\r\n* Helper functions are similar to env var substitution, in that they use handlebar expressions that get replaced in your template\r\n* A simple example is the #uuid helper function, which replaces the expression with a UUID\r\n    * {{ #uuid }} \r\n* For more complete documentation on helper functions see: [Helper Functions](docs/HELPER_FUNCTIONS.md)\r\n  * #uuid --- generates a new Type4 UUID\r\n  * #pkce_cvcc --- generates a PKCE code_verifier & code_challenge\r\n  * #prompt --- will prompt the user for input\r\n  * #secure_prompt --- will prompt the user for input (that is masked on screen)\r\n  * #keyring_prompt --- will read a value from your OS keyring, or secure prompt for a value \r\n  * #keyring --- will read a value from your OS keyring (Keychain or Win Cred Locker)\r\n  * #file --- will inject '--file' option file contents into just a portion of your template\r\n\r\n## Extracting values from a response:\r\n* You can extract a value from any response and save it into the current or global Environment\r\n* You can extract with either of:\r\n  1. JsonPath (preferred)\r\n  2. Python Regex\r\n* For an example of each see the following files in the example collection:\r\n  * /examples/example_Extract_JsonPath.request\r\n  * /examples/example_Extract_Regex.request\r\n* For an example of using multiple extracts on 1 request, and various \"to\" and \"from\" options see:\r\n  * /examples/example_KitchenSink.request \r\n* Extract \"from\" options:\r\n  * \"body\" --- will extract from the BODY of the response (this is the default)\r\n  * \"response\" --- will extract from the verbose output saved to .response file\r\n* Extract \"to\" options:\r\n  * \"current\" --- will extract to the currently selected env\r\n  * \"global\" --- will extract to the global env (this is the default)\r\n  * \"stdout\" --- will replace the normal stdout, to just the extracted value(s)\r\n  * \"response\" --- will extract to the verbose .response file that is generated\r\n* Read more about Json Path here:\r\n  * https://www.digitalocean.com/community/tutorials/python-jsonpath-examples\r\n  * https://www.baeldung.com/guide-to-jayway-jsonpath\r\n  * https://jsonpath.com/\r\n* Read more about Python Regex here:\r\n  * https://docs.python.org/3/howto/regex.html\r\n\r\n## Settings:\r\n* Settings are mostly only documented in the default settings.json file & the settings schema\r\n* See: https://json.schemastore.org/rc3-settings-0.0.3.json\r\n* Or after running \"rc\" for the first time see:\r\n  * RC_HOME/rc-settings.json\r\n\r\n## Proxies:\r\n* rc leverages Python Requests defaults which honors these ENV VARS for proxy settings:\r\n  * HTTP_PROXY\r\n  * HTTPS_PROXY\r\n  * NO_PROXY\r\n  * ALL_PROXY\r\n* NO_PROXY/Proxy Bypass:\r\n  * Note:  IP addresses are not allowed/honored, and hostnames must be used\r\n  * See: https://github.com/psf/requests/issues/4871\r\n* See more info about Python Requests Proxies here:\r\n  * https://requests.readthedocs.io/en/latest/user/advanced/#proxies\r\n\r\n## CA certificates:\r\n* By default rc will follow Python Requests default behaviour\r\n  * Using the Python 'certifi' module truststore file\r\n  * And verifying certs\r\n* You can turn off cert verification in RC_HOME/settings.json with:\r\n  * \"ca_cert_verification\": false,\r\n* You can set a custom cert ca_bundle file in RC_HOME/settings.json with:\r\n  * \"ca_bundle\": \"/path/to/ca/bundlefile\",\r\n* You can alternatively set the path to a ca_bundle file with one of these ENV VARS:\r\n  * REQUESTS_CA_BUNDLE\r\n  * CURL_CA_BUNDLE\r\n* For more details see:\r\n  * https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification\r\n\r\n## VSCode setup:\r\n* Associate *.request & *.response files with the JSON editor\r\n  * Open a file that needs mapping\r\n  * CTRL + SHIFT + P\r\n  * Choose \"Change Language Mode\"\r\n  * Choose \"Configure File Association for '.extension'\"\r\n  * Choose \"JSON\" from the list\r\n\t\t\t\t\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Gary Wilcox  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Rest CLI (rc)",
    "version": "0.0.10",
    "project_urls": {
        "Homepage": "https://github.com/gswilcox01/rc3",
        "repository": "https://github.com/gswilcox01/rc3"
    },
    "split_keywords": [
        "rest",
        " cli",
        " postman"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a10db5f344a55499cc9dd6da7a944907f0425e348e9d391469842c4bf15cb49",
                "md5": "acd79ab39389a87b56473ccf3f1b064f",
                "sha256": "16920677210e9db42514d5e4194bcd6b9f45c06cd9151312728283e74094f649"
            },
            "downloads": -1,
            "filename": "rc3-0.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "acd79ab39389a87b56473ccf3f1b064f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 59155,
            "upload_time": "2024-06-20T16:18:38",
            "upload_time_iso_8601": "2024-06-20T16:18:38.517649Z",
            "url": "https://files.pythonhosted.org/packages/8a/10/db5f344a55499cc9dd6da7a944907f0425e348e9d391469842c4bf15cb49/rc3-0.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b637f7e02f77255e5875dc9060aa58884bc4d190ced5b9c4ffe9596a2de8ca8",
                "md5": "fe641138a32685355176913c700a0d58",
                "sha256": "dc72092cce7e21acbe0a4cf93bdb71e5ae2d936bc0ad6198df3d56c37fe8df7e"
            },
            "downloads": -1,
            "filename": "rc3-0.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "fe641138a32685355176913c700a0d58",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 58205,
            "upload_time": "2024-06-20T16:18:40",
            "upload_time_iso_8601": "2024-06-20T16:18:40.701075Z",
            "url": "https://files.pythonhosted.org/packages/4b/63/7f7e02f77255e5875dc9060aa58884bc4d190ced5b9c4ffe9596a2de8ca8/rc3-0.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-20 16:18:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gswilcox01",
    "github_project": "rc3",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "rc3"
}
        
Elapsed time: 0.26956s