Python equivalent of Processing's serialEvent()?

I currently have an Arduino sketch that communicates with Processing using <> delimited packets over serial, similar to other examples posted on the forums: Serial Input Basics - Programming Questions - Arduino Forum

Processing has a nice little function serialEvent() that I use as an independent thread to parse my data as it arrives in Processing: https://processing.org/reference/libraries/serial/serialEvent_.html

Is there a similar utility function for Python? We are porting our code to Python and I'm working my way through some of the forum Python examples, especially those based on pySerial (e.g. Demo of PC-Arduino comms using Python - Interfacing w/ Software on the Computer - Arduino Forum) as well as an example I have found elsewhere that incorporates PyQt: A slick threaded GUI for Arduino projects with Python and Qt | Wicked Device Shop

I just wanted to see before I got too far if there was a trivial way in Python to mimic Processing's serialEvent()

Thanks much

I think you would have to create a separate beackground Thread in Python which would repeatedly call the function recvFromArduino(): that is in my Python demo. I have used that arrangement myself.

Another thought ...
You can easily organize a Python program the same way as the Arduino setup() and loop() system.
In the Arduino serialEvent() is exactly the same as having this code as the last thing in loop()

if (Serial.available() > 0) {
   mySerialFunction();
}

...R

Thanks very much-- for this reply and for your other posts!