vimsheet.formula.functions.net_funcs

Network formula functions — @FETCH.

vimsheet.formula.functions.net_funcs.fn_fetch(url, refresh_seconds=None, json_path='')[source]

=@FETCH(url, [refresh_seconds], [json_path])

Fetches url in a background thread and returns the result. Returns #LOADING while the first request is in flight. Subsequent formula re-evals return the last cached value immediately.

url can be:

  • A plain URL:

    =FETCH("https://api.example.com/data")
    
  • A curl command string:

    =FETCH('curl -H "Authorization: Bearer $TOKEN"
      https://api.example.com/data', 60, "data.price")
    

    Environment variables ($VAR, ${VAR}) are resolved from the shell environment before the curl command is parsed.

refresh_seconds — optional float; re-fetches every N seconds (0 or omitted = one-shot) json_path — optional dot-notation path to extract from a JSON response

e.g. “data.price” or “items[0].name”

Parameters:
  • url (Any)

  • refresh_seconds (Any)

  • json_path (Any)

Return type:

Any