Python Bindings - ValueError: Namespace GstRtspServer not available

Python Bindings - ValueError: Namespace GstRtspServer not available

I am trying to use gst-rtsp-server in my python application. for this i
included the following :
import gi
gi.require_version('GstRtspServer','1.0')
from gi.repository import GstRtspServer

However, I get the following error:
gi.require_version('GstRtspServer','1.0')
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 130, in
require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace GstRtspServer not available