Skip to main content

lightweight library for building farcaster frames using python and flask

Project description

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

from flask import Flask, url_for
from framelib import frame

app = 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

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

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

  • mint actions
  • eip 712 signatures
  • generated library documentation
  • dynamic image rendering tools
  • compatibility with other web frameworks
  • state signing

Project details


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.6.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

framelib-0.0.6-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file framelib-0.0.6.tar.gz.

File metadata

  • Download URL: framelib-0.0.6.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for framelib-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a54d585487de1eda71315456957fdd1fd81876d19e94e33c04a3a008b4eacaba
MD5 f8b67243cb63a959dbfeb3a70724a1dc
BLAKE2b-256 5d2624ed2b6f28ac53ed97ab5de6eb50fa69f5a34847797451aba62390b4183f

See more details on using hashes here.

Provenance

The following attestation bundles were made for framelib-0.0.6.tar.gz:

Publisher: publish.yml on devinaconley/python-framelib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file framelib-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: framelib-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for framelib-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 355455b777efeab9ee69fe30618e3dc4d793cfa6af75a11a0c16b0b5322d1dcd
MD5 3cf628dedfce8734a60347ce61fd5255
BLAKE2b-256 250731f5977989033f808d0506d0dea24158df16c23d030938facac050d9c2aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for framelib-0.0.6-py3-none-any.whl:

Publisher: publish.yml on devinaconley/python-framelib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page