Skip to main content

Compose production Hayate projects for ASGI and Cloudflare Workers

Project description

create-hayate

Hayate ecosystem: Start here · Production golden app · Tested compatibility

Composable, production-oriented project scaffolding for hayate.

The golden path creates one application core with API routes, OpenAPI/Scalar, MCP 2025-11-25, checked SQL, Cloudflare Access identity, SQLite on ASGI, and D1 on Cloudflare Workers:

uvx create-hayate my-app --template workers --preset production
cd my-app
uv run pytest
uv run python manage_workers.py d1 migrations apply DB --local
uv run python manage_workers.py dev

The generated README keeps the scaffold-to-start path under ten documented minutes and includes a fail-closed production checklist.

Runtimes

Template Runtime Default composition
api (default) ASGI Tested TODO API
workers ASGI and Cloudflare Python Workers The same tested API
mcp ASGI and Workers workers + the MCP component

mcp remains a compatibility shortcut. It is not a copied template.

Features

Compose features explicitly instead of choosing from a template matrix:

uvx create-hayate my-app \
  --template workers \
  --with openapi,mcp,sql \
  --auth cloudflare-access
Feature Generated boundary
openapi OpenAPI 3.1.1, hardened Scalar, pinned TypeScript export
mcp MCP 2025-11-25 tools sharing request identity and storage
sql Migration-checked hayate-sql; SQLite on ASGI and D1 on Workers
--auth cloudflare-access Local explicit identity; production RS256/JWKS verification

All 40 supported runtime/feature/auth/entrypoint combinations, plus both production entrypoints, are generated, dependency resolved, and imported in CI. Invalid combinations fail before the destination directory is written; for example, Cloudflare Access production verification requires the Workers runtime.

Production preset

--preset production is the reviewed composition of:

  • openapi,mcp,sql;
  • Cloudflare Access identity;
  • exact-origin CORS;
  • secure response headers and a 1 MiB request-body ceiling;
  • a Cloudflare native rate-limit binding;
  • D1 migration and deployment configuration;
  • explicit secret, identity, CORS, abuse, observability, migration, and rollout checks in PRODUCTION.md.

Local CI drives the generated preset over both real ASGI HTTP and real workerd. The workerd path applies a real D1 migration, writes through the HTTP API, and reads the same authenticated data through MCP.

Design

  • Zero-dependency CLI. Generation uses only the standard library and bundled, versioned components; it performs no network fetch.
  • Small composition surface. One base app, one Workers runtime overlay, three feature components, and explicit auth/production components replace copied full-template combinations.
  • Portable application core. src/app.py does not change between ASGI and Workers. Runtime resources enter through the Hayate request context.
  • Feature-complete Workers default. WorkerEntrypoint remains the default. HTTP-only services can explicitly request --workers-entrypoint global.
  • Evidence over claims. CI runs unit tests, every dependency composition, real ASGI, real workerd, D1 migrations, MCP, workflow audit, and dependency audit.

The internal design memo (Japanese, per project convention) is DESIGN.md; release history is in CHANGELOG.md.

Status: alpha (0.5.x). Generated projects pin released compatibility lines. Public APIs may still move before 1.0.

License

MIT

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_hayate-0.5.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

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

create_hayate-0.5.1-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file create_hayate-0.5.1.tar.gz.

File metadata

  • Download URL: create_hayate-0.5.1.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for create_hayate-0.5.1.tar.gz
Algorithm Hash digest
SHA256 6eb6301e14885d9f466b41601176812275a56d047caecc10b77571ba0bf48baf
MD5 b1a75f0842b2f465d73f77b15fc0c71e
BLAKE2b-256 ee47c24e94442b42ccf69f3d67995f39c57a1f0d8d4e6b5fd6aa43d56949a602

See more details on using hashes here.

Provenance

The following attestation bundles were made for create_hayate-0.5.1.tar.gz:

Publisher: release.yml on hayatepy/create-hayate

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

File details

Details for the file create_hayate-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: create_hayate-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for create_hayate-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c85b0376579b5ebeacd37d9a98211f31cbd0c0154e3009cd2337aa9624d99e1
MD5 0fb7b49d947c056cc12247e66ec43a70
BLAKE2b-256 cd5b48f63f41d8aa4a62582be2b7ed361de7725d6ce7d8c6fadde43866f30171

See more details on using hashes here.

Provenance

The following attestation bundles were made for create_hayate-0.5.1-py3-none-any.whl:

Publisher: release.yml on hayatepy/create-hayate

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