class documentation

class ContentSecurityPolicy(UpdateDictMixin, dict):

View In Hierarchy

Subclass of a dict that stores values for a Content Security Policy header. It has accessors for all the level 3 policies.

Because the csp directives in the HTTP header use dashes the python descriptors use underscores for that.

To get a header of the ContentSecuirtyPolicy object again you can convert the object into a string or call the to_header method. If you plan to subclass it and add your own items have a look at the sourcecode for that class.

New in version 1.0.0: Support for Content Security Policy headers was added.
Method __init__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method to​_header Convert the stored values into a cache control header.
Class Variable base​_uri Undocumented
Class Variable child​_src Undocumented
Class Variable connect​_src Undocumented
Class Variable default​_src Undocumented
Class Variable font​_src Undocumented
Class Variable form​_action Undocumented
Class Variable frame​_ancestors Undocumented
Class Variable frame​_src Undocumented
Class Variable img​_src Undocumented
Class Variable manifest​_src Undocumented
Class Variable media​_src Undocumented
Class Variable navigate​_to Undocumented
Class Variable object​_src Undocumented
Class Variable plugin​_types Undocumented
Class Variable prefetch​_src Undocumented
Class Variable report​_to Undocumented
Class Variable report​_uri Undocumented
Class Variable sandbox Undocumented
Class Variable script​_src Undocumented
Class Variable script​_src​_attr Undocumented
Class Variable script​_src​_elem Undocumented
Class Variable style​_src Undocumented
Class Variable style​_src​_attr Undocumented
Class Variable style​_src​_elem Undocumented
Class Variable worker​_src Undocumented
Instance Variable on​_update Undocumented
Instance Variable provided Undocumented
Method ​_del​_value Used internally by the accessor properties.
Method ​_get​_value Used internally by the accessor properties.
Method ​_set​_value Used internally by the accessor properties.

Inherited from UpdateDictMixin:

Method pop Undocumented
Method setdefault Undocumented
Class Variable __delitem__ Undocumented
Class Variable __setitem__ Undocumented
Class Variable clear Undocumented
Class Variable popitem Undocumented
Class Variable update Undocumented
def __init__(self, values=(), on_update=None):

Undocumented

def __repr__(self):

Undocumented

def __str__(self):

Undocumented

def to_header(self):
Convert the stored values into a cache control header.
base_uri =

Undocumented

child_src =

Undocumented

connect_src =

Undocumented

default_src =

Undocumented

font_src =

Undocumented

form_action =

Undocumented

frame_ancestors =

Undocumented

frame_src =

Undocumented

img_src =

Undocumented

manifest_src =

Undocumented

media_src =

Undocumented

navigate_to =

Undocumented

object_src =

Undocumented

plugin_types =

Undocumented

prefetch_src =

Undocumented

report_to =

Undocumented

report_uri =

Undocumented

sandbox =

Undocumented

script_src =

Undocumented

script_src_attr =

Undocumented

script_src_elem =

Undocumented

style_src =

Undocumented

style_src_attr =

Undocumented

style_src_elem =

Undocumented

worker_src =

Undocumented

on_update =
provided =

Undocumented

def _del_value(self, key):
Used internally by the accessor properties.
def _get_value(self, key):
Used internally by the accessor properties.
def _set_value(self, key, value):
Used internally by the accessor properties.