Generating NFT Metadata with Python
Learn how to generate NFT metadata with Python and IPFS.
Last updated
Learn how to generate NFT metadata with Python and IPFS.
Last updated
Metadata by definition refers to data about data. Metadata provides additional information about existing data to provide enrichment and additional attributes that make data easier to manage, use, and find.
Read below to learn how to generate NFT metadata with Python and IPFS.
To do this, navigate to console.filebase.com. If you don’t have an account already, sign up, then log in.
Select ‘Create Bucket’ in the top right corner to create a new bucket for your NFTs.
Bucket names must be unique across all Filebase users, be between 3 and 63 characters long, and can contain only lowercase characters, numbers, and dashes.
generative-art-nft
:git clone https://github.com/rounakbanik/generative-art-nft.git
pip3 install Pillow pandas progressbar2
generative-art-nft
directory. Run the following command to generate your NFT collection:python3 nft.py
When prompted provide the number of NFTs to generate and give your collection a version name.
Your generated NFTs will be in the output
folder. By default, this example git repo uses 8 different attributes to generate Scrappy Squirrel NFTs.
metadata.py
in your generative-nft-collection
directory. Edit the following values:BASE_IMAGE_URL: ipfs://IPFS-CID - Replace IPFS-CID with the IPFS CID of your folder you took note of.
BASE_NAME: A name for each of your NFTs.
Description: A description of your NFT collection.
python3 metadata.py
Your metadata files will be found in the json
folder.
https://ipfs.filebase.io/ipfs/IPFS_CID
Replace IPFS_CID with your folder’s IPFS CID.