diff --git a/aioredlock/algorithm.py b/aioredlock/algorithm.py
index bf192ab..51707b7 100644
--- a/aioredlock/algorithm.py
+++ b/aioredlock/algorithm.py
@@ -238,3 +238,18 @@ class Aioredlock:
         self._watchdogs.clear()
 
         await self.redis.clear_connections()
+
+    async def get_active_locks(self):
+        """
+        Return all stored locks that are valid.
+
+        .. note::
+            This function is only really useful in learning if there are no
+            active locks. It is possible that by the time the a lock is
+            returned from this function that it is no longer active.
+        """
+        ret = []
+        for lock in self._locks.values():
+            if lock.valid is True and await lock.is_locked():
+                ret.append(lock)
+        return ret
diff --git a/aioredlock/lock.py b/aioredlock/lock.py
index a44b84c..58f5b09 100644
--- a/aioredlock/lock.py
+++ b/aioredlock/lock.py
@@ -21,3 +21,6 @@ class Lock:
 
     async def release(self):
         await self.lock_manager.unlock(self)
+
+    async def is_locked(self):
+        return await self.lock_manager.is_locked(self)

A function to return number of active locks
Would be a nice to have a feature to do that.
diff --git a/tests/ut/conftest.py b/tests/ut/conftest.py
index 7acbe39..7004ad1 100644
--- a/tests/ut/conftest.py
+++ b/tests/ut/conftest.py
@@ -12,8 +12,19 @@ async def dummy_sleep(seconds):
 
 
 @pytest.fixture
-def locked_lock():
-    return Lock(None, "resource_name", 1, -1, True)
+def locked_lock(lock_manager_redis_patched):
+    lock_manager, _ = lock_manager_redis_patched
+    lock = Lock(lock_manager, "resource_name", 1, -1, True)
+    lock_manager._locks[lock.resource] = lock
+    return lock
+
+
+@pytest.fixture
+def unlocked_lock(lock_manager_redis_patched):
+    lock_manager, _ = lock_manager_redis_patched
+    lock = Lock(lock_manager, "other_resource_name", 1, -1, False)
+    lock_manager._locks[lock.resource] = lock
+    return lock
 
 
 @pytest.fixture
diff --git a/tests/ut/test_algorithm.py b/tests/ut/test_algorithm.py
index f4ef3ed..e2655c0 100644
--- a/tests/ut/test_algorithm.py
+++ b/tests/ut/test_algorithm.py
@@ -344,3 +344,13 @@ class TestAioredlock:
 
             await lock_manager.unlock(lock)
             assert lock.valid is False
+
+    @pytest.mark.asyncio
+    async def test_get_active_locks(self, lock_manager_redis_patched, locked_lock, unlocked_lock):
+        lock_manager, redis = lock_manager_redis_patched
+        redis.is_locked.return_value = True
+
+        locks = await lock_manager.get_active_locks()
+
+        assert locked_lock in locks
+        assert unlocked_lock not in locks

pip install -e .[test]
parse_log_pytest
pytest
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aioredis==2.0.1
-e git+https://github.com/joanvila/aioredlock.git@cf2ffca3df65decb64de6dd93bcd139244db930e#egg=aioredlock
async-timeout==5.0.1
asynctest==0.13.0
attrs==25.3.0
coverage==7.8.0
exceptiongroup==1.2.2
flake8==7.2.0
iniconfig==2.1.0
mccabe==0.7.0
packaging==24.2
pluggy==1.5.0
pycodestyle==2.13.0
pyflakes==3.3.2
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
tomli==2.2.1
typing_extensions==4.13.0

name: aioredlock
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aioredis==2.0.1
      - async-timeout==5.0.1
      - asynctest==0.13.0
      - attrs==25.3.0
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - flake8==7.2.0
      - iniconfig==2.1.0
      - mccabe==0.7.0
      - packaging==24.2
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.2
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - tomli==2.2.1
      - typing-extensions==4.13.0
prefix: /opt/conda/envs/aioredlock

tests/ut/test_algorithm.py::TestAioredlock::test_get_active_locks
tests/ut/test_algorithm.py::test_validator[_validate_retry_count-Retry tests/ut/test_algorithm.py::test_validator[_validate_retry_delay-Retry tests/ut/test_algorithm.py::test_validator[_validate_internal_lock_timeout-Internal tests/ut/test_algorithm.py::TestAioredlock::test_default_initialization tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_params tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[-1-ValueError-retry_count] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[-1-ValueError-retry_delay_min] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[-1-ValueError-retry_delay_max] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[-1-ValueError-internal_lock_timeout] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[0-ValueError-retry_count] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[0-ValueError-retry_delay_min] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[0-ValueError-retry_delay_max] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[0-ValueError-internal_lock_timeout] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[string-ValueError-retry_count] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[string-ValueError-retry_delay_min] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[string-ValueError-retry_delay_max] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[string-ValueError-internal_lock_timeout] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[None-TypeError-retry_count] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[None-TypeError-retry_delay_min] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[None-TypeError-retry_delay_max] tests/ut/test_algorithm.py::TestAioredlock::test_initialization_with_invalid_params[None-TypeError-internal_lock_timeout] tests/ut/test_algorithm.py::TestAioredlock::test_lock tests/ut/test_algorithm.py::TestAioredlock::test_lock_with_invalid_param tests/ut/test_algorithm.py::TestAioredlock::test_lock_one_retry tests/ut/test_algorithm.py::TestAioredlock::test_lock_expire_retries tests/ut/test_algorithm.py::TestAioredlock::test_lock_one_timeout tests/ut/test_algorithm.py::TestAioredlock::test_lock_expire_retries_for_timeouts tests/ut/test_algorithm.py::TestAioredlock::test_cancel_lock_ tests/ut/test_algorithm.py::TestAioredlock::test_extend_lock tests/ut/test_algorithm.py::TestAioredlock::test_extend_with_invalid_param tests/ut/test_algorithm.py::TestAioredlock::test_extend_lock_error tests/ut/test_algorithm.py::TestAioredlock::test_unlock tests/ut/test_algorithm.py::TestAioredlock::test_is_locked[True-True] tests/ut/test_algorithm.py::TestAioredlock::test_is_locked[True-False] tests/ut/test_algorithm.py::TestAioredlock::test_is_locked[False-True] tests/ut/test_algorithm.py::TestAioredlock::test_is_locked[False-False] tests/ut/test_algorithm.py::TestAioredlock::test_is_locked_type_error tests/ut/test_algorithm.py::TestAioredlock::test_context_manager tests/ut/test_algorithm.py::TestAioredlock::test_destroy_lock_manager tests/ut/test_algorithm.py::TestAioredlock::test_auto_extend tests/ut/test_algorithm.py::TestAioredlock::test_auto_extend_with_extend_failed tests/ut/test_algorithm.py::TestAioredlock::test_unlock_with_watchdog_failed
aioredlock/lock.py aioredlock/algorithm.py
aioredlock/lock.py aioredlock/algorithm.py