Skip to content

Commit b599968

Browse files
committed
update examples docs
1 parent 8593436 commit b599968

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

docs/examples.rst

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Examples
44
Example apps demonstrating usage.
55

66

7+
Complete examples
8+
-----------------
9+
10+
Please see the `examples`_ directory in the repo for more examples,
11+
including complete project packages with application factory pattern and blueprints.
12+
13+
714
Minimal example without database
815
--------------------------------
916

@@ -18,3 +25,6 @@ Minimal example with database
1825
.. literalinclude:: ../examples/minimal_db/main.py
1926
:language: python
2027
:caption: examples/minimal_db/main.py
28+
29+
30+
.. _examples: https://github.com/thnee/flask-api-framework/tree/main/examples

examples/README.rst

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Examples
2+
========
3+
4+
Example apps demonstating usage.
5+
6+
Note: The examples also have tests located in `../tests/examples`,
7+
they are run as part of the main test suite for the whole project.
8+
9+
10+
Examples description
11+
--------------------
12+
13+
minimal_db
14+
^^^^^^^^^^
15+
16+
Minimal example using sqlalchemy.
17+
18+
.. code-block:: text
19+
20+
FLASK_APP=minimal_db:app flask run
21+
22+
minimal_nodb
23+
^^^^^^^^^^^^
24+
25+
Minimal example without using sqlalchemy or marshmallow-sqlalchmy.
26+
27+
.. code-block:: text
28+
29+
FLASK_APP=minimal_nodb:app flask run
30+
31+
complete_db
32+
^^^^^^^^^^^
33+
34+
Complete example project using sqlalchemy and marshmallow-sqlalchemy.
35+
36+
.. code-block:: text
37+
38+
FLASK_APP=complete_db.app flask run

0 commit comments

Comments
 (0)