Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

oci-tech/oci_function_zipcode_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

oci_function_zipcode_python

Source Files

1. Function Script

  • Name: func.py, func.yaml, requirements.txt

2. Shell script

  • Name: call_func_zipcode.sh
  • Parameter: Japan Zipcode (One 7-digit number)
  • Location: the client from where you want to call function via API Gateway Endpoint

3. JSON File

  • Name: zipcode-jp.json
  • Encode: UTF-8
  • Location: OCI Object Storage

How to invoke

1. From OCI Cloud Shell or Oracle Linux client

  • Command: call_oci_func_zipcode.sh <JP_Zipcode>
  • Example: call_oci_func_zipcode.sh 1070061
  • Output: {"zipcode": "1070061","address1": "東京都","address2": "港区","address3": "北青山"}

2. From Windows PowerShell (Enclose arguments in SINGLE quotes)

  • Command: curl.exe -k -X GET https://<Endpoint_URL> -d '{\"zipcode\": \"1070061\"}'

3. From Windows Command Prompt (Enclose arguments in DOUBLE quotes)

  • Command: curl -k -X GET https://<Endpoint_URL> -d "{\"zipcode\": \"1070061\"}"

4. From the client that the OCI function is created

  • Command: echo -n '{"zipcode":"1070061"}' | fn invoke <App_Name> <Func_Name>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published