I don't think there is a python library that can tweak Windows UI settings (e.g: colors, mode, ..). However, to enable the dark mode in your Windows 10, you can use the python built-in module subprocess to execute a registry command and set the value of the keys AppsUseLightTheme and SystemUsesLightTheme to 0.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize]
"AppsUseLightTheme"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize]
"SystemUsesLightTheme"=dword:00000000
With Python, try this :
import subprocess
dark_app_mode = ['reg.exe', 'add', 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize',
'/v', 'AppsUseLightTheme', '/t', 'REG_DWORD', '/d', '0', '/f']
dark_windows_mode = ['reg.exe', 'add', 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize',
'/v', 'SystemUsesLightTheme', '/t', 'REG_DWORD', '/d', '0', '/f']
subprocess.run(dark_app_mode)
subprocess.run(dark_windows_mode)
Or this :
from subprocess import Popen
dark_app_mode = 'reg.exe add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme /t REG_DWORD /d 0 /f'
dark_windows_mode = 'reg.exe add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize /v SystemUsesLightTheme /t REG_DWORD /d 0 /f'
commands = [dark_app_mode, dark_windows_mode]
processes = [Popen(cmd, shell=True) for cmd in commands]
RESULT :
This will set a FULL dark mode in your Windows 10 (or 11) :
