In practice, you’re likely using the C implementation:
$ python3
Python 3.10.7 (main, Sep 7 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> import _datetime
>>> datetime.datetime is _datetime.datetime
True