Skip to content

Commit 10d6a84

Browse files
committed
add ipynb
1 parent 110b4b1 commit 10d6a84

File tree

6 files changed

+688
-2
lines changed

6 files changed

+688
-2
lines changed

.github/workflows/sphinx.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
uses: actions/setup-python@v2
2727
with:
2828
python-version: "3.10"
29+
- name: Install Pandoc
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y pandoc
2933
- name: Install dependencies
3034
run: |
3135
pip install poetry

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
extensions = [
2424
'sphinx.ext.autodoc',
2525
'sphinx.ext.viewcode',
26-
'sphinx.ext.napoleon'
26+
'sphinx.ext.napoleon',
27+
"nbsphinx",
2728
]
2829

2930
templates_path = ['_templates']

docs/example.ipynb

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# example"
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": 2,
13+
"metadata": {},
14+
"outputs": [
15+
{
16+
"name": "stdout",
17+
"output_type": "stream",
18+
"text": [
19+
"3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]\n"
20+
]
21+
}
22+
],
23+
"source": [
24+
"import sys\n",
25+
"\n",
26+
"print(sys.version)"
27+
]
28+
}
29+
],
30+
"metadata": {
31+
"kernelspec": {
32+
"display_name": ".venv",
33+
"language": "python",
34+
"name": "python3"
35+
},
36+
"language_info": {
37+
"codemirror_mode": {
38+
"name": "ipython",
39+
"version": 3
40+
},
41+
"file_extension": ".py",
42+
"mimetype": "text/x-python",
43+
"name": "python",
44+
"nbconvert_exporter": "python",
45+
"pygments_lexer": "ipython3",
46+
"version": "3.10.12"
47+
}
48+
},
49+
"nbformat": 4,
50+
"nbformat_minor": 2
51+
}

docs/modules.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ fastapi_2fa
55
:maxdepth: 4
66

77
fastapi_2fa
8+
9+
Examples
10+
========
11+
12+
.. toctree::
13+
:maxdepth: 2
14+
15+
example

0 commit comments

Comments
 (0)