docs/reference.md
python_app_template.app
get_pokemon(number=Path(title='The Pokemon to get (based on number)', ge=1, le=151))
Endpoint that returns information about pokemon. Args: number: The id of the pokemon to get Returns: Awesome information about the pokemon
Source code in src/python_app_template/app.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
python_app_template.service
Provides several sample functions for testing the docstrings
bar(name='Mysterious Person')
Say hello to the user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the person to greet |
'Mysterious Person'
|
Returns:
Type | Description |
---|---|
str
|
A string with a greeting |
Source code in src/python_app_template/service.py
27 28 29 30 31 32 33 34 35 36 37 |
|
foo(a, b)
Adds two numbers together
Examples:
>>> foo(a=1, b=2)
3
>>> foo(b=2, a=13)
15
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a |
int
|
The first number to add |
required |
b |
int
|
The second number to add |
required |
Returns:
Type | Description |
---|---|
int
|
The sum of a and b |
Source code in src/python_app_template/service.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|