Metadata-Version: 2.1
Name: framelib
Version: 0.0.0b5
Summary: lightweight library for building farcaster frames using python and flask
Home-page: https://github.com/devinaconley/python-frames
Author: Devin A. Conley
Author-email: devinaconley@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: flask <4,>=3
Requires-Dist: pydantic <3,>=2
Requires-Dist: requests <3,>=2

# 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
```python
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](https://github.com/devinaconley/python-frames/tree/main/examples/simple)

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)
