skillfed

contentful

Contentful Delivery API Client

contentful v2.5.0 414.6K downloads/30d#6,830 on PyPI47
Permissive license MIT Active released

What it is and what it does

Contentful is a Python client for Contentful's headless CMS APIs. It provides a straightforward interface to fetch entries, assets, content types, and other structured content from Contentful's Content Delivery API or Preview API. The library handles authentication via bearer tokens, supports querying with filters and search parameters, and includes features like content type caching, localization, link resolution, and synchronization to keep local content in sync with the remote service.

The package depends only on requests and python-dateutil, making it lightweight to integrate into existing Python applications. It supports modern Python versions and includes built-in rate-limiting recovery, allowing developers to reliably retrieve content from Contentful without managing API retry logic manually. Configuration options cover API endpoint selection, locale defaults, compression, and error handling behavior.

Use it for:

  • Fetch structured content from Contentful to populate a static site generator or web application.
  • Synchronize content changes from Contentful into a local cache or database for offline access.
  • Query entries filtered by content type, locale, or custom search parameters for multi-language content delivery.
  • Retrieve asset metadata and generate signed URLs for embargoed or time-limited asset access.
  • Build a content preview workflow using the Preview API with draft or unpublished content.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python client library for querying and retrieving structured content from Contentful's Content Delivery and Preview APIs, with support for synchronization, localization, and link resolution.

Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It is the official Python client for Contentful's APIs and is suitable for any Python project that needs to integrate with Contentful as a content source.

Install

contentful on PyPI

pip

pip install contentful

uv

uv add contentful

poetry

poetry add contentful

Installing contentful

Before you install

Low friction installation with only two lightweight runtime dependencies (requests and python-dateutil). The package is actively maintained with a recent release and no known vulnerabilities, supporting current Python versions (3.9 through 3.13).

License in practice

MIT license is permissive and places no significant restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install contentful

import contentful

client = contentful.Client('space_id', 'access_token')
entry = client.entry('entry_id')

Requires valid Contentful space ID and access token obtained from the Contentful web app.

Verify before relying

  • Whether the library's rate-limiting recovery procedures are automatic or require explicit configuration.
  • Performance characteristics when handling large content sets or deeply nested linked resources.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, python-dateutil
Maintenance actively maintained — 350 days since the last release
Last repo commit
First released
Downloads 414,557/month — #6,830 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: contentful-2.5.0-py3-none-any.whl

Keywords: contentful, cms, content

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

contentful api clientheadless cms pythoncontent delivery apicontentful content retrievalstructured content managementcontentful python sdkcontent synchronization
headless-cmsapi-clientcontent-management

More Python Modules packages