How to capture leftmouse up event by python?
As mentioned in the document, the Event.type will tell you which key or mouse button sent the event and the Event.value specifies if pressing or releasing happened.

So you can do something like below in the modal method of an operator for example:

Here ctx is the current context in Blender and the evt is bpy.types.Event instance

def modal(self, ctx, evt):
    if evt.type == 'LEFTMOUSE':
        if evt.value == 'PRESS':
            print('LMB Pressed')
        elif evt.value == 'RELEASE':
            print('LMB Released')
    return {'RUNNING_MODAL'}


A thorough example of using modal event handler is at the link below.

https://developer.blender.org/diffusion/B/browse/master/release/scripts/templates_py/operator_modal.py