Welcome to my field notes!

Field notes are notes I leave myself as I go through my day to day work. The hope is that other people will also find these notes useful. Note that these notes are unfiltered and unverified.

Python Libraries

My gold standard python libraries
Author

TJ Palanca

Published

July 31, 2022

Developer Tools

  • poetry for dependency management. The main things I really like are:
    • just works - dependency resolution may be slow but it’s thorough
    • can specify development dependencies and actual dependencies
    • poetry run is a convenient interface to create scripts for deployment, etc.
  • ipython - can easily be confused with Jupyter, as that’s the underlying shell, but ipython by itself is a great alternative REPL that I use for any development.
    • the autoload magic is super useful for developing libraries, so that you don’t have to keep restarting your REPL as you develop your module.
  • black - opinionated. I don’t want to mess with formatting and code style - I just want it to be consistent. That’s what black does to my code. Set python files to autoformat in VS code for additional convenience.

Web Technologies

  • requests for making HTTP requests. Just simple, pretty much ubiquitous, and well supported.
    • requests-cache is super useful when scraping websites because it allows you to cache the responses while developing (and even in production) so that you don’t need to keep refetching the same data.
  • beautifulsoup4 - standard scraping library - nothing much to ask for. Maybe form handling can be improved.

Programming Utilities

  • pydantic is a library underlying more popular libraries. If you use functional programming a lot and only want objects to have data, not methods, then this is super useful.

Publishing

  • quarto is a scientific publishing tool that encompasses Python, R, and Julia - which are my main languages. It’s what I built these field notes in so obviously it should make it.