# Using Async on the XRP

**URL:** <https://xrp.discourse.group/t/using-async-on-the-xrp/541>\
**Category:** Python programming\
**Created:** [November 13, 2024, 10:33pm UTC](https://xrp.discourse.group/t/using-async-on-the-xrp/541 "2024-11-13T22:33:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakeematias](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@jakeematias](https://xrp.discourse.group/u/jakeematias)\
**Post date:** [November 13, 2024, 10:33pm UTC](https://xrp.discourse.group/t/using-async-on-the-xrp/541/1 "2024-11-13T22:33:53Z")

</div>

I’m working on modifying a Spike Prime reinforcement learning example for use with the XRP. On the spike prime code the runloop library is imported to allow for asynchronous coding. I tried to substitute this for the asyncio library (which is part of the default python library), however this isn’t part of the XRP’s micropython library. Is there a way to port over an async library to the XRP?

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [November 14, 2024, 2:39pm UTC](https://xrp.discourse.group/t/using-async-on-the-xrp/541/2 "2024-11-14T14:39:11Z")

</div>

Micropython does provide for an asyncio library.  
[https://docs.micropython.org/en/latest/library/asyncio.html](https://docs.micropython.org/en/latest/library/asyncio.html)

I was able to import asyncio on an XRP. Can you give more details about what you are looking for if this version of asyncio does not work for you?

---

<div class="post-metadata">

**Author:** ![jakeematias](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@jakeematias](https://xrp.discourse.group/u/jakeematias)\
**Post date:** [November 19, 2024, 2:52am UTC](https://xrp.discourse.group/t/using-async-on-the-xrp/541/3 "2024-11-19T02:52:20Z")

</div>

Thanks frank! I just used help(‘modules’) to look for asyncio in the list of modules. I didn’t see asyncio, but I did find uasyncio and was able to import it successfully. I haven’t tried to implement anything using it yet, but from what I can tell from a glance it should work.
