{
"info": {
"author": "Zhao weiguo",
"author_email": "zhaoweiguo@haodou.com",
"bugtrack_url": null,
"classifiers": [],
"description": "# Alfred Python\n\nA simple python module for alfred workflow\u3002\n\nFeatures:\n\n* Easily get bundle id, query arguments \n* Simple feedback XML generation\n* Provides functions for storing or retrieving cache data\n* Workflow configuration management\n* Includes an easy way to download remote file\n\n## installation\n\n```shell\nsudo easy_install python-alfred\n```\n\n## Code Example\n\n```python\n>>> import alfred\n>>> alfred.bundleID()\n'net.jeeker.awf.AppDig'\n>>> alfred.log('log message') # save log message to 'log.txt' in workflow's folder\n>>> alfred.exit('exit-message')\nexit-message\n>>> alfred.exitWithFeedback(title='exitWithFeedback')\n- icon.pngexitWithFeedback
\n\n>>> feedback = alfred.Feedback()\n>>> feedback.addItem(title='Feedback Title', subtitle='subtitle', autocomplete='subcmd', valid=False)\n>>> feedback.addItem(title='Feedback Title 2', subtitle='subtitle 2', arg='arg')\n>>> feedback.addItem(title='Feedback Title 3', subtitle='subtitle 3')\n>>> feedback.output()\n- icon.pngsubtitleFeedback Title
- icon.pngsubtitle 2Feedback Title 2
- icon.pngsubtitle 3Feedback Title 3
\n\n>>> alfred.config.set(username='JinnLynn', testkey='testvalue')\n>>> alfred.config.getAll()\n{u'username': u'JinnLynn', u'testkey': u'testvalue'}\n>>> alfred.config.get('username')\nu'JinnLynn'\n>>> alfred.config.delete('username')\n>>> alfred.config.getAll()\n{u'testkey': u'testvalue'}\n\n>>> alfred.cache.set('test-cache', {'cache-data':'test-data'}, expire=10)\n>>> alfred.cache.get('test-cache')\n{u'cache-data': u'test-data'}\n>>> alfred.cache.timeout('test-cache')\n2.6863911151885986\n>>> alfred.cache.get('test-cache') # expired return None\n>>> alfred.cache.timeout('test-cache')\n-1\n\n>>> alfred.storage.getLocalIfExists('http://i.imgur.com/17lNrSX.png') # Non-existent\n>>> alfred.storage.getLocalIfExists('http://i.imgur.com/17lNrSX.png', download=True)\n'/tmp/net.jeeker.awf.AppDig/0fef92118c683242f9b6e2a40e1a54f5.png'\n>>> alfred.storage.batchDownload(['http://i.imgur.com/8pa4x95.png','http://i.imgur.com/PX03uFm.png'])\n>>> alfred.storage.getLocalIfExists('http://i.imgur.com/8pa4x95.png')\n'/tmp/net.jeeker.awf.AppDig/dc119234ccb1f8fea4064b9a83a2dd6b.png'\n```\n\n## License\nThe MIT License",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://pypi.python.org/pypi/python-alfred",
"keywords": null,
"license": "LICENSE",
"maintainer": null,
"maintainer_email": null,
"name": "python-alfred",
"package_url": "https://pypi.org/project/python-alfred/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/python-alfred/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://pypi.python.org/pypi/python-alfred"
},
"release_url": "https://pypi.org/project/python-alfred/0.1.1/",
"requires_dist": null,
"requires_python": null,
"summary": "Alfred 2 Workflow python module",
"version": "0.1.1"
},
"last_serial": 939661,
"releases": {
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "7acc11c49c884cabf08b6dffd3890ed0",
"sha256": "babcbe51e8ad9e52be43f06a83e8be631bf22d0d18c115fe034e53d66f560a2a"
},
"downloads": -1,
"filename": "python-alfred-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "7acc11c49c884cabf08b6dffd3890ed0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6842,
"upload_time": "2013-12-09T08:51:07",
"url": "https://files.pythonhosted.org/packages/bf/0b/47192b0e095297aed0f9d229a2e3ea20b77e17fff55e2d442b819764f3cc/python-alfred-0.1.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "7acc11c49c884cabf08b6dffd3890ed0",
"sha256": "babcbe51e8ad9e52be43f06a83e8be631bf22d0d18c115fe034e53d66f560a2a"
},
"downloads": -1,
"filename": "python-alfred-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "7acc11c49c884cabf08b6dffd3890ed0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6842,
"upload_time": "2013-12-09T08:51:07",
"url": "https://files.pythonhosted.org/packages/bf/0b/47192b0e095297aed0f9d229a2e3ea20b77e17fff55e2d442b819764f3cc/python-alfred-0.1.1.tar.gz"
}
]
}