Skip to main content

A zero-boilerplate framework for building interactive ChatGPT widgets

Project description

FastApps

The python framework for ChatGPT apps

PyPI Python PyPI Downloads License
CI Status Code style: black Ruff GitHub Stars


📚 Documentation: https://docs.fastapps.org/

👥 Community: Join Our Discord


Quick Start

We recommend installing FastApps with uv:

uv tool install fastapps
uv tool install --upgrade fastapps # Update to the latest version

For full installation instructions, including verification, upgrading from the official MCPSDK, and developer setup, see the Installation Guide.

then, you can quickstart by running commands below :

fastapps init my-app
cd my-app
fastapps dev

That's it! You'll gonna see an image with a public url. You can test the server with following guides.

alt text

The public url is one-time, generated with cloudflare tunnel.

Test App

MCP server is available at /mcp endpoint of fastapps server.
Example : https://your-public-url.trycloudflare.com/mcp

Option A: Test on MCPJam Inspector

Add your public URL + /mcp to ChatGPT.

npx @mcpjam/inspector@latest

Option B: Test on ChatGPT

Add your public URL + /mcp to ChatGPT's "Settings > Connectors" .

Creating More Widgets

fastapps create additional-widget

Using Widget Templates

FastApps provides pre-built templates to jumpstart your widget development:

# Create widget from a template
fastapps create my-list --list          # Vertical list with items
fastapps create my-carousel --carousel  # Horizontal scrolling cards
fastapps create my-albums --albums      # Photo gallery viewer

Editing Your Widget

You'll only need to edit these 2 folders:

server/tools/

This folder contains backend .py files, where you define conditions & server logics for the app.

Example :

### my_widget_tool.py
from fastapps import BaseWidget, Field, ConfigDict
from pydantic import BaseModel
from typing import Dict, Any

class MyWidgetInput(BaseModel):
    model_config = ConfigDict(populate_by_name=True)
    name: str = Field(default="World")

class MyWidgetTool(BaseWidget):
    identifier = "my-widget"
    title = "My Widget"
    input_schema = MyWidgetInput
    invoking = "Processing..."
    invoked = "Done!"
    
    widget_csp = {
        "connect_domains": [],      # APIs you'll call
        "resource_domains": []      # Images/fonts you'll use
    }
    
    async def execute(self, input_data: MyWidgetInput) -> Dict[str, Any]:
        # Your logic here
        return {
            "name": input_data.name,
            "message": f"Hello, {input_data.name}!"
        }

widgets/ - Frontend UI

The folder contains frontend component codes that will show up on the app screen according to the rules you've define with python codes above.

Apps in GPT components are react components - FastApps follows it. You can custom compoenents as you wish.

// my-widget/index.jsx
import React from 'react';
import { useWidgetProps } from 'fastapps';

export default function MyWidget() {
  const props = useWidgetProps();
  
  return (
    <div style={{
      padding: '40px',
      textAlign: 'center',
      background: '#4A90E2',
      color: 'white',
      borderRadius: '12px'
    }}>
      <h1>{props.message}</h1>
      <p>Welcome, {props.name}!</p>
    </div>
  );
}

That's it! These are the only files you need to write.


Contributing

We welcome contributions! Please see our contributing guidelines:

Quick Start for Contributors

# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/FastApps.git
cd FastApps

# Install uv (if not already installed)
# curl -LsSf https://astral.sh/uv/install.sh | sh

# Install development dependencies (recommended - matches CI)
uv sync --dev

# Or use pip (traditional approach)
# pip install -e ".[dev]"

# Install pre-commit hooks (already installed via uv sync --dev)
pre-commit install

# Make changes and ensure they pass checks
black .
ruff check --fix .
pytest

# Submit a pull request

License

MIT © Dooi Labs

Links

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

create_apps_in_chatgpt-1.3.6.tar.gz (258.7 kB view details)

Uploaded Source

Built Distribution

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

create_apps_in_chatgpt-1.3.6-py3-none-any.whl (83.0 kB view details)

Uploaded Python 3

File details

Details for the file create_apps_in_chatgpt-1.3.6.tar.gz.

File metadata

  • Download URL: create_apps_in_chatgpt-1.3.6.tar.gz
  • Upload date:
  • Size: 258.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for create_apps_in_chatgpt-1.3.6.tar.gz
Algorithm Hash digest
SHA256 7a26dd4bd5ae2c4d10ef5b8b4e0671e5e7b1bc5c41fb42ac1c6de5449145a84b
MD5 fd4a355842e8e5ef1cef4c8c18479fbc
BLAKE2b-256 4779989b1288dae5aa0d9dedf666545554c8a1763b22248d7316df7f094b2b60

See more details on using hashes here.

File details

Details for the file create_apps_in_chatgpt-1.3.6-py3-none-any.whl.

File metadata

File hashes

Hashes for create_apps_in_chatgpt-1.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 eae5cba9e73ddf3f7b2ed85ece60d6db67bdd5f83b11dc533ccadc17741f782d
MD5 a5ab93ee91b396d035534cad37b379d6
BLAKE2b-256 430b761f64b4238f7b79470256d30427124437feefc263f52728761a3693c69b

See more details on using hashes here.

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