Here, we introduce and describe lwreg, an open-source and highly flexible compound registration system, which is intended to be applicable across a broad range of computational workflows. The system is highly configurable, allows different definitions of chemical identity, and supports integration of experimental results. We focus exclusively on computational use cases here, however, lwreg could also be used in a "wet chemistry" setting. lwreg provides a simple, but flexible, Python API for registering compounds and querying the underlying database along with a command-line interface (CLI) allowing it to be integrated in scripting pipelines. Note that although it is possible to build a GUI intended for use by non-expert users on top of the lwreg library, lwreg itself does not provide a GUI. The rest of this contribution describes the design and implementation of lwreg itself, introduces how the context-dependent chemical identity is implemented and used, describes a simple approach for storing experimental results together with the compound registration data, and showcases a few of the ways that we have been using it in our research group.