Skip to main content

PyPi

Introduction

By design asyncio does not allow its event loop to be nested. This presents a practical problem: When in an environment were the event loop is already running it’s impossible to run tasks and wait for the result. Trying to do so will give the error “RuntimeError: This event loop is already running”.

The issue pops up in various environments, such as web servers, GUI applications and in Jupyter notebooks.

This package will patch asyncio to allow nested use of asyncio.run and loop.run_until_complete.

Installation

pip3 install nest_asyncio

Python 3.5 or higher is required.

Usage

import nest_asyncio
nest_asyncio.apply()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nest_asyncio-0.9.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nest_asyncio-0.9.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file nest_asyncio-0.9.1.tar.gz.

File metadata

  • Download URL: nest_asyncio-0.9.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.6

File hashes

Hashes for nest_asyncio-0.9.1.tar.gz
Algorithm Hash digest
SHA256 0844af67deda3243389d47cd8754b6775c5c828345e0277beca7bd008d273392
MD5 8879b756bb3715e4155da96f9d40db45
BLAKE2b-256 2af5091a71516ebd25cf3fd7503925a611d18e83dc00cb624aaf97612f112162

See more details on using hashes here.

File details

Details for the file nest_asyncio-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: nest_asyncio-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.6

File hashes

Hashes for nest_asyncio-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b74617777d5746427b641ec08bb98023f36fcadf419b1de2eca45ff27f1ceadf
MD5 1e831c6fd302b02b728afdeb9afb0e89
BLAKE2b-256 229a4d76c36f57847ed655836022f42a36ef19bb44f519278c37edab79d7cfdd

See more details on using hashes here.

Release history Release notifications | RSS feed

1.6.0

2 files

1.5.9

2 files

1.5.8

2 files

1.5.7

2 files

1.5.6

2 files

1.5.5

2 files

1.5.4

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.9.10

2 files

0.9.9

2 files

0.9.8

2 files

0.9.7

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

This release

0.9.1 This release

2 files

0.9.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page