Developing Alfred5 workflow using alfred5 python package
programming, alfred5, alfred workflow, python, macOS

🔰 How to Create Workflow





Preparing to Code Workflow using alfred5 package and python
Init your project directory

Create
srcfolderPut your codes and
requirements.txttosrcfolders
⚠️ If u installed all of requirements, dont need to create
requirements.txtfile insrc

Understanding alfred5 use-cases
alfred5 use-casesVia
SnippetsClientAPI create custom snippets programmaicallyVia
WorkflowClientAPI create custom alfred workflowCraete
requirements.txtfile for your python project to letalfred5installs them if needed 🙃To install
from requirements.txtdo all import packages insidemainUse
globalkeyword to access imported packages globallyclient.queryis the query stringclient.page_countis the page count for pagination results
Dont need to add
alfred5torequirements.txt
Use
WorkflowClient.logto log your message to alfred debuggerUse
WorkflowClient(main, cache=True)method to use caching systemJust do it for static (not timebased nor any dynamic stuff) response
Db path is
db/results.ymlalso you can see it from workflow debug panel

⭐️ Example Project


🪪 License
Last updated
Was this helpful?
