Skip to main content

podpack-notes

A small notes app for podpack sites, and the worked example of what an app is.

It is deliberately not a stub: it has a model, a template, shipped data, per-app configuration and a nav entry, which between them exercise every part of the registry a real app would use.

Installing it into a site

Add the distribution as a dependency, then the import name to the site's app list:

# the site's pyproject.toml -- both, because an app does not pull in its framework
dependencies = ["podpack", "podpack-notes"]

[tool.uv.sources]
podpack = { git = "https://github.com/holdenweb/podpack.git" }
podpack-notes = { git = "https://github.com/holdenweb/podpack-notes.git" }
# the site's config/app.toml
[site]
apps = ["podpack_notes"]

[apps.notes]        # keyed by the app's name, not its import name
page_size = 20

Three spellings of one thing, and they are not interchangeable:

podpack-notes the distribution — what you depend on
podpack_notes the import name — what goes in apps
notes the app's own name, from its blueprint — what keys [apps.notes], [site.mounts], and its directories on disk

A site that wants it somewhere other than /notes says so in [site.mounts]; the app is not consulted and its nav entry follows anyway, because a Section names an endpoint rather than a path.

What it gives the site

A note belongs to the user who wrote it, and a user sees only their own.

GET /notes/ the caller's notes, in the site's own chrome
GET /notes/list the same as JSON
POST /notes/ {"text": "..."} → stores a row owned by the caller
POST /notes/uploads/<name> writes a file to the app's own data directory

The first three need a signed-in user — a browser session, or an Authentication-Token header carrying the token flask-security returns from a JSON POST to /login?include_auth_token (it withholds it without that parameter). flask-security answers an unauthenticated page request with a redirect to /login and an unauthenticated API call with a 401, and podpack installs it on every site, so a site has a login already. The upload route is unguarded: those files land in the app's one shared data directory and have never been anybody's in particular.

Notes are owned through podpack's own user table, which this app declares in needs_tables rather than defining. A site that installs it therefore needs at least one user before anybody can write anything:

flask --app <site> users create you@example.com --active

It ships a welcome.md, which podpack seeds into the app's host data directory the first time it is installed and never again. The app then reads the host copy, so editing it takes effect with no rebuild — which is the point of the convention rather than a detail of this app.

Upgrading a site to a version that owns its notes

This app ships no migrations, and cannot. There is one alembic history per site (podpack ADR-0009), so a site generates this app's schema into its own history and nothing will remind it to. Adding the owner column is a change a site has to make deliberately:

uv run alembic revision --autogenerate -m "notes: notes belong to a user"

Run that with the site's full app list enabled — with an app disabled, alembic faithfully proposes dropping its tables — and read the revision before applying it. owner_id is NOT NULL, so the generated upgrade() needs a line adding before it:

op.execute("DELETE FROM notes")   # no note predates ownership

That discards every existing note, which is the assumption this release was written under. A site with notes worth keeping should instead add the column nullable, backfill an owner into every row, and only then tighten it — a direct NOT NULL add fails on a table with rows in it.

Developing it

uv sync --all-groups
uv run pytest
uv run mypy

The tests build a real podpack site with this app installed, so what they prove is that the app conforms to the contract, not merely that its own functions work.

pyproject.toml points podpack at a sibling checkout, which is right for local work and cannot survive a container build — a path source fails there with Distribution not found. A site deploying this needs both packages from git.

Metadata

Release files for podpack-notes 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for podpack-notes 0.1.4
File Size Uploaded Provenance Actions
podpack_notes-0.1.4.tar.gz 9.7 kB Without provenance Details for podpack_notes-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for podpack-notes 0.1.4
File Interpreter ABI Platform Actions
podpack_notes-0.1.4-py3-none-any.whl Python 3 none any Details for podpack_notes-0.1.4-py3-none-any.whl

Total release size: 21.7 kB

Release files / podpack_notes-0.1.4.tar.gz

Download URL podpack_notes-0.1.4.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c03ff0bbf2ea95b9eebd2a2c3e006e6ab26e908426b8ebc5bbfe5ce81c4706db
BLAKE2b-256 checksum
How to use checksums
6219f68f2aa0d77eee0d8be58e862d1ed575bc1d5d7b412c3c704d8e7be7901f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / podpack_notes-0.1.4-py3-none-any.whl

Download URL podpack_notes-0.1.4-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ce4e753d658196315a7328f4f43b464f7c54d36d68ea869820548f06da4c966
BLAKE2b-256 checksum
How to use checksums
0a7f551375f1dc019b0b5aa7161f3e0e33605b5a4c560861c8c457ee4d4910bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for podpack-notes 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page