--- /dev/null
+import asyncio
+import logging
+
+from mpdaio.client import MPDClient
+
+# Configure loggers
+logging.basicConfig(level=logging.INFO, format='%(levelname)-8s %(message)s')
+logging.getLogger("asyncio").setLevel(logging.WARNING)
+# debug level level will show where defaults settings come from
+log = logging.getLogger('mpdaio.client')
+log.setLevel(logging.DEBUG)
+
+
+async def run():
+ # Use defaults to access MPD server
+ client = MPDClient()
+
+ # Make an initial connection to MPD server
+ # The connection is kept open an reused for later commands
+ await client.ping()
+
+ # Each task gathered here will run with it's own connection
+ await asyncio.gather(...)
+
+ # Closes all connections to MPD server
+ await client.close()
+
+
+if __name__ == '__main__':
+ asyncio.run(run())