Registry / http-networking / webflow

webflow

JSON →
library2.0.0pypypi✓ verified 84d ago

The Webflow Python Library provides convenient access to the Webflow Data API from applications written in Python. It includes type definitions for all request and response fields, and offers both synchronous and asynchronous clients powered by `httpx`. The library is actively maintained, with regular updates through Fern regeneration, and is currently at version 2.0.0.

pip install webflow
INSTALL
IMPORT
SIG · WEBFLOW
W
webflow
http-networkingpythonv2.0.0
Install
4.1s avg
Import
733ms
Disk
36MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.770s · 37.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 4.1s · import 0.695s · 37MB
36MB installed
● package 36MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Webflow
from webflow.client import Webflow
AsyncWebflow
from webflow.client import AsyncWebflow

Initializes the synchronous Webflow client using an API access token and demonstrates fetching a list of sites. For asynchronous operations, use `AsyncWebflow` and `await` calls.

import os from webflow.client import Webflow # It's recommended to store your API token securely, e.g., in an environment variable WEBFLOW_ACCESS_TOKEN = os.environ.get('WEBFLOW_ACCESS_TOKEN', 'YOUR_WEBFLOW_ACCESS_TOKEN') if not WEBFLOW_ACCESS_TOKEN or WEBFLOW_ACCESS_TOKEN == 'YOUR_WEBFLOW_ACCESS_TOKEN': print("Warning: Please set the WEBFLOW_ACCESS_TOKEN environment variable or replace 'YOUR_WEBFLOW_ACCESS_TOKEN' with your actual token.") else: try: client = Webflow(access_token=WEBFLOW_ACCESS_TOKEN) # Example: List all sites sites_response = client.sites.list() if sites_response.sites: print(f"Found {len(sites_response.sites)} site(s):") for site in sites_response.sites: print(f"- Site Name: {site.display_name}, ID: {site.id}") else: print("No sites found or token lacks sufficient permissions.") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breakingMajor version bump to v2.0.0 due to 'Fern Regeneration' may introduce breaking changes in API method signatures, response object structures, or enum values. Review the Webflow API reference documentation for specific changes if upgrading from v1.x.
fix
Consult the official Webflow API documentation and SDK changelog to adapt your code to new method signatures or data structures. Re-generate types if you are relying on code generation.
affects: >=2.0.0
breakingIn v1.2.0, the return type of `assets.list` was changed from an array (`Asset[]`) to an object. Code expecting an array for this endpoint will break.
fix
Update your code to expect an object (e.g., `client.assets.list().items` if the object contains a list under an 'items' key) instead of directly iterating over the return value of `assets.list()`.
affects: >=1.2.0
gotchaThe SDK relies on `httpcore` for HTTP client functionality. Versions `2.0.0b2` and `2.0.0` included a patch to address a `httpcore` vulnerability. Ensure your environment has the latest patch if you pin `httpcore` or `httpx` versions manually.
fix
Keep `webflow` library updated to the latest stable version to benefit from security patches, or ensure `httpx` and `httpcore` dependencies are updated to secure versions manually if managing them directly.
affects: >=2.0.0b2
gotchaIncorrect OAuth 2.0 configuration, such as misconfigured `redirect_uri`, `client_id`, or `client_secret`, can lead to authentication failures.
fix
Thoroughly review the OAuth documentation in the Webflow Developer Docs and ensure all parameters (e.g., `client_id`, `client_secret`, `redirect_uri`, `scope`) are correctly configured in both your Webflow App settings and your Python application. Pay attention to authorization URL generation and access token retrieval steps.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'webflow'
The `webflow` library is not installed in the current Python environment.
fix
Run `pip install webflow` to install the library.
webflow.core.api_error.ApiError: Invalid API Key
The `access_token` provided to the `Webflow` client is invalid, expired, or lacks the necessary permissions.
fix
Verify that your `WEBFLOW_ACCESS_TOKEN` environment variable or hardcoded token is correct and active. Check the permissions associated with your API token in the Webflow dashboard. Some endpoints require Workspace Tokens, while others require Site Tokens.
AttributeError: 'Webflow' object has no attribute 'non_existent_method'
Attempting to call a method or access an attribute on the `Webflow` client that does not exist or has been renamed due to API changes or SDK regeneration.
fix
Consult the latest Webflow Python SDK documentation or API reference to ensure you are using the correct method names and object structures, especially after upgrading the library. Refer to the `webflow-python` GitHub README for current usage patterns.
Upgrade
Version history
2.0.0latest on PyPI · released Mar 12, 2026
Audit
Dependencies
httpxrequiredPowers synchronous and asynchronous client requests.
pydanticrequiredUsed for data validation and parsing.
pydantic-corerequiredCore dependency for Pydantic for enhanced performance.
typing_extensionsrequiredProvides backported and experimental type hints.
Agent activity
44 hits · last 30 days
node
38
OpenAI (training)
1
Resources
webflow — pip install webflow · libregistry