Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [8.0.1] - 2025-06-04
### Fixed
- Fix type disagreement for `required_headers` in service code

## [8.0.0-post.1] - 2024-10-28
### Changed
- Modernize package quality tooling and configuration
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "apiron"
version = "8.0.0-post.1"
version = "8.0.1"
description = "apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP."
authors = [
{ name = "Ithaka Harbors, Inc.", email = "opensource@ithaka.org" },
Expand Down
15 changes: 12 additions & 3 deletions src/apiron/service/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Any

from apiron import Endpoint


Expand All @@ -20,10 +18,21 @@ def __repr__(cls) -> str:


class ServiceBase(metaclass=ServiceMeta):
required_headers: dict[str, Any] = {}
auth = ()
proxies: dict[str, str] = {}

@property
def required_headers(self) -> dict[str, str]:
"""
The headers that are required to be present in requests to this service.

:return:
A dictionary of header names and their expected values
:rtype:
dict
"""
return {}

@classmethod
def get_hosts(cls) -> list[str]:
"""
Expand Down