toolframe-web 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- toolframe_web-0.1.0/.github/dependabot.yml +19 -0
- toolframe_web-0.1.0/.github/workflows/ci.yml +40 -0
- toolframe_web-0.1.0/.github/workflows/publish.yml +65 -0
- toolframe_web-0.1.0/.github/workflows/quality.yml +63 -0
- toolframe_web-0.1.0/.gitignore +11 -0
- toolframe_web-0.1.0/.pre-commit-config.yaml +29 -0
- toolframe_web-0.1.0/CONTRIBUTING.md +44 -0
- toolframe_web-0.1.0/LICENSE +202 -0
- toolframe_web-0.1.0/NOTICE +7 -0
- toolframe_web-0.1.0/PKG-INFO +83 -0
- toolframe_web-0.1.0/README.md +60 -0
- toolframe_web-0.1.0/authoring.json +29 -0
- toolframe_web-0.1.0/cchk.toml +10 -0
- toolframe_web-0.1.0/docs/access.md +54 -0
- toolframe_web-0.1.0/docs/assets.md +133 -0
- toolframe_web-0.1.0/docs/authoring.md +89 -0
- toolframe_web-0.1.0/docs/ci.md +22 -0
- toolframe_web-0.1.0/docs/releasing.md +42 -0
- toolframe_web-0.1.0/pyproject.toml +45 -0
- toolframe_web-0.1.0/scripts/check_branch_name.py +59 -0
- toolframe_web-0.1.0/scripts/validate_release.py +181 -0
- toolframe_web-0.1.0/src/toolframe_web/__init__.py +5 -0
- toolframe_web-0.1.0/src/toolframe_web/asset_delivery.py +51 -0
- toolframe_web-0.1.0/src/toolframe_web/assets.py +205 -0
- toolframe_web-0.1.0/src/toolframe_web/authoring.py +29 -0
- toolframe_web-0.1.0/src/toolframe_web/cli.py +29 -0
- toolframe_web-0.1.0/src/toolframe_web/plugin.py +508 -0
- toolframe_web-0.1.0/src/toolframe_web/policy.py +31 -0
- toolframe_web-0.1.0/src/toolframe_web/prepare.py +447 -0
- toolframe_web-0.1.0/src/toolframe_web/render.py +79 -0
- toolframe_web-0.1.0/src/toolframe_web/request_body.py +95 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/.gitignore +7 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/LICENSE +21 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/README.md +63 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/pyproject.toml +25 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/__init__.py +1 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/contracts.py +50 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/plugin.py +76 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/service.py +81 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/__init__.py +0 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/app/__init__.py +16 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/app/index.js +3 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/app/styles/input.css +1 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/__init__.py +0 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/__init__.py +6 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/api/__init__.py +17 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/index.js +1 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/model/__init__.py +26 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/model/count.js +6 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/ui/__init__.py +0 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/ui/index.js +47 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/ui/routes.py +94 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/ui/templates/index.html +23 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/src/toolframe_web_notes/web/pages/notes/ui/templates/notes.html +29 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/tests/test_contracts.py +30 -0
- toolframe_web-0.1.0/src/toolframe_web/templates/notes/web-assets.toml +54 -0
- toolframe_web-0.1.0/tests/browser_probe.py +247 -0
- toolframe_web-0.1.0/tests/test_assets.py +156 -0
- toolframe_web-0.1.0/tests/test_authoring.py +61 -0
- toolframe_web-0.1.0/tests/test_provider.py +473 -0
- toolframe_web-0.1.0/tests/test_starter_contracts.py +124 -0
- toolframe_web-0.1.0/uv.lock +615 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: github-actions
|
|
4
|
+
directory: /
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
open-pull-requests-limit: 4
|
|
8
|
+
commit-message:
|
|
9
|
+
prefix: chore(ci)
|
|
10
|
+
pull-request-branch-name:
|
|
11
|
+
prefix: chore
|
|
12
|
+
template: '{prefix}/{name}'
|
|
13
|
+
groups:
|
|
14
|
+
actions-dependencies:
|
|
15
|
+
applies-to: version-updates
|
|
16
|
+
patterns: ['*']
|
|
17
|
+
actions-security:
|
|
18
|
+
applies-to: security-updates
|
|
19
|
+
patterns: ['*']
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Validate Python distribution
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
workflow_call:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
validate:
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
timeout-minutes: 25
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-24.04, macos-15]
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
26
|
+
with:
|
|
27
|
+
python-version: '3.14.7'
|
|
28
|
+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
|
29
|
+
with:
|
|
30
|
+
version: '0.12.8'
|
|
31
|
+
enable-cache: false
|
|
32
|
+
- name: Test and install wheel and source distribution
|
|
33
|
+
run: python scripts/validate_release.py --output dist/validated
|
|
34
|
+
- name: Retain only validated distributions
|
|
35
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
36
|
+
with:
|
|
37
|
+
name: python-dist-${{ matrix.os }}
|
|
38
|
+
path: dist/validated/*
|
|
39
|
+
if-no-files-found: error
|
|
40
|
+
retention-days: 14
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Publish Python distribution
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
index:
|
|
7
|
+
description: Package index; run against the matching vVERSION tag
|
|
8
|
+
type: choice
|
|
9
|
+
options: [testpypi, pypi]
|
|
10
|
+
default: testpypi
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: publish-${{ inputs.index }}
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
release-tag:
|
|
22
|
+
runs-on: ubuntu-24.04
|
|
23
|
+
timeout-minutes: 5
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.14.7'
|
|
31
|
+
- name: Require the exact package version tag
|
|
32
|
+
env:
|
|
33
|
+
RELEASE_REF: ${{ github.ref }}
|
|
34
|
+
run: |
|
|
35
|
+
python - <<'PYCODE'
|
|
36
|
+
import os, pathlib, tomllib
|
|
37
|
+
project = tomllib.loads(pathlib.Path('pyproject.toml').read_text())['project']
|
|
38
|
+
expected = 'refs/tags/v' + project['version']
|
|
39
|
+
if os.environ['RELEASE_REF'] != expected:
|
|
40
|
+
raise SystemExit('Publication requires ' + expected)
|
|
41
|
+
PYCODE
|
|
42
|
+
|
|
43
|
+
validate:
|
|
44
|
+
needs: release-tag
|
|
45
|
+
uses: ./.github/workflows/ci.yml
|
|
46
|
+
secrets: inherit
|
|
47
|
+
|
|
48
|
+
publish:
|
|
49
|
+
needs: [release-tag, validate]
|
|
50
|
+
runs-on: ubuntu-24.04
|
|
51
|
+
timeout-minutes: 10
|
|
52
|
+
environment:
|
|
53
|
+
name: ${{ inputs.index }}
|
|
54
|
+
permissions:
|
|
55
|
+
contents: read
|
|
56
|
+
id-token: write
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
59
|
+
with:
|
|
60
|
+
name: python-dist-ubuntu-24.04
|
|
61
|
+
path: dist/
|
|
62
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
63
|
+
with:
|
|
64
|
+
packages-dir: dist/
|
|
65
|
+
repository-url: ${{ inputs.index == 'testpypi' && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Code quality
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
types: [opened, synchronize, reopened, edited]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
branch-policy:
|
|
15
|
+
runs-on: ubuntu-24.04
|
|
16
|
+
timeout-minutes: 5
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
19
|
+
with:
|
|
20
|
+
persist-credentials: false
|
|
21
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.14.7'
|
|
24
|
+
- name: Check the actual source branch
|
|
25
|
+
env:
|
|
26
|
+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
|
27
|
+
run: python scripts/check_branch_name.py "$BRANCH_NAME"
|
|
28
|
+
|
|
29
|
+
code-quality:
|
|
30
|
+
runs-on: ubuntu-24.04
|
|
31
|
+
timeout-minutes: 10
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
34
|
+
with:
|
|
35
|
+
persist-credentials: false
|
|
36
|
+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
|
37
|
+
with:
|
|
38
|
+
version: '0.12.8'
|
|
39
|
+
enable-cache: false
|
|
40
|
+
- name: Check Python lint and formatting
|
|
41
|
+
run: uvx prek==0.5.5 run ruff-check ruff-format --all-files --show-diff-on-failure
|
|
42
|
+
|
|
43
|
+
commit-policy:
|
|
44
|
+
if: github.event_name == 'pull_request'
|
|
45
|
+
runs-on: ubuntu-24.04
|
|
46
|
+
timeout-minutes: 10
|
|
47
|
+
permissions:
|
|
48
|
+
contents: read
|
|
49
|
+
pull-requests: read
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
52
|
+
with:
|
|
53
|
+
fetch-depth: 0
|
|
54
|
+
persist-credentials: false
|
|
55
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
56
|
+
with:
|
|
57
|
+
python-version: '3.14.7'
|
|
58
|
+
- uses: commit-check/commit-check-action@a61779784a953fd9047c001c102cfeac5cf26964 # commit-check 2.18.3
|
|
59
|
+
with:
|
|
60
|
+
message: true
|
|
61
|
+
branch: false
|
|
62
|
+
pr-title: true
|
|
63
|
+
pr-comments: false
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
default_install_hook_types: [pre-commit, commit-msg]
|
|
2
|
+
default_stages: [pre-commit]
|
|
3
|
+
default_language_version:
|
|
4
|
+
python: python3.11
|
|
5
|
+
|
|
6
|
+
repos:
|
|
7
|
+
- repo: local
|
|
8
|
+
hooks:
|
|
9
|
+
- id: check-branch-name
|
|
10
|
+
name: Check branch naming policy
|
|
11
|
+
entry: python scripts/check_branch_name.py
|
|
12
|
+
language: python
|
|
13
|
+
always_run: true
|
|
14
|
+
pass_filenames: false
|
|
15
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
16
|
+
rev: v0.16.8
|
|
17
|
+
hooks:
|
|
18
|
+
- id: ruff-check
|
|
19
|
+
types_or: [python, pyi]
|
|
20
|
+
files: '^(src|tests|scripts)/'
|
|
21
|
+
- id: ruff-format
|
|
22
|
+
types_or: [python, pyi]
|
|
23
|
+
args: [--check]
|
|
24
|
+
files: '^(src|tests|scripts)/'
|
|
25
|
+
- repo: https://github.com/commit-check/commit-check
|
|
26
|
+
rev: v2.18.3
|
|
27
|
+
hooks:
|
|
28
|
+
- id: check-message
|
|
29
|
+
stages: [commit-msg]
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Use Python 3.14.7 and uv 0.12.8. Run the same fresh-environment validation as CI:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
python3.14 scripts/validate_release.py --output build/release-dist
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The output directory must be absent or empty. Before an SDK release is available,
|
|
10
|
+
append `--wheelhouse /path/to/matching-wheels`. The validator builds wheel and
|
|
11
|
+
sdist, checks package metadata and licenses, runs the package suite against the
|
|
12
|
+
installed wheel, and checks independent wheel and sdist consumers. See
|
|
13
|
+
[CI](docs/ci.md) and [releasing](docs/releasing.md).
|
|
14
|
+
|
|
15
|
+
Package tests cover preparation, sealed assets, HTTP handling and lifecycle
|
|
16
|
+
boundaries. Installed acceptance additionally exercises the matching Core and
|
|
17
|
+
provider wheels through the public application URL, authentication, browser
|
|
18
|
+
forms, mount changes, update failures and retained business data. Neither test
|
|
19
|
+
layer substitutes for the other. Platform/compiler and external-authentication
|
|
20
|
+
combinations require their own execution evidence.
|
|
21
|
+
|
|
22
|
+
For a browser qualification run against the installed wheel, use that
|
|
23
|
+
environment's Python to run `tests/browser_probe.py --output build/browser-probe`.
|
|
24
|
+
Open both printed URLs. The allowed app must report successful classic/module
|
|
25
|
+
Worker imports, fetch and WASM, import maps, dynamic ESM, CSS URLs and SVG images.
|
|
26
|
+
The restricted app must keep imports working while Worker fetch is blocked.
|
|
27
|
+
Optional `--font PATH.woff2` and `--alpine PATH.js` accept licensed local inputs;
|
|
28
|
+
the Alpine input must be its browser-ready CSP build. Click its counter and record
|
|
29
|
+
the actual browser/version and input hashes. This fixture uses synthetic admission;
|
|
30
|
+
also verify the real Core gateway and authenticated application separately.
|
|
31
|
+
|
|
32
|
+
Keep generated build/test output in `build/` or `dist/`, local reports in `.local/`,
|
|
33
|
+
and issue working state in `.issues/`. Business fixtures belong in tests; public
|
|
34
|
+
examples must use public SDK/provider interfaces.
|
|
35
|
+
|
|
36
|
+
Install `prek==0.5.5` and run `prek install --allow-missing-config`. The repository
|
|
37
|
+
hooks check branch names, Ruff lint/format, and Conventional Commit messages.
|
|
38
|
+
`prek run --all-files` uses the same pinned Ruff configuration. Work branches use
|
|
39
|
+
`feat/`, `fix/`, `release/` or `chore/` plus a lowercase hyphenated description;
|
|
40
|
+
release versions may contain dots. See [cchk.toml](cchk.toml).
|
|
41
|
+
|
|
42
|
+
Keep this repository independently installable. Do not substitute editable sibling
|
|
43
|
+
sources for wheel-combination verification. Remote publication is a separate
|
|
44
|
+
release action with published dependency versions and platform verification.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
toolframe-web
|
|
2
|
+
Copyright 2026 byfb
|
|
3
|
+
|
|
4
|
+
The Notes template under src/toolframe_web/templates/notes/ is licensed under
|
|
5
|
+
the MIT License. Generated projects retain its LICENSE. The provider implementation
|
|
6
|
+
remains Apache-2.0. Distribution metadata uses Apache-2.0 AND MIT for these
|
|
7
|
+
separately licensed files.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: toolframe-web
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: HTML applications and sealed browser assets for Toolframe
|
|
5
|
+
Project-URL: Homepage, https://github.com/toolframe/toolframe-web
|
|
6
|
+
Project-URL: Repository, https://github.com/toolframe/toolframe-web
|
|
7
|
+
Project-URL: Documentation, https://github.com/toolframe/toolframe-web#readme
|
|
8
|
+
Project-URL: Issues, https://github.com/toolframe/toolframe-web/issues
|
|
9
|
+
Author-email: byfb <62798989+byfb@users.noreply.github.com>
|
|
10
|
+
License-Expression: Apache-2.0 AND MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
License-File: NOTICE
|
|
13
|
+
License-File: src/toolframe_web/templates/notes/LICENSE
|
|
14
|
+
Requires-Python: >=3.14
|
|
15
|
+
Requires-Dist: jinja2<4,>=3.1.6
|
|
16
|
+
Requires-Dist: python-multipart<1,>=0.0.22
|
|
17
|
+
Requires-Dist: starlette<1,>=0.52
|
|
18
|
+
Requires-Dist: toolframe-sdk==0.4.1
|
|
19
|
+
Requires-Dist: uvicorn==0.42.0
|
|
20
|
+
Provides-Extra: authoring
|
|
21
|
+
Requires-Dist: tomlkit<1,>=0.13; extra == 'authoring'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# Toolframe Web
|
|
25
|
+
|
|
26
|
+
Toolframe Web serves Python-authored HTML applications through Toolframe's public
|
|
27
|
+
URL. Each application owns its templates, browser libraries and styles, and calls
|
|
28
|
+
business services with the visitor's existing permissions.
|
|
29
|
+
|
|
30
|
+
## Quick start
|
|
31
|
+
|
|
32
|
+
Use Python 3.14+, Core 0.8 and SDK 0.4.1. Discover and generate the Notes
|
|
33
|
+
template from its package; an initialized application or enabled provider is not
|
|
34
|
+
needed for this authoring step:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
toolframe --home APP template show toolframe-web/notes --from pypi:toolframe-web==0.1.0 --json
|
|
38
|
+
toolframe --home APP plugin new notes --from pypi:toolframe-web==0.1.0 --template toolframe-web/notes
|
|
39
|
+
toolframe --home APP web prepare APP/plugins/notes
|
|
40
|
+
|
|
41
|
+
# Start APP separately, then explicitly install its runtime providers:
|
|
42
|
+
toolframe --home APP plugin add pypi:toolframe-sql-sqlite==0.4.0 --enable
|
|
43
|
+
toolframe --home APP plugin add pypi:toolframe-web==0.1.0 --enable
|
|
44
|
+
# Install the wheel path printed by prepare:
|
|
45
|
+
toolframe --home APP plugin add APP/plugins/notes/build/web/toolframe_notes-0.1.0-py3-none-any.whl --enable
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Select `schema_version = 2` and explicitly mount `web.notes.main` in the
|
|
49
|
+
application's `toolframe.toml`, then apply it:
|
|
50
|
+
|
|
51
|
+
```toml
|
|
52
|
+
[gateway.mounts."web.notes.main"]
|
|
53
|
+
prefix = "/"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
toolframe --home APP apply
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The distribution ships a static authoring manifest and owns the full Notes/FSD
|
|
61
|
+
template, generator and asset preparation. `--presentation web` remains an alias
|
|
62
|
+
for this optional template. Default `plugin new` creates Core's basic service.
|
|
63
|
+
Acquiring this template does not enable or mount the provider. Use an index source
|
|
64
|
+
only when its authoring wheel is available, or configure matching local wheels.
|
|
65
|
+
|
|
66
|
+
See [authoring](docs/authoring.md) for routes and forms, and
|
|
67
|
+
[browser assets](docs/assets.md) for preparation and optional Tailwind.
|
|
68
|
+
|
|
69
|
+
Web applications share a dedicated Python environment, independently of business
|
|
70
|
+
workers and Streamlit. They are trusted code on the application's origin. This
|
|
71
|
+
provider supports finite HTTP handlers, forms, JSON and sealed static assets.
|
|
72
|
+
General WebSockets, SSE, streaming responses and arbitrary ASGI mounts are outside
|
|
73
|
+
Web contract v1. See [access and limits](docs/access.md).
|
|
74
|
+
|
|
75
|
+
Browser-ready files need no Node or npm. The recommended new-app recipe uses
|
|
76
|
+
htmx and an optional pinned Tailwind standalone compiler. Installed wheels serve
|
|
77
|
+
local assets without compilation or CDN requests. Applications may instead use
|
|
78
|
+
ordinary CSS and other browser-ready libraries.
|
|
79
|
+
|
|
80
|
+
The provider is Apache-2.0 licensed; the packaged Notes template is MIT-licensed
|
|
81
|
+
and generated projects retain its license. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
82
|
+
Third-party assets retain their own licenses. Development instructions are in
|
|
83
|
+
[Contributing](CONTRIBUTING.md).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Toolframe Web
|
|
2
|
+
|
|
3
|
+
Toolframe Web serves Python-authored HTML applications through Toolframe's public
|
|
4
|
+
URL. Each application owns its templates, browser libraries and styles, and calls
|
|
5
|
+
business services with the visitor's existing permissions.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
Use Python 3.14+, Core 0.8 and SDK 0.4.1. Discover and generate the Notes
|
|
10
|
+
template from its package; an initialized application or enabled provider is not
|
|
11
|
+
needed for this authoring step:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
toolframe --home APP template show toolframe-web/notes --from pypi:toolframe-web==0.1.0 --json
|
|
15
|
+
toolframe --home APP plugin new notes --from pypi:toolframe-web==0.1.0 --template toolframe-web/notes
|
|
16
|
+
toolframe --home APP web prepare APP/plugins/notes
|
|
17
|
+
|
|
18
|
+
# Start APP separately, then explicitly install its runtime providers:
|
|
19
|
+
toolframe --home APP plugin add pypi:toolframe-sql-sqlite==0.4.0 --enable
|
|
20
|
+
toolframe --home APP plugin add pypi:toolframe-web==0.1.0 --enable
|
|
21
|
+
# Install the wheel path printed by prepare:
|
|
22
|
+
toolframe --home APP plugin add APP/plugins/notes/build/web/toolframe_notes-0.1.0-py3-none-any.whl --enable
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Select `schema_version = 2` and explicitly mount `web.notes.main` in the
|
|
26
|
+
application's `toolframe.toml`, then apply it:
|
|
27
|
+
|
|
28
|
+
```toml
|
|
29
|
+
[gateway.mounts."web.notes.main"]
|
|
30
|
+
prefix = "/"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
toolframe --home APP apply
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The distribution ships a static authoring manifest and owns the full Notes/FSD
|
|
38
|
+
template, generator and asset preparation. `--presentation web` remains an alias
|
|
39
|
+
for this optional template. Default `plugin new` creates Core's basic service.
|
|
40
|
+
Acquiring this template does not enable or mount the provider. Use an index source
|
|
41
|
+
only when its authoring wheel is available, or configure matching local wheels.
|
|
42
|
+
|
|
43
|
+
See [authoring](docs/authoring.md) for routes and forms, and
|
|
44
|
+
[browser assets](docs/assets.md) for preparation and optional Tailwind.
|
|
45
|
+
|
|
46
|
+
Web applications share a dedicated Python environment, independently of business
|
|
47
|
+
workers and Streamlit. They are trusted code on the application's origin. This
|
|
48
|
+
provider supports finite HTTP handlers, forms, JSON and sealed static assets.
|
|
49
|
+
General WebSockets, SSE, streaming responses and arbitrary ASGI mounts are outside
|
|
50
|
+
Web contract v1. See [access and limits](docs/access.md).
|
|
51
|
+
|
|
52
|
+
Browser-ready files need no Node or npm. The recommended new-app recipe uses
|
|
53
|
+
htmx and an optional pinned Tailwind standalone compiler. Installed wheels serve
|
|
54
|
+
local assets without compilation or CDN requests. Applications may instead use
|
|
55
|
+
ordinary CSS and other browser-ready libraries.
|
|
56
|
+
|
|
57
|
+
The provider is Apache-2.0 licensed; the packaged Notes template is MIT-licensed
|
|
58
|
+
and generated projects retain its license. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
59
|
+
Third-party assets retain their own licenses. Development instructions are in
|
|
60
|
+
[Contributing](CONTRIBUTING.md).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"requires_core": ">=0.8,<0.9",
|
|
4
|
+
"templates": [
|
|
5
|
+
{
|
|
6
|
+
"id": "notes",
|
|
7
|
+
"title": "Web Notes",
|
|
8
|
+
"description": "Persistent notes with an FSD Web presentation, bounded service schemas, scopes, idempotency and revisions.",
|
|
9
|
+
"parameters": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"name": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[a-z][a-z0-9-]{0,63}$",
|
|
15
|
+
"description": "Plugin identifier used for the distribution, module and service namespace."
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"name"
|
|
20
|
+
],
|
|
21
|
+
"additionalProperties": false
|
|
22
|
+
},
|
|
23
|
+
"generator": "toolframe_web.authoring:generate"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"prepare": {
|
|
27
|
+
"entrypoint": "toolframe_web.authoring:prepare"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[commit]
|
|
2
|
+
conventional_commits = true
|
|
3
|
+
allow_commit_types = ["feat", "fix", "docs", "style", "refactor", "test", "chore", "perf", "build", "ci"]
|
|
4
|
+
|
|
5
|
+
[branch]
|
|
6
|
+
conventional_branch = true
|
|
7
|
+
allow_branch_types = ["feat", "fix", "release", "chore"]
|
|
8
|
+
allow_branch_names = ["main"]
|
|
9
|
+
# scripts/check_branch_name.py enforces these names literally, without the
|
|
10
|
+
# additional standalone branch exceptions built into commit-check.
|