Skip to main content

Read brand yaml files, a unified way to store brand information.

Project description

brand.yml Python Package

Create reports, apps, dashboards, plots and more that match your company’s brand guidelines with a single _brand.yml file.

brand.yml is a simple, portable YAML file that codifies your company’s brand guidelines into a format that can be used by Quarto, Python and R tooling to create branded outputs. Our goal is to support unified, branded theming for all of Posit’s open source tools—from web applications to printed reports to dashboards and presentations—with a consistent look and feel.

With a single _brand.yml file you can collect brand logos, colors, fonts and typographic choices, typically found in your company’s brand guidelines. This _brand.yml can be used Quarto and Shiny for Python to instantly basic themes that match the brand guidelines.

Example

from brand_yml import Brand

brand = Brand.from_yaml_str(
    # Typically, this file is stored in `_brand.yml`
    # and read with `Brand.from_yaml()`.
    """
    meta:
      name: Posit Software, PBC
      link: https://posit.co
    color:
      palette:
        pblue: "#447099"
        green: "#72994E"
        teal: "#419599"
        orange: "#EE6331"
        purple: "#9A4665"
        gray: "#707073"
      primary: blue
      secondary: gray
      success: green
      info: teal
      warning: orange
      danger: purple
    typography:
      base:
        family: Open Sans
        weight: 300
    """
)
brand.meta.name
BrandMetaName(full='Posit Software, PBC')
brand.color.primary
'blue'
brand.typography.base.model_dump()
{'family': 'Open Sans', 'weight': 300, 'size': None, 'line_height': None}

Installation

From PyPI

uv pip install brand_yml

From GitHub

uv pip install "git+https://github.com/posit-dev/brand-yml#subdirectory=pkg-py"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brand_yml-0.1.0rc6.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

brand_yml-0.1.0rc6-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file brand_yml-0.1.0rc6.tar.gz.

File metadata

  • Download URL: brand_yml-0.1.0rc6.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for brand_yml-0.1.0rc6.tar.gz
Algorithm Hash digest
SHA256 769128f5cfaf84ffc21ce046863c8b073b26e65a7acd1f9702caac6d3023ec08
MD5 fd696fe4df74b9aad23cb35608041b73
BLAKE2b-256 ea579c4d87d080877a2e1ead6235fdf44761437a1be252dcde7cca64e34083f3

See more details on using hashes here.

File details

Details for the file brand_yml-0.1.0rc6-py3-none-any.whl.

File metadata

  • Download URL: brand_yml-0.1.0rc6-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for brand_yml-0.1.0rc6-py3-none-any.whl
Algorithm Hash digest
SHA256 70ec599d86fcdef9373d905ae459ee335f44c737addb35fc2b61893017531066
MD5 29aba2b72b5b7dc13f871fc0bf9cc88f
BLAKE2b-256 902ecea7f0fba917afb967f32d84c922b7e46fd187d3bd5401b3243826dbbe2b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page