src.file

A module file that serves as an example of some of the functionality that this template documentation can capture. By adding types and documentation in the numpy style, nice documentation can be generated :) This file is overly documented and in general you don’t need this much. It’s good for front facing API though.

Classes

MyClass(a, b[, c, d])

A short description of the class You can add more description here, that spans more lines, and takes up more space.

Interfaces

class src.file.MyClass(a, b, c=False, d=None)[source]

Bases: object

A short description of the class You can add more description here, that spans more lines, and takes up more space. But don’t feel obliged, sometimes one line is enough…

Parameters:
  • a (int) – A description for parameter a

  • b (Dict[str, Any]) – A description for parameter b

  • c (bool = False) – A description for the parameter c with a default of False

  • d (Optional[List[float]] = None) – A description for the optional parameter c

oreos(x)[source]

A function that does something Here is a longer description which might give some more details or even an example

result = myclass.some_function(42)

Note

Something you should defnitely pay attention to

Parameters:

x (int) – Some description about x

Returns:

The sum of x and a

Return type:

int

Raises:

ValueError – This function really doesn’t allow for the number 1337

property spaghettihoops: Dict[str, str]

Spaghetti hoops of this object Has as many entries as the parameter a given at construction. If c is True, the values will have “foo”, otherwise “bar”.

myclass = MyClass(a=2, b={}, c=True)
print(myclass.spaghetti_hoops)
{
    "hoop_0": "foo",
    "hoop_1": "foo",
}
myclass = MyClass(a=2, b={}, c=False)
print(myclass.spaghetti_hoops)
{
    "hoop_0": "bar",
    "hoop_1": "bar",
}
Returns:

A dictionary from “hoop_i” to its value

Return type:

Dict[str, str]