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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for netlify-config-generator-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ff914d08ed59e468e8dd0528858645e2ed3d5c3b996b59033a6fb230ddb0de79
MD5 75290cd923baf37c1ed43166d8fc7f4f
BLAKE2b-256 40dd892065877ca02eaa3aade94a23e513dfdc70a5226af8f60024fb9251baa6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for netlify_config_generator-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd68513bfefb59b6321d77ad79f0cfa0088c9ae32e9a80565287c99051df92f
MD5 325486bd00c00c9a98f1cc6b9d06796a
BLAKE2b-256 4988f3f1babe07f0f964be48a9207c5500044bab66e2f23714dde8450205d2d2

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