Metadata-Version: 2.4
Name: web-features
Version: 3.0.0
Summary: Library for working with web-features data
Author-email: James Graham <james@hoppipolla.co.uk>
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx[http2]>=0.28.1
Requires-Dist: pydantic>=2.11.3
Provides-Extra: test
Requires-Dist: mypy==1.17.1; extra == "test"
Requires-Dist: ruff==0.12.11; extra == "test"
Requires-Dist: pytest==8.4.0; extra == "test"
Requires-Dist: pytest-ruff==0.5; extra == "test"
Dynamic: license-file

# web-features

Python library for working with
[web-features](https://github.com/web-platform-dx/web-features) data.

This library provides tools to download and read releases of the
web-features data. Unlike the npm package it does not bundle a
specific version of the data in the package. Instead it provides an
API for fetching specific releases from GitHub.

Once downloaded, Web Features data is parsed into
[pydantic](https://docs.pydantic.dev/latest/) models.

## Getting the latest web-features data

```py
import webfeatures

version, features = webfeatures.from_github()
```

## Caching latest web-features data

```py
import webfeatures

version = webfetures.download("web-features.json")

# Later
features = webfeatures.from_file("web-features.json")
```
