Changing the way generate_unique_images works allows it to use an external config.json file instead of hardcoding configs into index.py.
Motivation
I have been thinking about practical applications for this script to simplify its use for the general audience, like people unfamiliar with software development. I planned to create a container image using Docker and serve this script as a microservice. This service would receive a few arguments, like an URL for external storage containing trait layers, the number of NFTs generated, and a config.json to replace the second argument in generate_unique_images(num, config).
The first step would be making it so generate_unique_images(num, config) reads configuration from an external file.
Proposal
Changing the way
generate_unique_images
works allows it to use an externalconfig.json
file instead of hardcoding configs intoindex.py.
Motivation
I have been thinking about practical applications for this script to simplify its use for the general audience, like people unfamiliar with software development. I planned to create a container image using Docker and serve this script as a microservice. This service would receive a few arguments, like an URL for external storage containing trait layers, the number of NFTs generated, and a config.json to replace the second argument in
generate_unique_images(num, config).
The first step would be making it so
generate_unique_images(num, config)
reads configuration from an external file.Example
Given the
config.json
:It is possible to load
config.json
with something similar to:PS: I am working on something similar on my side.