FAQ | This is a LIVE service | Changelog

Commits on Source 10

  • Hal Blackburn's avatar
    feat: add with_notes() to attach notes to Exceptions · 6553b02d
    Hal Blackburn authored
    In order to a) do it inline with raising, and b) do it pre 3.11 where
    Exception.add_note() does not exist.
    6553b02d
  • Hal Blackburn's avatar
    feat: implement flatten_json() · ee1bf543
    Hal Blackburn authored
    It flattens nested JSON trees into a single wide object.
    ee1bf543
  • Hal Blackburn's avatar
    02b1f24f
  • Hal Blackburn's avatar
    feat: add contextvar_activator() · 4b303264
    Hal Blackburn authored
    This function provides context managers to push values to a ContextVar
    within the body of a with-statement and automatically pop the value when
    it ends.
    4b303264
  • Hal Blackburn's avatar
    feat: add ExecutionInfo and related types · 723e87a0
    Hal Blackburn authored
    ExecutionInfo holds data to inform observers of the outcome of an event
    handler function's execution. It models the successful and unsuccessful
    outcomes of handling an event, which allows ucam_faas to communicate
    success/failure via HTTP response, to logs and to automated tests in a
    consistent way.
    
    It's extensible, so that function implementers can return their own
    subtypes to describe the specific results of their function and get the
    general outcome details that apply to any function automatically.
    723e87a0
  • Hal Blackburn's avatar
    test: add make_cloud_event() · 0bf9eb7f
    Hal Blackburn authored
    It has a type definition for CloudEvent attributes, to make creating
    test data more ergonomic.
    0bf9eb7f
  • Hal Blackburn's avatar
    feat: add handler executor functions · 211fb9f5
    Hal Blackburn authored
    The handler executor functions are the base level handlers to layer
    higher-level, (more specific) handlers on top of. This module's handlers
    support reporting function results from ExecutionInfo objects. The
    results are made available in 3 ways:
    
    - As HTTP responses to the HTTP request that triggered the event handler
    - As structured (JSON) log records
    - As the original ExecutionInfo value for unit tests (tests need not
      mock or use a full functions_framework server to run a function to
      test it)
    211fb9f5
  • Hal Blackburn's avatar
    feat: add execute_for_result() method to handlers · a93ffce7
    Hal Blackburn authored
    Like .execute(), this allows handler functions to be called directly
    with an input value, but execute_for_result() also performs the timing
    and logging that happens when handling real events.
    
    This allows handlers to be called for real, without converting the
    result into an HTTP response for functions_framework.
    a93ffce7
  • Hal Blackburn's avatar
    Merge branch '19-hlh-mr1-handler-executors' into 'main' · 765e346f
    Hal Blackburn authored
    High-level handlers MR1: Handler Executors
    
    Closes #31
    
    See merge request !49
    765e346f
  • lib-bot's avatar
    chore(release): 0.18.0 · 947846a0
    lib-bot authored
    947846a0
Loading
Loading