diff --git a/.github/workflows/release_python.yaml b/.github/workflows/release_python.yaml new file mode 100644 index 00000000..9c5b245b --- /dev/null +++ b/.github/workflows/release_python.yaml @@ -0,0 +1,26 @@ +name: Create a release +on: workflow_dispatch + +jobs: + publish_to_pypi: + name: Publish to PyPI + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write # Required for OIDC authentication. + environment: + name: pypi + url: https://pypi.org/project/crawlee + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + - uses: astral-sh/setup-uv@v5 + - name: Build project + shell: bash + run: uv build + + # Publishes the package to PyPI using PyPA official GitHub action with OIDC authentication. + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/apify_fingerprint_datapoints/CHANGELOG.md b/apify_fingerprint_datapoints/CHANGELOG.md new file mode 100644 index 00000000..69399bec --- /dev/null +++ b/apify_fingerprint_datapoints/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## 0.0.1 - (2025-03-05) + +- Initial version. diff --git a/apify_fingerprint_datapoints/README.md b/apify_fingerprint_datapoints/README.md new file mode 100644 index 00000000..099064b5 --- /dev/null +++ b/apify_fingerprint_datapoints/README.md @@ -0,0 +1,7 @@ +Fingerprint datapoints files collected by Apify and originally stored at https://github.com/apify/fingerprint-suite. +This package contains datafiles and helper functions for getting the path to the datafiles. + + +## License + +This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/apify/fingerprint-suite/blob/master/fingerprint_datapoints/LICENSE) file for details. diff --git a/apify_fingerprint_datapoints/__init__.py b/apify_fingerprint_datapoints/__init__.py new file mode 100644 index 00000000..4c261364 --- /dev/null +++ b/apify_fingerprint_datapoints/__init__.py @@ -0,0 +1,26 @@ +from pathlib import Path + + +def get_browser_helper_file() -> Path: + """Get path of `browser-helper-file.json`.""" + return Path(__file__).parent / "data" / "browser-helper-file.json" + + +def get_header_network() -> Path: + """Get path of `header-network-definition.zip`.""" + return Path(__file__).parent / "data" / "header-network-definition.zip" + + +def get_headers_order() -> Path: + """Get path of `headers-order.json`.""" + return Path(__file__).parent / "data" / "headers-order.json" + + +def get_input_network() -> Path: + """Get path of `input-network-definition.zip`.""" + return Path(__file__).parent / "data" / "input-network-definition.zip" + + +def get_fingerprint_network() -> Path: + """Get path of `fingerprint-network-definition.zip`.""" + return Path(__file__).parent / "data" / "fingerprint-network-definition.zip" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..b7bbfd2d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,49 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "apify_fingerprint_datapoints" +version = "0.0.1" +description = "Browser fingerprint datapoints collected by Apify" +authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }] +license = { file = "LICENSE.md" } +readme = "apify_fingerprint_datapoints/README.md" +requires-python = ">=3.9" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Software Development :: Libraries", +] +keywords = [ + "apify", + "chrome", + "crawlee", + "crawler", + "scraper", + "scraping", + "fingerprints", +] + +[project.urls] +"Homepage" = "https://docs.apify.com/academy/anti-scraping/techniques/fingerprinting" +"Apify homepage" = "https://apify.com" +"Changelog" = "https://github.com/apify/fingerprint-suite/blob/master/fingerprint_datapoints/CHANGELOG.md" +"Documentation" = "https://docs.apify.com/academy/anti-scraping/techniques/fingerprinting" +"Issue tracker" = "https://github.com/apify/fingerprint-suite/issues" +"Repository" = "https://github.com/apify/fingerprint-suite" + +[tool.hatch.build.targets.wheel.force-include] +"./packages/fingerprint-generator/src/data_files/fingerprint-network-definition.zip" = "apify_fingerprint_datapoints/data/fingerprint-network-definition.zip" +"./packages/header-generator/src/data_files/browser-helper-file.json" = "apify_fingerprint_datapoints/data/browser-helper-file.json" +"./packages/header-generator/src/data_files/header-network-definition.zip" = "apify_fingerprint_datapoints/data/header-network-definition.zip" +"./packages/header-generator/src/data_files/headers-order.json" = "apify_fingerprint_datapoints/data/headers-order.json" +"./packages/header-generator/src/data_files/input-network-definition.zip" = "apify_fingerprint_datapoints/data/input-network-definition.zip" +