  Heavy-flavour production measurements in pp collisions are important tools to
test theoretical models based on perturbative quantum chromodymanics (pQCD) and
to investigate the heavy-quark hadronization mechanisms. In ALICE, heavy quarks
are measured via the hadronic and electronic decay channels at central rapidity
(-0.9 $<$ $\textit{y}$ $<$ 0.9) and via the muon decay channels at forward
rapidity (-4 $<$ $\textit{y}$ $<$ -2.5). In this contribution, the production
cross-section measurements via the leptonic decay of heavy-flavour hadrons are
presented and compared to pQCD theoretical calculations. The latest
measurements of $\rm D^{0}$, $\rm D^{+}$, $\rm D^{*+}$, $D^{+}_{s}$ mesons
whose hadronic decays into charged are fully reconstructed together with the
measurements of $\Lambda^{+}_{c}$ , $\Xi^{0,+}_{c}$, $\Sigma^{0,++}_{c}$ and
$\Omega^{0}_{c}$ baryons, performed with the ALICE detector at midrapidity in
pp collisions at $\sqrt{s}$ = 13 TeV, are also presented. Measurements of
charm-baryon production are crucial to study the charm-quark hadronization
mechanisms in a partonic rich environment like the one produced in pp
collisions at LHC energies.
