devinaconley / python-framelib

framelib is a lightweight library for building farcaster frames using python and flask
https://python-frame.vercel.app
20 stars 1 forks source link

framelib

lightweight library for building farcaster frames using python and flask

quickstart

install framelib from pip

pip install framelib

simple example

from flask import Flask, url_for
from framelib import frame

app = Flask(__name__)

@app.route('/')
def home():
    return frame(
        image='https://framelib.s3.us-east-1.amazonaws.com/framelib_logo.png',
        button1='next',
        post_url=url_for('second_page', _external=True),
    )

examples

see a complete example using python + flask + vercel here

for an example that uses on-chain frame transactions, see the weth frame

for a demo of eip-712 signatures, text inputs, image rendering, and links, see playground

and for a more advanced example involving multiplayer games, supabase integration, dynamic image rendering, and more, see rock paper scissors

roadmap

upcoming features and improvements