Last active
March 9, 2017 15:55
-
-
Save garettmd/bd00bab4696ab9a4155519536263e6c4 to your computer and use it in GitHub Desktop.
Click setup.py snippet for VSCode (and probably other editors)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"click setup": { | |
"prefix": "click", | |
"body": [ | |
"from setuptools import setup", | |
"", | |
"setup(", | |
"\tname='<app name>',", | |
"\tversion='<version #>',", | |
"\tpy_modules=['<yourscript>'],", | |
"\tinstall_requires=[", | |
"\t\t'click',", | |
"\t],", | |
"\tentry_points='''", | |
"\t\t[console_scripts]", | |
"\t\t<yourscript>=<yourscript>:cli", | |
"\t'''", | |
")" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this snippet in your
setup.py
file when creating a new app with the click CLI frameworkThis goes in the
python.json
file in VSCode. Get to it using Cmd+Shift+P, type snippet, choose "Snippets: Open User Snippets", then choose Python. Use the snippet by typingclick
(usually it will popup by the time you typecli
) and when the Intellisense prompt comes up, hit tab.Enjoy!