darwintree / dual-space-nft-oracle

Home Page:https://dual-space-nft-oracle.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:package: deploy-python-fastapi-in-vercel

πŸ“¦ deploy-python-fastapi-in-vercel

This example shows how to use FastApi on Vercel with Serverless Functions using the Python Runtime.

Issues GitHub pull requests
Report Bug Request Feature

Systems on which it has been tested.

Ubuntu Windows

Did you like the project? Please, considerate a donation to help improve!

✨

Getting started

Deploy with Vercel

Local environment vars for test

ORACLE_KEY='0x4f29dd2ae711752ff3db97341b136926dc69bfc52f375c02b54d6d26cc2fe6f4'
AUTHORIZER_KEY='0x3ebcced59d9709a245a385c17e0dd874a5d4f0162a6d9c6f14c3ca16819c6f88'
ORACLE_BATCH_NBR=20484047
CORE_CONTRACT_ADDRESS=CFXTEST:TYPE.CONTRACT:ACCAVY7U2ST7ECKDN5V5RWYHHG9XVEYVRANCKZ38DK
CLIENT_SECRET=ad10f2758520ff32af77532733f92c7c91feb819
CLIENT_ID=d0c381ebc79d32d0ed38
CROWDIN_CLIENT_ID=Twl7fLNfVagmoEUiWPEO
CROWDIN_CLIENT_SECRET=DDqcqsr2oKY6WK6AKWJeWJqY4JByOXSZQAORFNCv
CROWDIN_REDIRECT_URI=http://localhost:3000/crowdinCallback

FastApi + Vercel

This example shows how to use FastApi 0.88.0 on Vercel with Serverless Functions using the Python Runtime.

Python testing Docker Image CI

Demo

deploy-python-fastapi-in-vercel.vercel.app

How it Works

This example uses the Web Server Gateway Interface (WSGI) with FastApi to enable handling requests on Vercel with Serverless Functions.

Running Locally

With Docker

# Build the Docker image
docker build -t deploy-python-fastapi-in-vercel .

# Run the Docker container
docker run -p 8000:8000 deploy-python-fastapi-in-vercel

With uvicorn

Install dependencies

pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8000

Your FastApi application is now available at http://localhost:8000.

One-Click Deploy

Deploy the example using Vercel:

Deploy with Vercel

🀝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

Or buy me a coffee πŸ™ŒπŸΎ

πŸ“ License

Copyright Β© 2023 Hebert F Barros.
This project is MIT licensed.

About

https://dual-space-nft-oracle.vercel.app


Languages

Language:Python 96.8%Language:Dockerfile 3.2%