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"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file brand_yml-0.1.0.tar.gz
.
File metadata
- Download URL: brand_yml-0.1.0.tar.gz
- Upload date:
- Size: 773.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13ae0181ca202387be2cc9b6e91b955984973454896524641e1dcad2767f2021 |
|
MD5 | 4fe43c8fedc4c7bab3d2d876ab2d23fb |
|
BLAKE2b-256 | 191bb6734889d320f0b2458c71aafcb9ac33b277fb85e8e063254f196a842e4c |
Provenance
File details
Details for the file brand_yml-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: brand_yml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 787.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3b16ec36dfa451eac92982c97bdddf39e102cd3788fbf4a3fece9ddc5a66c3e |
|
MD5 | 72960b5250e6b29d4be5f834c28fd6b3 |
|
BLAKE2b-256 | f045281599a1716ada9b68115ee4785236af5d7ae4d4d53b3b096ab7d76ff53c |