https://github.com/devinaconley/python-framelib
framelib is a lightweight library for building farcaster frames using python and flask
https://github.com/devinaconley/python-framelib
Last synced: about 1 year ago
JSON representation
framelib is a lightweight library for building farcaster frames using python and flask
- Host: GitHub
- URL: https://github.com/devinaconley/python-framelib
- Owner: devinaconley
- Created: 2024-02-14T13:11:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-02T03:34:32.000Z (over 1 year ago)
- Last Synced: 2025-05-05T01:41:59.100Z (about 1 year ago)
- Language: Python
- Homepage: https://python-frame.vercel.app
- Size: 432 KB
- Stars: 21
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
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
- parse and verify frame action messages using neynar or hubs
- query user profile info from warpcast
- on-chain frame transactions
- eip-712 signatures
- mint tokens
## quickstart
install `framelib` from pip
```
pip install framelib
```
simple example
```python
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](https://github.com/devinaconley/python-framelib/tree/main/examples/simple)
for an example that uses on-chain frame transactions, see the [weth frame](https://github.com/devinaconley/python-framelib/tree/main/examples/transaction)
for a demo of eip-712 signatures, text inputs, image rendering, and links, see [playground](https://github.com/devinaconley/python-framelib/tree/main/examples/playground)
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
- **frames v2 support**