Skip to main content

Scaffolding tool & application framework for Python projects.

Project description

Scaf

Build more, sweat less.

Scaf is an opinionated filesystem-based project builder and domain-action runner for devs who just want to keep things simple. It solves the easy problems in application development, so you can focus on the hard ones.

Usage

Note: Currently only bash is supported (use WSL or git bash on Windows).

Install scaf (can be in your user/system env, but a venv is recommended):

pip install git+http://scaf.sycdan.com

Initialize scaf in your project root:

scaf init

Add this to your .venvrc or .bashrc file:

scaf discover . && source .scaf/aliases

Invoke an action (this will create it and add an alias, if it does not exist):

scaf call example/world/greet

Dev Server

Start the local dev server to run and test your domain actions from a browser UI:

scaf serve .

Then open http://localhost:54545.

Select an action, enter a JSON payload, choose which tests to run and whether you expect each to pass or fail, then hit Submit. The server saves the payload as a fixture in the action's fixtures/ folder and runs the selected tests in-process, returning live results. The server also hot-reloads any .py files under the deck as you edit them — no restart needed.

Additionally, you can launch the server with debugpy via VSCode's launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug dev server",
      "type": "debugpy",
      "request": "launch",
      "module": "scaf",
      "args": [
        "-vvv",
        "serve",
        "."
      ]
    }
  ]
}

Development

Keep dependencies to a minimum.

Use 2-space indentation in all Python files. Scaf's generated templates use 2-space indent, so consistency matters.

Environment Setup

source dev/env.sh [--nuke]

Note: If you change packages or hooks, nuke your env.

FAQ

How do I see verbose output from scaf calls?

Edit your .scaf/aliases file:

alias domain.action="scaf --vvv call $DECK/domain/action"
#                         ^ add this

Why am I getting Failed to load action package backend/domain/action: No module named 'domain'

Run scaf init in your app's PYTHONPATH directory (e.g. backend).

Why am I getting MyType | None is not callable?

You are probably on an old python version -- use Union[MyType, None] instead.

What is a venv?

A python virtual environment, allowing you to have project-specific dependencies. Create one thus:

python -m venv .venv

What is .venvrc?

A file intended to be sourced when your venv is activated. Typically placed in your project root.

Add this to the end of your venv activate script (e.g. .venv/Scripts/activate):

if [ -f "$VIRTUAL_ENV/"../.venvrc ]; then
  source "$VIRTUAL_ENV/"../.venvrc
fi

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

scafpy-2026.6.16.2.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

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

scafpy-2026.6.16.2-py3-none-any.whl (44.0 kB view details)

Uploaded Python 3

File details

Details for the file scafpy-2026.6.16.2.tar.gz.

File metadata

  • Download URL: scafpy-2026.6.16.2.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scafpy-2026.6.16.2.tar.gz
Algorithm Hash digest
SHA256 679e70ef7f314a54fd83b57ac7298b1475f3da62eb8cc39bc29f75d824fecc0f
MD5 927e0c549d670b9d4a79a4ecdc3e0cdf
BLAKE2b-256 fe6558f63fc502f5e8c200c72707d1690f44dce724c66caa3946f1fd81909bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for scafpy-2026.6.16.2.tar.gz:

Publisher: release.yml on sycdan/scaf

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

File details

Details for the file scafpy-2026.6.16.2-py3-none-any.whl.

File metadata

  • Download URL: scafpy-2026.6.16.2-py3-none-any.whl
  • Upload date:
  • Size: 44.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scafpy-2026.6.16.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00a1a26fe8823e3cc3f74f6e4bfbebc31cb3853650cc384b795ca754d14126ba
MD5 7ff8aa510efedda6a7806a77e93caf3d
BLAKE2b-256 8ffb4c551f8e25868da250d6e9377cf0ab2bced1a24008d1c07a0034b529e848

See more details on using hashes here.

Provenance

The following attestation bundles were made for scafpy-2026.6.16.2-py3-none-any.whl:

Publisher: release.yml on sycdan/scaf

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