How To Create Metadata For NFT Collections On OpenSea Using Python

And where to store the data

Eric Kleppen
Coinmonks
Published in
5 min readApr 15, 2022

--

https://trippyeggs.com (image by author)

So you’ve created NFT artwork…

When I created the TrippyEggs NFT collection, I did it all in Blender manually instead of using a tool like HashLips Art Engine. Art engines that are used to create generative art collections like Bored Ape Yacht Club often include a way to generate the metadata. I had to come up with my own way to create the metadata and decided to use Python.

What is NFT metadata?

An NFT’s metadata is what describes its properties, including things like name, description, image… etc. It is most often stored in JSON format. When you go to an NFT marketplace like opensea.io, the NFT image you see typically comes from a URL in the NFT’s metadata. The image’s web address is stored in the metadata because storing images on a blockchain is expensive, and thus most NFT images are stored off-chain. To make it easy for marketplaces and wallets to understand the metadata, NFT metadata follows standards.

Storing metadata

The metadata must be stored somewhere off-chain since the NFT only stores the URI to it. To store the metadata, I’m using the InterPlanetary File System (IPFS) solution called pinata.cloud. The…

--

--