Skip to main content

Capture output from JupyterLab

Project description

jupyter-caputure-output

A cell magic that captures jupyter cell output

JupyterLight

Install

Requires Python >=3.8

pip install jupyter_capture_output

Example

import jupyter_capture_output
%%capture_text --path "foo.txt"
print("Hello World")
import matplotlib.pyplot as plt
%%capture_img --path "foo.png bar.png"
plt.plot([1,2],[10,20])
plt.show()
plt.plot([3,4],[-10,-20])
plt.show()
%%capture_img  --path "foo.jpg bar.jpg" --compression 50
plt.plot([1,2],[10,20], color = "r")
plt.show()
plt.plot([3,4],[-10,-20],color = "r")
plt.show()

Implemented

  • %%capture_text -> to .txt file with text output
  • %%capture_img -> to .png or .jpg with image output
  • %%capture_video -> to .mp4 file with the video output

Wishlist

  • %%capture_svg -> to .svg file with svg vectorgraphic outout
  • %%capture_numpy_array -> to .np file with array
  • %%capture_csv -> to .csv with datapoints
  • %%capture_gif -> to .gif with animation
  • %%capture_auto-> automatically detects what output there is to capture

Changelog

0.0.6

better regex in capture video change example images to dogs

0.0.5

Remove debugging code Add JupyterLiteDemo

0.0.4

Add Text and Video capture cell magic update example

0.0.3

Setup automatic release action.

0.0.2

Update example

0.0.1

Initial release

Project details


Download files

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

Source Distribution

jupyter-capture-output-0.0.6.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

jupyter_capture_output-0.0.6-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file jupyter-capture-output-0.0.6.tar.gz.

File metadata

  • Download URL: jupyter-capture-output-0.0.6.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.13 Linux/5.13.0-1031-azure

File hashes

Hashes for jupyter-capture-output-0.0.6.tar.gz
Algorithm Hash digest
SHA256 1b9134888061ec17d0f8199013b6d746ad3d9e745d140a951d6a9cf157f6f3f9
MD5 97510f14716fbefeb83b6788cc6adf90
BLAKE2b-256 c45d73d823b7ab7b65c1b6d8b686d85b7d6c4c3872b6974350188a6de8a09220

See more details on using hashes here.

File details

Details for the file jupyter_capture_output-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_capture_output-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 06fe65bf7994a0c0569f996e114bc7d2deaa241f75b79016cd38336c4a766866
MD5 b6a05b6dbc246b12d4a39748c85cf1f7
BLAKE2b-256 715390664338af87dde6505925c92be2353bc962eb1677cc9368c797a16b59c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page