WebhookServer#

API documentation for tradeexecutor.webhook.server.WebhookServer Python class in Trading Strategy framework.

class WebhookServer[source]#

Bases: StopableWSGIServer

Create a Waitress server that we can gracefully shut down.

https://docs.pylonsproject.org/projects/waitress/en/latest/

__init__(application, *args, **kwargs)#

Methods

__init__(application, *args, **kwargs)

accept()

accept_connections()

add_channel([map])

add_task(task)

bind(addr)

bind_server_socket()

close()

compact_traceback()

connect(address)

create(application, **kwargs)

Start a server to serve application.

create_socket([family, type])

del_channel([map])

fix_addr(addr)

getsockname()

handle_accept()

handle_accepted(sock, addr)

handle_close()

handle_connect()

handle_connect_event()

handle_error()

handle_expt()

handle_expt_event()

handle_read()

handle_read_event()

handle_write()

handle_write_event()

listen(num)

log(message)

log_info(message[, type])

maintenance(now)

Closes channels that have not had any activity in a while.

print_listen(format_str)

pull_trigger()

readable()

recv(buffer_size)

run()

Run the server

send(data[, do_close])

set_reuse_addr()

set_socket(sock[, map])

set_socket_options(conn)

shutdown([wait_gracefully])

Shutdown the server

wait([retries])

Wait until the server is started

wrapper(environ, start_response)

Wrap the wsgi application to override some path:

writable()

Attributes

accepting

addr

closing

connected

connecting

debug

ignore_log_types

in_connection_overflow

logger

next_channel_cleanup

was_shutdown

shutdown(wait_gracefully=3.0)[source]#

Shutdown the server