diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 09ac54668eebec6b91118e0b3b47cb05c9a0911a..80f2a4958b2c4a8e667f3b23fca2a55538296088 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,5 @@
 stages:
+  - check
   - test
 
 test_api:
@@ -48,3 +49,18 @@ test_configdb:
     # Now install pyconfigdb and run our tests
     - python -m pip install pyconfigdb --extra-index-url https://gitlab.cern.ch/api/v4/groups/33370/-/packages/pypi/simple
     - ./test_script.sh
+
+job_py_check:
+   stage: check
+
+   image: registry.cern.ch/docker.io/library/python:latest
+
+   artifacts:
+     expire_in: 7 days
+     when: always
+   script:
+   - python3 -m pip install -U pip setuptools
+   - python3 -m pip install -U ruff
+   - echo "Running static checks on python"
+   # Configuration in .ruff.toml
+   - ruff check
diff --git a/.ruff.toml b/.ruff.toml
new file mode 100644
index 0000000000000000000000000000000000000000..a0e74e35ceb3362aa9a2fc0eb689187499e7efe8
--- /dev/null
+++ b/.ruff.toml
@@ -0,0 +1,13 @@
+# Configuration for python checks (ie ruff)
+
+exclude = ["venv", "scripts/backup_striptsRunkey_files_to_sort"]
+
+[lint]
+
+# Ignores:
+#   Mostly these are stylistic things.
+#   In principle if would be good to remove them, but not necessary.
+ignore = [
+    "E401", "E701",
+    "F401", "F403", "F405", "F541", "F811", "F841",
+]