Aspen

A Python web framework that makes the most of the filesystem.
Simplates are the main attraction.

Core Algorithms

Aspen's request-processing algorithm is implemented with a module called algorithm. If you want to modify Aspen's behavior you should read up on the algorithm module and refer to the algorithm definitions below and in the Aspen source code.

Website Algorithm

This is available at website.algorithm. Here are the signatures of the functions in the stock request-processing algorithm:

parse_environ_into_request(environ)

parse_body_into_request(request, website)

raise_200_for_OPTIONS(request)

redirect_to_base_url(website, request)

dispatch_request_to_filesystem(website, request)

apply_typecasters_to_path(website, request, state)

get_resource_for_request(website, dispatch_result)

extract_accept_from_request(request)

get_response_for_resource(state, website, resource=None)

get_response_for_exception(website, exception)

log_traceback_for_5xx(response, traceback=None)

delegate_error_to_simplate(website, state, response, request=None, resource=None)

log_traceback_for_exception(website, exception)

log_result_of_request(website, request=None, dispatch_result=None, response=None)
Home Unicode