Metadata-Version: 2.4
Name: camoucore
Version: 0.6.3
Summary: The Camoufox and Camouwolf launchers and the core they share
Author: JWriter20
Author-email: daijro <daijro.dev@gmail.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/CamouBrowser/camoucore
Keywords: client,fingerprint,browser,scraping,injector,firefox,chromium,playwright
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <4.0,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: pysocks
Requires-Dist: rich
Requires-Dist: rich-click
Requires-Dist: pyyaml
Requires-Dist: platformdirs
Requires-Dist: typing_extensions
Requires-Dist: screeninfo
Requires-Dist: language-tags
Requires-Dist: numpy
Requires-Dist: orjson
Requires-Dist: inquirer
Requires-Dist: fpgen<2.0.0,>=1.3.0
Requires-Dist: playwright<1.63
Requires-Dist: ua_parser
Requires-Dist: myuri==5.1.0
Provides-Extra: geoip
Requires-Dist: maxminddb; extra == "geoip"
Dynamic: license-file

# CamouCore

The [Camoufox](https://github.com/daijro/camoufox) (Firefox) and
[Camouwolf](https://github.com/CamouBrowser/camouwolf) (Chromium) launchers,
`camoucore.camoufox` and `camoucore.camouwolf`, and the browser-independent
core they share. A launcher keeps only what its engine needs and takes
everything else from the core, so the two launchers cannot drift apart.

Install a launcher through its browser's package, which wraps it under its own
name and pins the browser built with it: `pip install -U "camoufox[geoip]"`,
`pip install -U "camouwolf[geoip]"`. The launchers' references are
[camoufox's](https://github.com/CamouBrowser/camoucore/blob/main/python/camoufox/docs/README.md)
and [camouwolf's](https://github.com/CamouBrowser/camoucore/blob/main/python/camouwolf/docs/README.md).

The core's modules:

| Module | What it does |
|---|---|
| `product` | `Product` and `Engine`: the launcher's name, cache directory, environment prefix and engine defaults. Every engine-specific choice in the core reads them. |
| `locales`, `territoryInfo.xml` | Locale parsing and region-weighted language choice. |
| `geolocation`, `geoip.yml` | GeoIP lookup of a proxy's exit. The database cache is shared by every launcher. |
| `ip` | Proxy parsing and public IP lookup. |
| `fpgen_model`, `fpgen-model.json` | Installs the pinned fpgen model before fpgen loads. Every launcher pins the same model. |
| `display`, `virtdisplay` | Monitor probing and the Xvfb display for `headless="virtual"`. |
| `cpu_affinity`, `download`, `host` | CPU pinning, verified downloads, host OS and architecture. |

A launcher declares itself once, in its subpackage's `product.py`
(`python/<launcher>/src/product.py` in the repository):

```python
from pathlib import Path
from camoucore import CHROMIUM, Product

PRODUCT = Product('camouwolf', 'Camouwolf', CHROMIUM, package=Path(__file__).parent)
```

The TypeScript package (`typescript`, npm `camoucore`) is the twin
of the Python one, with the same launchers at `camoucore/camoufox` and
`camoucore/camouwolf`, and an MCP server at `camoucore/mcp`. Its data files
are this package's; `pnpm build` copies them into its `dist/`, so each exists once
in the repository.

## Development

This package is developed in the
[camoucore repository](https://github.com/CamouBrowser/camoucore), beside its
TypeScript twin; its README has the commands. Each suite runs on its own, from `python/`:
`pytest core/tests`, `pytest camoufox/tests`, `pytest camouwolf/tests`.
