The information presented in this blog post is for educational purposes only. It should not be used for engineering design or relied upon as engineering advice.
The EngineeringPaper.xyz sheet below (this sheet can also be opened in a separate tab) shows how to design a 3D printed cantilever spring to survive a certain number of cycles of repeated loading. The fatigue strength data compiled by Ezeh et al.  for 3D printed PLA is utilized to determine the minimum length of cantilever spring that is able to survive 1000 cycles. In the spring design discussed below, it's desirable to keep the spring as short as possible to provide a higher spring force for the application but a shorter spring results in a higher stress in the cantilever. Engineering problems are often characterized by such design tradeoffs and this is where utilizing the engineering equations that characterize the system to find an optimal solution can be a powerful design tool. See the sheet below for the details of this approach applied to the design of a 3D printed spring. The 3D models and printing details for the 3D printed box used in this example can be found here.
 Ezeh, O. H., and L. Susmel. "On the fatigue strength of 3D-printed polylactide (PLA)." Procedia Structural Integrity 9 (2018): 29-36.