Skip to main content

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:

  1. Run datamodel-codegen to generate src/brushfire_api/models.py
  2. Generate src/brushfire_api/api.py with a typed BrushfireClient
  3. 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

brushfire_api-0.1.1.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

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

brushfire_api-0.1.1-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

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

Hashes for brushfire_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 06cd1e5bbb7592a93c5a70267a9975fc58136a3fc7270494d73718811d682102
MD5 44dd5a6e94dffd6a1787e7dff7d69e6e
BLAKE2b-256 52bf27176ad4fb0b871bd837b59d79394acd49f5566425ddcc343f0102cfbafe

See more details on using hashes here.

Provenance

The following attestation bundles were made for brushfire_api-0.1.1.tar.gz:

Publisher: publish.yml on renningert/brushfire-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for brushfire_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e4670f01c92eb3f21d3c4bc9dd0ff9ebaadb2875e2e16ae24e40feeb0395953f
MD5 3dc5b7266cfeab71beb860603e572861
BLAKE2b-256 22ce6c137ef3ec31aade418ac7c95d6603aae8265056b94204f282e372d0ca27

See more details on using hashes here.

Provenance

The following attestation bundles were made for brushfire_api-0.1.1-py3-none-any.whl:

Publisher: publish.yml on renningert/brushfire-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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