fact
User Guide
python-blueprint
Project
For more information on how this was built and deployed, as well as other Python best
practices, see python-blueprint
.
Info
This user guide is purely an illustrative example that shows off several features of Material for MkDocs and included Markdown extensions1.
Installation
First, install uv
:
curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Then install the fact
package and its dependencies:
uv sync
Quick Start
To run the included CLI:
uv run fact 3
To use fact
as a library within your project, import the factorial
function and execute the
API like:
from fact.lib import factorial
assert factorial(3) == 6 # (1)!
- This assertion will be
True
Tip
Within PyCharm, use Tab to auto-complete suggested imports while typing.
Expected Results
Input | Output |
---|---|
1 | 1 |
2 | 2 |
3 | 6 |
4 | 24 |
-
See
python-blueprint
'smkdocs.yml
for how to enable these features. ↩