This will be ran automatically on the first import, or every 5 weeks.
To decompress the model for faster generation (up to 10-50x faster!), run:
fpgen decompress
Note: This action will use an additional 100mb+ of storage.
CLI Usage
Usage: python -m fpgen [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
decompress Decompress model files for speed efficiency (will take 100mb+)
fetch Fetch the latest model from GitHub
recompress Compress model files after running decompress
remove Remove all downloaded and/or extracted model files
Or use the Generator object to pass filters downward:
>>> gen = fpgen.Generator(browser='Chrome') # Filter by Chrome
>>> gen.generate(os='Windows') # Generate Windows & Chrome fingerprints
Parameters list
Initializes the Generator with the given options.
Values passed to the Generator object will be inherited when calling Generator.generate()
Parameters:
conditions (dict, optional): Conditions for the generated fingerprint.
window_bounds (WindowBounds, optional): Constrain the output window size.
strict (bool, optional): Whether to raise an exception if the conditions are too strict.
flatten (bool, optional): Whether to flatten the output dictionary
target (Optional[Union[str, StrContainer]]): Only generate specific value(s)
**conditions_kwargs: Conditions for the generated fingerprint (passed as kwargs)
>>> gen = fpgen.Generator(os='ChromeOS')
>>> gen.trace(target='browser')
[<Chrome: 100.00000%>]
Parameters for trace
Compute the probability distribution(s) of a target variable given conditions.
Parameters:
target (str): The target variable name.
conditions (Dict[str, Any], optional): A dictionary mapping variable names
flatten (bool, optional): If True, return a flattened dictionary.
**conditions_kwargs: Additional conditions to apply
Returns:
A dictionary mapping probabilities to the target's possible values.
Query a list of possibilities given a target.
Parameters:
target (str): Target node to query possible values for
flatten (bool, optional): Whether to flatten the output dictionary
sort (bool, optional): Whether to sort the output arrays
[!NOTE]
Since fpgen is trained on live data, queries may occasionally return invalid or anomalous values. Values lower a .001% probability will not appear in traces or generated fingerprints.
Generated data
Here is a rough list of the data fpgen can generate:
Browser data:
All navigator data
All mimetype data: Audio, video, media source, play types, PDF, etc
All window viewport data (position, inner/outer viewport sizes, toolbar & scrollbar sizes, etc)