How the NFT wave has helped me earn $1000+ as a python developer

Pratik Choudhari
Level Up Coding
Published in
3 min readJan 24, 2022

--

It’s not as difficult as you think

The $69 Million JPG, Source: Beeple

The NFT scene has taken a monumental turn in recent years due to widespread digital art awareness and technological improvements in blockchain technologies like smart contracts creation and their deployments. Ethereum is the first blockchain to introduce NFTs via their ERC-721 standard and is the most widely used even today.

The interesting part is, you are not required to know anything about blockchain technology to do the work I did, it was pure Python and the Pillow library.

Structure of NFTs

Source: cool cats

Most NFTs have common traits which vary based on their creator’s rarity decisions. For instance, take the cool cats nft image above, they all have exactly same body structure and common traits like a hat, a face, a shirt and another trait called as tier. Every trait variation is stored as a PNG image which can be stacked on other trait images by blending their alpha channel(transparency) to get the desired image.

Another beautiful example would be the Bright Palz nft on cardano blockchain and here’s their rarity distribution.

Source : CNFT

Tools used

Python is a general purpose language and honestly it is capable of doing literally everything including Image Manipulation, which is of essence in NFT creation.

Tools used:

  • Pillow library
  • Imageio library
  • csv and json to export metadata

The process

As mentioned earlier, all trait images are stored as PNG images and all a program has to do is stack them, while doing the trait selection based on rarity distribution.

Pseudocode:

1. Repeat while N images are generated
a. Create an empty mapping for trait name and its value
b. Perform trait selection
c. Read selected traits files and stack them
d. Make an entry in metadata
e. Save the Image
2. Export metadata as a json and CSV file

Remember, there might be additional logic involved based on the creator’s requirements to include more ecstatic Images/GIF.

The final code generated is reusable and can be recycled with minor changes to suit another NFT project. Until now I have worked on 2 projects, with one of them sold out in days.

Conclusion

So, that was a little tour of how the technology I was involved in for a while helped me financially and intellectually. NFT creators look for developers on freelance websites like fiverr, freelancer and upwork, once you get a gig, it’ll be easier to get onboard new projects. Thanks for reading till the end. Stick around for more articles on Python and Automation.

--

--