diff --git a/gi/__init__.py b/gi/__init__.py
index c1aba69..b816612 100644
--- a/gi/__init__.py
+++ b/gi/__init__.py
@@ -34,6 +34,22 @@ import os
 _versions = {}
 _overridesdir = os.path.join(os.path.dirname(__file__), 'overrides')
 
+version_info = gi._gobject.pygobject_version[:]
+__version__ = "{0}.{1}.{2}".format(*version_info)
+
+
+def check_version(version):
+    if isinstance(version, str):
+        version_list = tuple(map(int, version.split(".")))
+    else:
+        version_list = version
+
+    if version_list > version_info:
+        raise ValueError((
+            "pygobject's version %s required, and available version "
+            "%s is not recent enough") % (version, __version__)
+        )
+
 
 def require_version(namespace, version):
     repository = Repository.get_default()
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 4348c29..a774085 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -12,6 +12,7 @@ import locale
 import subprocess
 from io import StringIO, BytesIO
 
+import gi
 from gi.repository import GObject, GLib
 
 from gi.repository import GIMarshallingTests
@@ -2292,3 +2293,19 @@ class TestModule(unittest.TestCase):
         self.assertTrue('SimpleStruct' in output, output)
         self.assertTrue('Interface2' in output, output)
         self.assertTrue('method_array_inout' in output, output)
+
+
+class TestProjectVersion(unittest.TestCase):
+    def test_version_str(self):
+        self.assertEqual(gi.__version__, "3.3.5")
+        self.assertNotEqual(gi.__version__, "3.1.1")
+
+    def test_version_info(self):
+        self.assertSequenceEqual(gi.version_info, (3, 3, 5), seq_type=tuple)
+        self.assertNotEqual(gi.version_info, (3, 3, 5))
+
+    def test_check_version(self):
+        self.assertRaises(ValueError, gi.check_version, (99, 0, 0))
+        self.assertRaises(ValueError, gi.check_version, "99.0.0")
+        gi.check_version((3, 3, 5))
+        gi.check_version("3.3.5")
