Skip to content

Commit 9805157

Browse files
committed
Update consolidated snippets
1 parent 3e7bb65 commit 9805157

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

public/consolidated/_index.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@
4747
{
4848
"name": "PYTHON",
4949
"icon": "/icons/python.svg",
50-
"subLanguages": []
50+
"subLanguages": [
51+
{
52+
"name": "FASTAPI",
53+
"icon": "/icons/python--fastapi.svg"
54+
}
55+
]
5156
},
5257
{
5358
"name": "REGEX",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[
2+
{
3+
"name": "Basics",
4+
"snippets": [
5+
{
6+
"title": "Hello, World!",
7+
"description": "Returns Hello, World! when it recives a GET request made to the root endpoint.",
8+
"author": "ACR1209",
9+
"tags": [
10+
"printing",
11+
"hello-world",
12+
"web",
13+
"api"
14+
],
15+
"contributors": [],
16+
"code": "from typing import Union\nfrom fastapi import FastAPI\n\napp = FastAPI()\n\n\n@app.get(\"/\")\ndef read_root():\n return {\"msg\": \"Hello, World!\"}\n\n# Usage: \n# -> Go to http://127.0.0.1:8000/ and you'll see {\"msg\", \"Hello, World!\"}\n"
17+
}
18+
]
19+
}
20+
]

public/icons/python--fastapi.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)