Skip to main content

Generate random real-world WebGL fingerprint data.

Project description

wgl

wgl is a Python package that generates random real-world WebGL fingerprint data. This package can be useful for testing, simulations, or generating sample data for WebGL-related projects.

Features

  • Generates a random WebGL vendor.
  • Generates a random WebGL renderer.
  • Generates a random WebGL version (e.g., WebGL 1.0 or WebGL 2.0).
  • Generates a random selection of WebGL extensions.

Installation

You can install the package using pip:

pip install wgl

Usage

Below is an example of how to use the package as a whole along with demonstrations of each individual function.

Full Fingerprint Example

from wgl import full_fingerprint

# Generate a random WebGL fingerprint
fingerprint = full_fingerprint()
print("Random fingerprint:", fingerprint)

The output will be a dictionary with the following keys:

  • vendor: A random WebGL vendor (e.g., "Intel", "NVIDIA").
  • renderer: A random WebGL renderer.
  • version: A random WebGL version (e.g., "WebGL 1.0" or "WebGL 2.0").
  • extensions: A list of randomly selected WebGL extensions.

Individual Function Examples

from wgl import get_vendor, get_renderer, get_version, get_extensions

# Get a random WebGL vendor
vendor = get_vendor()
print("Vendor:", vendor)

# Get a random WebGL renderer
renderer = get_renderer()
print("Renderer:", renderer)

# Get a random WebGL version
version = get_version()
print("Version:", version)

# Get a random selection of WebGL extensions
extensions = get_extensions()
print("Extensions:", extensions)

These examples demonstrate how to access each part of the fingerprint individually.

Detailed API

The package consists of the following functions:

get_vendor()

  • Description:
    Returns a random WebGL vendor from a predefined list.
  • Returns:
    String - A vendor name such as "Intel", "NVIDIA", etc.

get_renderer()

  • Description:
    Returns a random WebGL renderer from a comprehensive list of real-world renderer strings.
  • Returns:
    String - A renderer name selected at random.

get_version()

  • Description:
    Returns a random valid WebGL version string.
  • Returns:
    String - Either "WebGL 1.0" or "WebGL 2.0", chosen at random.

get_extensions()

  • Description:
    Returns a random selection of one or more WebGL extensions from a predefined list. The number of extensions selected is random.
  • Returns:
    List - A list of WebGL extension strings (e.g., "EXT_texture_filter_anisotropic", "OES_texture_float", etc.).

full_fingerprint()

  • Description:
    Combines the outputs of get_vendor(), get_renderer(), get_version(), and get_extensions() into a single fingerprint dictionary.
  • Returns:
    Dictionary - A dictionary with keys:
    • vendor
    • renderer
    • version
    • extensions

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wgl-0.4.6.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wgl-0.4.6-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file wgl-0.4.6.tar.gz.

File metadata

  • Download URL: wgl-0.4.6.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for wgl-0.4.6.tar.gz
Algorithm Hash digest
SHA256 be0f32cb3cbb80e6ea3b09b526590e0d1b533417367be7c3b3428b0f4a6ca396
MD5 f15460c4cc7739abf7d6dc28f382e0a7
BLAKE2b-256 3c996edd2d80a74833dac6c6409dcd9a9858870a789a3d8b66d62262c853a46f

See more details on using hashes here.

File details

Details for the file wgl-0.4.6-py3-none-any.whl.

File metadata

  • Download URL: wgl-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for wgl-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 93b9a054cfa7bda799102d76fdafaafa8e92d80009973d290ac179fb8a4eb329
MD5 8ef2ce9f40e01a587024542154f54508
BLAKE2b-256 dd928b7a7a2275ce3ba81aa9f4751834662467eb0a9bb27121e2cf68532231bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page