app
Utils for getting a fastapi proxy app.
The high-level API for fastapi_proxy_lib.fastapi.router.
            forward_http_app(client=None, *, follow_redirects=False, proxy_filter=None)
¶
    Fastapi app factory for forward http proxy.
Examples:
The same as ForwardHttpProxy.__init__.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                client
             | 
            
                  Optional[AsyncClient]
             | 
            
               refer to   | 
            
                  None
             | 
          
                follow_redirects
             | 
            
                  bool
             | 
            
               refer to   | 
            
                  False
             | 
          
                proxy_filter
             | 
            
                  Optional[ProxyFilterProto]
             | 
            
               refer to   | 
            
                  None
             | 
          
Source code in src/fastapi_proxy_lib/fastapi/app.py
              
            reverse_http_app(client=None, *, base_url, follow_redirects=False)
¶
    Fastapi app factory for reverse http proxy.
Examples:
The same as ReverseHttpProxy.__init__.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                client
             | 
            
                  Optional[AsyncClient]
             | 
            
               refer to   | 
            
                  None
             | 
          
                base_url
             | 
            
                  Union[URL, str]
             | 
            
               refer to   | 
            required | 
                follow_redirects
             | 
            
                  bool
             | 
            
               refer to   | 
            
                  False
             | 
          
Source code in src/fastapi_proxy_lib/fastapi/app.py
              
            reverse_ws_app(client=None, *, base_url, follow_redirects=False, max_message_size_bytes=DEFAULT_MAX_MESSAGE_SIZE_BYTES, queue_size=DEFAULT_QUEUE_SIZE, keepalive_ping_interval_seconds=DEFAULT_KEEPALIVE_PING_INTERVAL_SECONDS, keepalive_ping_timeout_seconds=DEFAULT_KEEPALIVE_PING_TIMEOUT_SECONDS)
¶
    Fastapi app factory for reverse ws proxy.
Examples:
The same as ReverseWebSocketProxy.__init__.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                client
             | 
            
                  Optional[AsyncClient]
             | 
            
               refer to   | 
            
                  None
             | 
          
                base_url
             | 
            
                  Union[URL, str]
             | 
            
               refer to   | 
            required | 
                follow_redirects
             | 
            
                  bool
             | 
            
               refer to   | 
            
                  False
             | 
          
                max_message_size_bytes
             | 
            
                  int
             | 
            
               refer to   | 
            
                  DEFAULT_MAX_MESSAGE_SIZE_BYTES
             | 
          
                queue_size
             | 
            
                  int
             | 
            
               refer to   | 
            
                  DEFAULT_QUEUE_SIZE
             | 
          
                keepalive_ping_interval_seconds
             | 
            
                  Union[float, None]
             | 
            
               refer to   | 
            
                  DEFAULT_KEEPALIVE_PING_INTERVAL_SECONDS
             | 
          
                keepalive_ping_timeout_seconds
             | 
            
                  Union[float, None]
             | 
            
               refer to   | 
            
                  DEFAULT_KEEPALIVE_PING_TIMEOUT_SECONDS
             |