Packaging Python code in a pip module
Now that we have our GitHub repository configured, we can start building out our Fibonacci code for our module. To achieve this, we must carry out the following steps:
- Build our Fibonacci calculation code.
- Create a command-line interface.
- Test our Fibonacci calculation code with unit tests.
Let's now discuss each of these steps in detail.
Building our Fibonacci calculation code
When it comes to building our Fibonacci calculation code, we will have two functions – one that will calculate a Fibonacci number and another that will take a list of numbers and lean on the calculation function to return a list of calculated Fibonacci numbers. For this module, we will take a functional programming approach. This does not mean that we should have a functional programming approach every time we build a pip
module. We are using functional programming because Fibonacci sequence calculations naturally flow well with...