Typed Python client for the Brushfire API
Project description
brushfire-api
A typed Python client for the Brushfire API, with models and endpoints generated from the official OpenAPI spec.
Setup
pip install ".[dev]"
Generating the client
The client code is generated from the Brushfire OpenAPI spec. Run this whenever the API version changes:
python generate_api.py
This will:
- Run
datamodel-codegento generatesrc/brushfire_api/models.py - Generate
src/brushfire_api/api.pywith a typedBrushfireClient - Generate
tests/test_api.py
The API version and output paths are configured in pyproject.toml.
Usage
import os
from brushfire_api import BrushfireClient
client = BrushfireClient(os.environ["BRUSHFIRE_API_KEY"])
events = client.get_events()
for event in events:
print(event.Title)
See examples/basic_usage.py for a runnable example:
BRUSHFIRE_API_KEY=your_key python examples/basic_usage.py
Running tests
pytest tests/test_api.py
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brushfire_api-0.1.1.tar.gz.
File metadata
- Download URL: brushfire_api-0.1.1.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06cd1e5bbb7592a93c5a70267a9975fc58136a3fc7270494d73718811d682102
|
|
| MD5 |
44dd5a6e94dffd6a1787e7dff7d69e6e
|
|
| BLAKE2b-256 |
52bf27176ad4fb0b871bd837b59d79394acd49f5566425ddcc343f0102cfbafe
|
Provenance
The following attestation bundles were made for brushfire_api-0.1.1.tar.gz:
Publisher:
publish.yml on renningert/brushfire-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brushfire_api-0.1.1.tar.gz -
Subject digest:
06cd1e5bbb7592a93c5a70267a9975fc58136a3fc7270494d73718811d682102 - Sigstore transparency entry: 1606424652
- Sigstore integration time:
-
Permalink:
renningert/brushfire-api@def8cea6bfa225a26b98281800eeb13433375636 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/renningert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@def8cea6bfa225a26b98281800eeb13433375636 -
Trigger Event:
push
-
Statement type:
File details
Details for the file brushfire_api-0.1.1-py3-none-any.whl.
File metadata
- Download URL: brushfire_api-0.1.1-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4670f01c92eb3f21d3c4bc9dd0ff9ebaadb2875e2e16ae24e40feeb0395953f
|
|
| MD5 |
3dc5b7266cfeab71beb860603e572861
|
|
| BLAKE2b-256 |
22ce6c137ef3ec31aade418ac7c95d6603aae8265056b94204f282e372d0ca27
|
Provenance
The following attestation bundles were made for brushfire_api-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on renningert/brushfire-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brushfire_api-0.1.1-py3-none-any.whl -
Subject digest:
e4670f01c92eb3f21d3c4bc9dd0ff9ebaadb2875e2e16ae24e40feeb0395953f - Sigstore transparency entry: 1606424753
- Sigstore integration time:
-
Permalink:
renningert/brushfire-api@def8cea6bfa225a26b98281800eeb13433375636 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/renningert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@def8cea6bfa225a26b98281800eeb13433375636 -
Trigger Event:
push
-
Statement type: