Problem/Motivation

The api_client project provides JavaScript packages that simplify interacting with common Drupal APIs, especially Drupal's JSON:API endpoints. The project is currently focused on JavaScript and TypeScript usage across frameworks, server-side applications, client-side applications, and CDN-based imports.

There is currently no equivalent Drupal API Client package for Python/FastAPI applications.

This makes it harder for Python applications, especially FastAPI-based services, to interact with Drupal's JSON:API in a reusable and consistent way. Python developers currently need to implement their own request handling, resource fetching, query construction, and response handling when building decoupled applications that consume Drupal APIs.

Providing a Python/FastAPI equivalent would make the Drupal API Client ecosystem more useful for teams building decoupled Drupal applications outside the JavaScript ecosystem.

Proposed resolution

Add documentation or a reference issue for a Python/FastAPI implementation inspired by the Drupal API Client JavaScript packages.

The Python package provides similar client-side functionality for Python applications that need to communicate with Drupal JSON:API endpoints. It is intended to help FastAPI and other Python-based projects interact with Drupal APIs using a reusable client instead of hand-writing request logic in each application.

This issue proposes linking the Python implementation from the api_client project so that Python/FastAPI developers can discover it when looking for Drupal API Client tooling.

Relevant repository:
Python/FastAPI Drupal API Client repository

Comments

vincenzo gambino created an issue. See original summary.

brianperry’s picture

Excited about the prospect of this and having the API Client ecosystem grow.

I think it would make sense to follow the proposal in the drupal_jsonapi_params repository https://www.drupal.org/project/drupal_jsonapi_params/issues/3588943 which would require adding
vincenzo gambino as a maintainer and updating some documentation.

I'd also like to try out the package at some point using my limited python knowledge :)

brianperry’s picture

Assigned: vincenzo gambino » Unassigned
Status: Active » Fixed

Added Vincenzo as a co-maintainer and updated the project page to include info about the Python implementation. Vincenzo - feel free to make additional edits to the project page if need be.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.