API

pypi_package_example.my_addition_function(a: int, b: int)[source]

Sample function that adds two integers.

Our documentation starts off with a one-line sentence. We can follow it up with multiple lines that give a more complete description.

Parameters:
  • a (int) – First number to add.
  • b (int) – Second number to add.
Returns:

The two numbers added together.

Return type:

int

Raises:

None

Then we can follow it up with an example:

Example:
>>> result = my_addition_function(10, 15)
>>> print(result)

Note

This is just a silly example. Don’t really use this function to add numbers.

pypi_package_example.my_function()[source]

Sample function that prints Hi