project

class afwf.project.project.AfwfProject(dir_project_root: Path, alfred_workflow: AlfredWorkflow)[source]

Represents a Python project built with the afwf framework.

Binds together:

  • The source project (dir_project_root) — the git repo you develop in

  • The Alfred Workflow folder (alfred_workflow) — where Alfred runs the code

Typical project layout:

<dir_project_root>/
├── <package_name>/     ← Python package (same as [project] name in pyproject.toml)
├── main.py             ← entry point, copied to workflow folder on build
├── info.plist          ← synced back from Alfred for version control
├── icon.png            ← synced back from Alfred for version control
└── pyproject.toml

All attributes are lazily evaluated and cached on first access.

Parameters:
  • dir_project_root – Root directory of the Python project.

  • alfred_workflow – The Alfred Workflow this project deploys to.

property path_pyproject_toml: Path

pyproject.toml at the project root.

property package_name: str

Python package name, read from the [project] name field in pyproject.toml.

property dir_package: Path

The main Python package directory (<root>/<package_name>/).

property path_project_main_py: Path

main.py at the project root (source, copied to workflow on build).

property path_project_info_plist: Path

info.plist at the project root (synced back from Alfred for VCS).

property path_project_icon_png: Path

icon.png at the project root (synced back from Alfred for VCS).

property path_workflow_main_py: Path

main.py inside the Alfred Workflow folder.

property dir_workflow_lib: Path

lib/ inside the Alfred Workflow folder (pip install target).