lightweight library for building farcaster frames using python and flask
Project description
python-frames
lightweight library for building farcaster frames using python and flask
- easily render frames that conform to the farcaster specification
- configurable frame design
- parse frame action messages
- verify the frame action signatures using neynar
- query user profile info from warpcast
quickstart
install framelib
from pip
pip install framelib
simple example
from flask import Flask, url_for, jsonify
from framelib import render_frame
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def home():
# initial frame
return render_frame(
# title='example title',
image='https://opengraph.githubassets.com/0x/devinaconley/python-frames',
button1='next',
post_url=url_for('second_page', _external=True),
button2='github',
button2_action='link',
button2_target='https://github.com/devinaconley/python-frames'
)
examples
see a complete example using python + flask + vercel here
and for a more advanced example involving multiplayer games, supabase integration, dynamic image rendering, and more, see rock paper scissors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
framelib-0.0.0b5.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for framelib-0.0.0b5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 613cd7dadb9557b657a615b52392f5692844cd83a4b599a5b9d69703661add1b |
|
MD5 | b857a9a29ad776609db4a2923df8d693 |
|
BLAKE2b-256 | 7072425b1c20127b862ea99e100b6c5571735e1cf5356c4b2a22cb7e445128ea |