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
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.0.0

### Added
- Support for Python 3.10 through 3.14.
- A `py.typed` marker so type checkers use the bundled inline type hints (#77).
- A wheel is now published alongside the source distribution.

### Changed
- Minimum supported Python is now 3.10.
- Type hints modernised to use PEP 604 unions (`X | None`) and built-in generics.
- `clone()` preserves attributes set in subclass constructors (#73).
- `@endpoint` includes inherited attributes and ignores methods and functions (#68).
- **Breaking:** paginator `next_page` callbacks now receive a `Response` object instead of the
decoded body. Use `response.get_json()` for the body and `response.get_original()` for the
underlying response (e.g. headers and links) (#86).

### Removed
- Support for Python 3.6, 3.7, 3.8 and 3.9.
- The `OptionalDict`, `OptionalStr`, `OptionalInt` and `OptionalJsonType` aliases from `apiclient.utils.typing` (use `X | None` directly).

### Fixed
- Unrelated exceptions are no longer masked as `UnexpectedError`; only request errors are wrapped (#80).
- `post()`, `put()` and `patch()` type hints accept JSON arrays, not just objects (#90).
- `paginators` imports `APIClient` from `apiclient.client` instead of the package root (#78).
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
[![Unit Tests](https://github.com/MikeWooster/api-client/actions/workflows/test.yml/badge.svg)](https://github.com/MikeWooster/api-client/actions/workflows/test.yml)

# Note to users of this API

To those that have been paying attention to the commit history will note that
I have had no time to actively maintain this library. If there are any volunteers
to continue the development of this library, I would be happy to add you as
contributors. Please get in touch, and I will try to sort out a group to continue
this development. Also note, that my reply time may not be that timely, so please
be patient.

# Python API Client

A client for communicating with an api should be a clean abstraction
Expand Down Expand Up @@ -39,6 +30,16 @@ that code away from the clean abstraction you have designed.
pip install api-client
```

The distribution is `api-client`, but the import package is `apiclient`:

```python
from apiclient import APIClient
```

> **Note:** this package imports as `apiclient` and conflicts with any other installed
> library that uses the same import name (such as `google-api-python-client`). See
> [#88](https://github.com/MikeWooster/api-client/issues/88).

## Usage

### Simple Example
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.1
2.0.0
12 changes: 0 additions & 12 deletions scripts/generate_changelog.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
author_email="",
url="https://github.com/MikeWooster/api-client",
python_requires=">=3.10",
packages=["apiclient"],
packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
package_data={"apiclient": ["py.typed"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down