net Package

calendarevents Module

class stoqlib.net.calendarevents.CalendarEvents[source]

Bases: object

render_GET(resource)[source]

socketutils Module

socket utilities

stoqlib.net.socketutils.get_hostname()[source]
stoqlib.net.socketutils.get_random_port()[source]

server Module

Stoq server utilities

exception stoqlib.net.server.ServerError(message, code=None)[source]

Bases: exceptions.Exception

Base error for ServerProxy connection issues

class stoqlib.net.server.ServerProxy(timeout=30)[source]

Bases: object

Proxy to communicate with a Stoq Server instance

DEFAULT_TIMEOUT = 30
call(method, *args)[source]

Call a remote method on stoq server.

Parameters:
  • method – the method to call
  • args – extra args to pass to add to the call
Returns:

the response

Raises:

ServerError in case of errors

check_running()[source]

Call a remote method on stoq server.

Parameters:
  • method – the method to call
  • args – extra args to pass to add to the call
Returns:

the response

Raises:

ServerError in case of errors

webserver Module

stoqlib.net.webserver.run_server(port)[source]