Home

Awesome

mypy-playground

CI GitHub license

The mypy playground provides Web UI to run mypy in the sandbox: https://mypy-play.net

https://gyazo.com/30cbc6dbd533834208e7ed099ce2f589

Features

Development

  1. Run docker compose up -d to start an app and Docker for running mypy
  2. Run docker compose exec docker docker build --pull -t ymyzk/mypy-playground-sandbox:latest /sandbox/latest to build a Docker image
  3. Open http://localhost:8000

Components

Configuration

Please run python -m mypy_playground --help to see all configurations. Configurations are considered in the following order:

  1. Command line arguments
  2. Environment variables
  3. Configuration file (config.toml)
  4. Default configurations
NameTypeRequiredDescription
DEBUGboolNoEnable debug mode (default: False)
PORTintNoPort number (default: 8080)
SANDBOXstrNoSandbox implementation to use (default: mypy_playground.sandbox.docker.DockerSandbox)
SANDBOX_CONCURRENCYintNoThe number of running sandboxes at the same time (default: 3)
GA_TRACKING_IDstrNoA tracking id for Google Analytics. If not specified, Google Analytics is disabled.
GITHUB_TOKENstrNoA token used to create gists
ENABLE_PROMETHEUSboolNoEnable Prometheus metrics endpoint (default: False)
MYPY_VERSIONSlistNoList of mypy versions used by a sandbox (default: mypy latest:latest)
DOCKER_IMAGESlistNoDocker images used by sandbox (default: latest:ymyzk/mypy-playground-sandbox:latest)
CLOUD_FUNCTIONS_BASE_URLstrNoURL of Cloud Functions without function name
CLOUD_FUNCTIONS_NAMESstrNoMap from mypy version ID to name of Cloud Functions
CLOUD_FUNCTIONS_IDENTITY_TOKENstrNoIdentity token for development purpose

Endpoints

Sponsoring

mypy Playground is looking for sponsors to host mypy-play.net using GitHub sponsors

Development of mypy Playground is supported by JetBrains software. See https://jb.gg/OpenSourceSupport for more details.