pypnusershub.utils

Module Contents

Functions

binary_resource_stream(resource, locations)

Return a resource from this path or package

text_resource_stream(path, locations[, encoding, ...])

Return a resource from this path or package. Transparently decode the stream.

get_current_app_id()

get_cookie_path(→ str)

Returns the cookie path computed from the application_url

delete_cookie(response[, application_url])

set_cookie(response[, application_url])

Set automatically a Path on a cookie.

exception pypnusershub.utils.RessourceError(msg, errors)[source]

Bases: OSError

Base class for I/O related errors.

pypnusershub.utils.binary_resource_stream(resource, locations)[source]

Return a resource from this path or package

pypnusershub.utils.text_resource_stream(path, locations, encoding='utf8', errors=None, newline=None, line_buffering=False)[source]

Return a resource from this path or package. Transparently decode the stream.

pypnusershub.utils.get_current_app_id()[source]

Returns the cookie path computed from the application_url

Set automatically a Path on a cookie. All kwargs are passed to Response.set_cookie()