twisted_ipython
An IPython extension that uses crochet to enable running Twisted in IPython and Jupyter notebooks.
The Short Short Version
Install this package into your Jupyter notebook's kernel. Then, load the extension:
%load_ext twisted_ipython
and then turn on autoawait for Twisted:
%autoawait twisted
and with a helper for the demo
from twisted.internet import reactor
from twisted.internet.defer import Deferred
def sleep(t):
d = Deferred()
reactor.callLater(t, d.callback, None)
return d
we can now use async/await in cells like so:
print('Going to sleep...')
await sleep(1)
print('I HAVE AWAKENED!')
I Want To Know More!
Check out the much more complete README.ipynb!
Metadata
Release files for twisted-ipython 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| twisted_ipython-2.0.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| twisted_ipython-2.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 9.0 kB
Release files / twisted_ipython-2.0.0.tar.gz
| Download URL | twisted_ipython-2.0.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfd4666a6b58851b311d2a92d058ea4b2ec0be34159296554ab59fcfa2d4d09a
|
|
BLAKE2b-256 checksum How to use checksums |
61816197b561a772ef319284cdc718dbd9fbabf755d75668fff909e2e212f5f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
|
Release files / twisted_ipython-2.0.0-py2.py3-none-any.whl
| Download URL | twisted_ipython-2.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4a354f3965c63c6c797ab994422a1057ad7509f34581954b97cd8ac65071e2ec
|
|
BLAKE2b-256 checksum How to use checksums |
ff7747dc49ab95d5cc8cb37c150b0ead7ef00f2b967d40db9d22c40ac753ea7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
|