This is a very simple sample Python Flask app for serving the ERC721 metadata for the OpenSea creatures ERC721 contracts, as specified in the OpenSea developer docs.
You'll need a machine with Python 3 installed.
You'll need a Google Cloud Storage account with a project, bucket, and credentials.
Create a .env file with the following:
export GOOGLE_STORAGE_PROJECT="<your_project>"
export GOOGLE_STORAGE_BUCKET="<your_bucket>"
Place your Google cloud storage credentials in a file called credentials/google-storage-credentials.json
.
Create a virtualenv with Python3 and run pip install -r requirements.txt
.
Run the API with python app.py
and hit http://localhost:5000/api/creature/1
To deploy on Heroku, set the GOOGLE_STORAGE_PROJECT
and GOOGLE_STORAGE_BUCKET
environment variables on your Heroku instance and deploy by pushing to your Heroku remote.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。