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.1.tar.gz
.
File metadata
- Download URL: netlify-config-generator-0.1.1.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 | 7dc5332296295b097e91d07c4eea11fb63df442039edbe2cb321d41f09fa4b59 |
|
MD5 | 16bcdc84f214cf00c851f66fcf5d863b |
|
BLAKE2b-256 | a6589b270fee0e68c849d8ddca5924fccfce2a84cd8b2d8f2bdc9199109b22af |
File details
Details for the file netlify_config_generator-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: netlify_config_generator-0.1.1-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 | d6c3c78f8fde7a0b6575793bcf14e1b0ff7758b952cee62f4716b219827ca71a |
|
MD5 | 9c84f882c7135b95da7045b555d04b54 |
|
BLAKE2b-256 | a5c485a3a1e099a00e2f393e2ec14945e32f3690caa551887f9129bb7dc5945c |