Best practices for which library to use and how to choose.

How to choose a library?

Here are some checklist when choosing a new library:

  • Check the amount of star in GitHub, the more star the better.
  • Check if documentation is available.
  • Check how often library getting updates.
  • Check when is the latest code update, if the latest update was years ago meaning the library probably not being maintained anymore.
  • Check if there are unit tests, usually good code come with unit test.
  • You can get more analytics from the Insights tab in GitHub, to see if the community with this library is good enough.
  • Check security report in Security tab.

These are the recommended library for each categories. This does not mean that every project must install all the libraries listed here. Only install what you need to use. Best practices is install when you need instead of install from all at once, keep your requirements growing.

Common

Background Worker

Excel

PDF

Development

  • Debug Toolbar: optimizing API performance.
  • Environ: helper when using environment variable.
  • ipdb: extended from pdb for code completion and more.
  • DRF Spectacular: generating API Doc for Django REST Framework.

Unit Test

Monitoring