Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make OMIClient async. #146

Merged
merged 2 commits into from
Oct 26, 2023
Merged

Make OMIClient async. #146

merged 2 commits into from
Oct 26, 2023

Conversation

n8mellis
Copy link
Contributor

This change is made to support running both as a Python script as well as in a Jupyter notebook.

Since Jupyter uses IPython as the runtime, we cannot use the asyncio methods to try and run async functions outside of a larger event loop.

This change adds a tiny bit of complexity to using the OMIClient but it should be familiar to anyone who's used async/await in Python.

This change is made to support running both as a Python script as well as in a Jupyter notebook.

Since Jupyter uses IPython as the runtime, we cannot use the `asyncio` methods to try and run async functions outside of a larger event loop.

This change adds a tiny bit of complexity to using the OMIClient but it should be familiar to anyone who's used async/await in Python.
@bmunday3 bmunday3 merged commit 08c43dc into main Oct 26, 2023
10 checks passed
@n8mellis n8mellis deleted the nathan/async-omiclient branch October 26, 2023 17:20
n8mellis added a commit that referenced this pull request Nov 15, 2023
* Make OMIClient async.

This change is made to support running both as a Python script as well as in a Jupyter notebook.

Since Jupyter uses IPython as the runtime, we cannot use the `asyncio` methods to try and run async functions outside of a larger event loop.

This change adds a tiny bit of complexity to using the OMIClient but it should be familiar to anyone who's used async/await in Python.

* Updated docs with new async OMIClient.
# Conflicts:
#	docs/docs/getting-started/index.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants