Access the built-in Blog Engine for posts, categories, tags, and authors.
# List blog postsposts = client.posts.all({ "page": 1, "page_size": 10, "exclude_body": "true" # Exclude body for faster response})# Access post datafor post in posts["data"]: print(post["title"])# Retrieve a single postpost = client.posts.get("my-post-slug")print(post["data"]["title"])print(post["data"]["body"])# Search postsresults = client.posts.search("search query", { "page": 1, "page_size": 10})
# List all authorsauthors = client.authors.all()# Include recent posts for each authorauthors = client.authors.all({ "include": "recent_posts"})# Retrieve a single authorauthor = client.authors.get("jennifer-smith")# With recent postsauthor = client.authors.get("jennifer-smith", { "include": "recent_posts"})
# List all categoriescategories = client.categories.all()# Include recent posts for each categorycategories = client.categories.all({ "include": "recent_posts"})# Retrieve a single categorycategory = client.categories.get("news")# With recent postscategory = client.categories.get("news", { "include": "recent_posts"})
# List all tagstags = client.tags.all()# Include recent posts for each tagtags = client.tags.all({ "include": "recent_posts"})# Retrieve a single tagtag = client.tags.get("featured")# With recent poststag = client.tags.get("featured", { "include": "recent_posts"})