Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devinaconley/python-frames
framelib is a lightweight library for building farcaster frames using python and flask
https://github.com/devinaconley/python-frames
Last synced: 25 days ago
JSON representation
framelib is a lightweight library for building farcaster frames using python and flask
- Host: GitHub
- URL: https://github.com/devinaconley/python-frames
- Owner: devinaconley
- Created: 2024-02-14T13:11:24.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-26T22:30:02.000Z (8 months ago)
- Last Synced: 2024-04-27T00:41:15.877Z (8 months ago)
- Language: Python
- Homepage: https://python-frame.vercel.app
- Size: 55.7 KB
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-frames - framelib, build frames with python and flask
README
# framelib
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
- on-chain frame transactions## quickstart
install `framelib` from pip
```
pip install framelib
```simple example
```python
from flask import Flask, url_for
from framelib import frameapp = Flask(__name__)
@app.route('/')
def home():
return frame(
image='https://opengraph.githubassets.com/0x/devinaconley/python-frames',
button1='next',
post_url=url_for('second_page', _external=True),
)
```## examples
see a complete example using python + flask + vercel [here](https://github.com/devinaconley/python-frames/tree/main/examples/simple)
for an example that uses on-chain frame transactions, see the [weth frame](https://github.com/devinaconley/python-frames/tree/main/examples/transaction)
and for a more advanced example involving multiplayer games, supabase integration, dynamic image rendering, and more,
see [rock paper scissors](https://github.com/devinaconley/rock-paper-scissors)## roadmap
upcoming features and improvements
- mint actions
- eip 712 signatures
- generated library documentation
- dynamic image rendering tools
- compatibility with other web frameworks
- state signing