Structures
Data structures used in Raider.
- class DataStore(data)[source]
Class defining a dictionary-like data structure.
This class was created to hold information relevant to Raider in a structure similar to Python dictionaries.
- class HeaderStore(data)[source]
Class storing the HTTP headers.
This class inherits from DataStore, and converts the values into Header objects.
- __init__(data)[source]
Initializes the HeaderStore object.
Creates a HeaderStore object out of the given Header list.
- Parameters
data (
Optional
[List
[Header
]]) – A list of Header objects to store.
- set(header)[source]
Sets the value of a Header.
Given a Header object, add or update its value in the HeaderStore.
- Parameters
header (
Header
) – A Header object to be added to the HeaderStore.- Return type
None
- classmethod from_dict(data)[source]
Creates a HeaderStore object from a dictionary.
Given a dictionary with header values, creates a HeaderStore object and returns it.
- Parameters
data (
Optional
[Dict
[str
,str
]]) – A dictionary with header values. Those will be mapped in Header objects.- Return type
- Returns
A HeaderStore object containing the headers created from the supplied dictionary.
- class CookieStore(data)[source]
Class storing the HTTP cookies.
This class inherits from DataStore, and converts the values into Cookie objects.
- __init__(data)[source]
Initializes a CookieStore object.
Given a list of Cookie objects, create the CookieStore containing them.
- Parameters
data (
Optional
[List
[Cookie
]]) – A list of Cookies to be added to the CookieStore.
- set(cookie)[source]
Sets the value of a Cookie.
Given a Cookie object, add or update its value in the CookieStore.
- Parameters
cookie (
Cookie
) – A Cookie object to be added to the CookieStore- Return type
None
- classmethod from_dict(data)[source]
Creates a CookieStore object from a dictionary.
Given a dictionary with cookie values, creates a CookieStore object and returns it.
- Parameters
data (
Optional
[Dict
[str
,str
]]) – A dictionary with cookie values. Those will be mapped in Cookie objects.- Return type
- Returns
A CookieStore object containing the cookies created from the supplied dictionary.