Skip to content

Commit ba2b2a8

Browse files
author
Christian Strappazzon
committed
Init repo
0 parents  commit ba2b2a8

File tree

5 files changed

+68
-0
lines changed

5 files changed

+68
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode/
2+
vsc-*

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log
2+
All notable changes to the "flask-snippets" extension will be documented in this file.
3+
4+
## [0.0.1]
5+
- Initial release

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Flask snippets
2+
3+
Flask snippets collections, ported from PyCharm, TextMate, SublimeText and other editors/IDEs.
4+
5+
## Features
6+
7+
Snippet for Flask framework
8+
9+
### 0.0.1
10+
11+
Initial release: PyCharm snippets

package.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "flask-snippets",
3+
"displayName": "flask-snippets",
4+
"description": "Flask snippets",
5+
"version": "0.0.1",
6+
"publisher": "cstrap",
7+
"engines": {
8+
"vscode": "^1.12.0"
9+
},
10+
"categories": [
11+
"Snippets"
12+
],
13+
"contributes": {
14+
"snippets": [
15+
{
16+
"language": "python",
17+
"path": "./snippets/snippets.json"
18+
}
19+
]
20+
}
21+
}

snippets/snippets.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"Flask route": {
3+
"prefix": "route",
4+
"body": [
5+
"@app.route('/${1:route_name}')",
6+
"def ${2:method_name}():",
7+
" pass$0"
8+
],
9+
"description": "Flask route function"
10+
},
11+
"Flask route GET, POST": {
12+
"prefix": "routegp",
13+
"body": [
14+
"@app.route('/${1:route_name}', methods=['GET', 'POST'])",
15+
"def ${2:method_name}():",
16+
" pass$0"
17+
],
18+
"description": "Flask route with GET and POST"
19+
},
20+
"Flask route POST only": {
21+
"prefix": "routegp",
22+
"body": [
23+
"@app.route('/${1:route_name}', methods=['POST'])",
24+
"def ${2:method_name}():",
25+
" pass$0"
26+
],
27+
"description": "Flask route POST only"
28+
}
29+
}

0 commit comments

Comments
 (0)