Namespaces

CMS

ovok.cms reads the published CMS content of the client's tenant: legal pages, translations,

  • Stable unknown
  • Release candidate since 0.1.0-rc.3
  • Development since 0.1.0-dev.21+c43ebba

ovok.cms reads the published CMS content of the client's tenant: legal pages, translations, release notes and any other public collection. The tenant comes from the client's config, so every read is scoped to it.

Read a legal page by its slug. Pass locale to pick a language; unsupported languages fall back to English.

from ovok_sdk import Ovok

ovok = Ovok("https://api.sandbox.ovok.com", "your-tenant")
terms = ovok.cms.legal_page("terms-of-service", {"locale": "de"})

Load the app's translations

translations() reads every translation document and returns one nested dictionary keyed by document slug and the dotted key's parts.

strings = ovok.cms.translations("de-CH")
print(strings["common"]["buttons"]["save"])

List release notes and other collections

release_notes.list() returns the newest notes first. documents.list() and documents.retrieve() read any public collection. Lists return a Page.

for note in ovok.cms.release_notes.list({"limit": 10}).auto_paging_iter():
    print(note["title"])

faq = ovok.cms.documents.retrieve("faqs", "billing", {"locale": "en"})

To manage the project's own content entries, use ovok.content.

API reference

See ovok_sdk.resources.cms for every method, parameter and error.

Last updated on

On this page