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
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 netlify-config-generator-0.1.2.tar.gz
.
File metadata
- Download URL: netlify-config-generator-0.1.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff914d08ed59e468e8dd0528858645e2ed3d5c3b996b59033a6fb230ddb0de79 |
|
MD5 | 75290cd923baf37c1ed43166d8fc7f4f |
|
BLAKE2b-256 | 40dd892065877ca02eaa3aade94a23e513dfdc70a5226af8f60024fb9251baa6 |
File details
Details for the file netlify_config_generator-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: netlify_config_generator-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dd68513bfefb59b6321d77ad79f0cfa0088c9ae32e9a80565287c99051df92f |
|
MD5 | 325486bd00c00c9a98f1cc6b9d06796a |
|
BLAKE2b-256 | 4988f3f1babe07f0f964be48a9207c5500044bab66e2f23714dde8450205d2d2 |