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.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for netlify-config-generator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7dc5332296295b097e91d07c4eea11fb63df442039edbe2cb321d41f09fa4b59
MD5 16bcdc84f214cf00c851f66fcf5d863b
BLAKE2b-256 a6589b270fee0e68c849d8ddca5924fccfce2a84cd8b2d8f2bdc9199109b22af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for netlify_config_generator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6c3c78f8fde7a0b6575793bcf14e1b0ff7758b952cee62f4716b219827ca71a
MD5 9c84f882c7135b95da7045b555d04b54
BLAKE2b-256 a5c485a3a1e099a00e2f393e2ec14945e32f3690caa551887f9129bb7dc5945c

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