Formatter Module

Contains function that manipulate the API returns for easier data manipulation.

pbwrap.formatter.archive_url_format(archive_html)[source]

Return a list with recent pastes ids

Parameters:archive_html (string) – raw html of the archive url
Returns:a list containing paste ids
Return type:list
pbwrap.formatter.paste_list_from_xml(xml_paste)[source]

Input an xml list and return a list of paste objects.

Parameters:xml_paste – An xml formatted response containing Paste information
Type:string
Returns:a list of Paste objects parsed from the input xml formatted string
Return type:list(Paste)
pbwrap.formatter.user_from_xml(user_xml_string)[source]

Return user dictionary from an xml format string

Parameters:user_xml_string (string) – xml formatted string containing user information
Returns:A dictionary containing the user info
Return type:User