Preheat your oven to 350°F (175°C). Grease a 9x5 inch loaf pan.
In a large bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
In another bowl, beat together sugar, oil, eggs, and vanilla extract until well combined.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
Fold in the grated zucchini and walnuts (if using).
Pour the batter into the prepared loaf pan and spread it out evenly.
Bake for 60 minutes, or until a toothpick inserted into the center comes out clean.
Let the bread cool in the pan for 10 minutes, then transfer to a wire rack to cool completely.