Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/merokudao/pycaster-boilerplate
A mini App Store in a farcaster frame.
https://github.com/merokudao/pycaster-boilerplate
farcaster farcaster-frames python
Last synced: 15 days ago
JSON representation
A mini App Store in a farcaster frame.
- Host: GitHub
- URL: https://github.com/merokudao/pycaster-boilerplate
- Owner: merokudao
- License: mit
- Created: 2024-02-11T06:20:12.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-05-21T07:35:37.000Z (8 months ago)
- Last Synced: 2024-12-04T13:29:08.256Z (about 1 month ago)
- Topics: farcaster, farcaster-frames, python
- Language: Python
- Homepage: https://warpcast.com/pranav/0xeaaa2196
- Size: 1.21 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyCaster Boilerplate
PyCaster is a python lib that makes it easy to build apps on Farcaster. It can be
used to create Farcaster Frames. This boilerplate provides a demo of it's usage.Using PyCaster to build your frames backend is easy. I wrote a blog post about it at [https://pranavprakash.in/2024/02/12/building-a-farcaster-frame-in-python-with-flask/](https://pranavprakash.in/2024/02/12/building-a-farcaster-frame-in-python-with-flask/)
If you have any questions, open an issue in this repo or [cast to me on Farcaster](https://warpcast.com/pranav)
# Getting Started
## Install
1. Clone this repo
```shell
git clone [email protected]:merokudao/pycaster-boilerplate.git
```2. Optional
Create a virtual environment using `python -m venv venv` and
activate it using `source venv/bin/activate`3. Install Dependencies
```shell
pip install -r requirements.txt
```## Environment Variables
Depending on your use case, you may need to set one or more of the
following env variables that are needed by PyCaster.| Var | Required | Description |
|:----------|:----------|:----------|
| NEYNAR_API_KEY | Recommended | Used to perform various crucial calls related to user. If your app does user related functions (ex: check if the user follows a channel or has casted something), this will be needed. |
| REDIS_HOST | Yes | Highly recommended to increase speed of frame response. Without this, the `pycaster` lib has to be changed significantly to bypass. |
| MEROKU_API_KEY | Optional | Required if you're building on Meroku dApp Store Kit APIs |
| OPENAI_API_KEY | Optional | Required if you're using OpenAI |
| AWS_ACCESS_KEY_ID | Optional | If your frame needs to upload media to S3, this is needed. |
| AWS_SECRET_ACCESS_KEY | Optional | If your frame needs to upload media to S3, this is needed. |Create your own `.env` by copying from `.env.example`.
```shell
cp .env.example .env
```Set env variables in terminal by
```shell
set -a; source .env; set +a
```
## Run### Local
RUN using
```shell
flask run --host 0.0.0.0 --port 9091
```### Docker
#### Build
`docker build -t pycasterdemo .`
#### Run
`docker run -p 9091:5000 --env-file .env pycasterdemo`
## Check
`ruff .`
# ContributingWe'd love to accept contriutions. Please open an issue with what you'd like to build and we'll discuss and take it from there.