def config(self, config: ClientConfig):
        """
        Configure the client.
        
        Args:
            config: ClientConfig object with configuration values
        """
        try:
            # Try to get the current event loop
            try:
                loop = asyncio.get_running_loop()
                if loop.is_running():
                    # We're in an async context, but this is a sync method
                    # We need to run the async method in a new thread
                    from ..base import run_coroutine_in_new_thread
                    return run_coroutine_in_new_thread(self.config_async(config))
            except RuntimeError:
                # No event loop is running, use asyncio.run
                return asyncio.run(self.config_async(config))
        except Exception as e:
            raise e

        Configure the client.
        
        Args:
            config: ClientConfig object with configuration values
        
src/upsonic/client/storage/storage.py