![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Python Library for ButterCMS API.
For a comprehensive list of examples, check out the API documentation.
Install from PyPi using pip, a package manager for Python.
pip install buttercms-python
Getting started with the ButterCMS API couldn't be easier. Use your authorization token to create a ButterCMS client.
from butter_cms import ButterCMS
auth_token = "XXXXXXXXXXXXXXXXXXX"
client = ButterCMS(auth_token)
All methods return dictionaries. The data can be navigated using keys and indexes like the example below.
response = client.posts.all()
posts = response['data']
# posts now contains a list of post dictionaries
my_post = posts[0]
# my_post contains the first returned post
print(my_post)
# {
# "url": "http://www.example.com/blog/this-is-a-blog-post",
# "created": "2015-06-12T13:59:32.441289Z",
# "published": "2015-06-12T00:00:00Z",
# ...
# }
The Page's .all()
, .get()
and .search()
methods accept an optional params
to add additional data to the response.
client.pages.all('news')
# Optional params
client.pages.all('news', {'foo': 'bar'})
client.pages.get('news', 'hello-world')
# Optional params
client.pages.get('news', 'hello-world', {'foo': 'bar'})
client.pages.search('enter search query', {'page': 1, 'page_size': 10})
For a list of params see the API documentation
.get() method accepts an optional params
dict to add additional data to the response.
client.content_fields.get(['collection_key'], {'locale': 'en'})
client.posts.all({'page_size': 3, 'page': 1, 'exclude_body': 'true'})
client.posts.get('hello-world')
client.posts.search('query', {'page': 1, 'page_size': 10})
The Author's .all()
and .get()
methods accept an optional params
to add additional data to the response.
{'include':'recent_posts'}
: Adds each author's posts under the recent_posts
key in that author's returned dictionaryclient.authors.all()
client.authors.all({'include':'recent_posts'})
client.authors.get('jennifer-smith')
client.authors.get('jennifer-smith', {'include':'recent_posts'})
The Category's .all()
and .get()
methods accept an optional params
to add additional data to the response.
{'include':'recent_posts'}
: Adds posts tagged with that category under the recent_posts
key in that category's returned dictionaryclient.categories.all()
client.categories.all({'include':'recent_posts'})
client.categories.get('product-updates')
client.categories.get('product-updates', {'include':'recent_posts'})
The Tag's .all()
and .get()
methods accept an optional params
to add additional data to the response.
{'include':'recent_posts'}
: Adds posts tagged with that tag under the recent_posts
key in that tag's returned dictionaryclient.tags.all()
client.tags.all({'include':'recent_posts'})
client.tags.get('product-updates')
client.tags.get('product-updates', {'include':'recent_posts'})
client.feeds.get('rss')
client.feeds.get('atom')
client.feeds.get('sitemap')
View Python Blog engine and Full CMS for other examples of using ButterCMS with Python.
To run tests:
python -m unittest butter_cms/unit_tests.py
FAQs
API First Blogging and CMS platform built for developers
We found that buttercms-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.