Skip to main content

Programatically generate netlify configuration files

Project description

Netlify Configuration Generator without an interesting name

Example:

import yaml

from netlifyconfig.collection import FolderCollection
from netlifyconfig.widgets import ColorWidget, ListWidget, MarkdownWidget, NumberWidget, StringWidget
from netlifyconfig.types import Widgets

class RoleMetadata(FolderCollection):
    fields: Widgets = [
        StringWidget(label='Short name', name='title'),
        StringWidget(label='Role name', name='name'),
        NumberWidget(label='Display order', name='order'),
        ColorWidget(label='Color', name='color'),
        StringWidget(label='Icon', name='icon'),
        StringWidget(label='Link', name='role_link'),
        MarkdownWidget(label='Description', name='role_text_md'),
        ListWidget(
            label='Job Information',
            name='jobs',
            fields=[
                StringWidget(label='Name', name='name'),
                StringWidget(label='Link', name='job_link'),
                StringWidget(label='Icon', name='icon'),
            ]
        )
    ]

r = RoleMetadata(label='Role metadata', name='role-data', folder='data/roles/')
print(yaml.dump(r.to_dict()))

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

netlify-config-generator-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

netlify_config_generator-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file netlify-config-generator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for netlify-config-generator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b2e1e4a4ae9554b624584407935e6286d32ce5cf484a41bbc88794e1b9be04f
MD5 7dd72c8e592c6d6e51600e9d132f0050
BLAKE2b-256 2b032136bab9271d49ad2df0ab59f1476b290423d2d1825554a70770dab9b77a

See more details on using hashes here.

File details

Details for the file netlify_config_generator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for netlify_config_generator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4991757014164390eb883c7f66a67a7cfb1459a4248ea84381dd6735de7e0628
MD5 e35ffe45895ed0a03e89893ffc808f33
BLAKE2b-256 6eda412cd010e1bd18a977aae306dcf1376fdb3b30b88316bfefa3b2e0354d9a

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