Light absorption and radiative recombination are two critical processes in optoelectronic materials that characterize the energy conversion efficiency. The absorption and radiative coefficients are thus key properties for device optimization and design. Here, we develop a python package named pyArc that allows rigorous computation of absorption and radiative coefficients from first principles. By integrating several interpolation strategies to augment k-point sampling in reciprocal space, our code is accurate yet highly efficient. In addition to evaluation of the coefficients, our code is capable of intuitive analysis of carrier distribution, facilitating a deeper understanding of the microscopic mechanisms underlying the radiative coefficients. Utilizing GaAs as a prototypical example, we demonstrate how to employ our package to compute absorption and radiative coefficients and to investigate the key features in the electronic structure that give rise to these coefficients. Program SummaryProgram title: PyArcCPC Library link to program files:https://doi.org/10.17632/5x9g9bvhcv.1Licensing provisions: MIT licenseProgramming language: Python 3Nature of problem: Light absorption and radiative recombination processes in semiconductors critically impact the energy conversion efficiency of optoelectronic devices. Developing a method to calculate coefficients of the two processes based on first-principles theory is essential, which not only can help to obtain the key properties of those semiconductor materials and guide the device design, but also can unveil the underlying microscopic mechanisms.Solution method: PyArc, written in the Python language, implements first-principles methodologies for the computation of absorption and radiative coefficients of semiconductors based on Fermi's golden rule. This package takes the electronic eigenvalues and dipole matrix elements of a material computed from first-principles codes such as VASP as input. Dense k-point sampling for the Brillouin zone is achieved through efficient interpolation schemes implemented in our code to acquire well converged results. The functionality of cross-sectional visualization of carrier distribution in our code provides intuitive insights into the fundamental mechanism beneath the charge-carrier radiative recombination process.