{"id":13608883,"url":"https://github.com/timkpaine/jupyterlab_email","last_synced_at":"2025-04-06T12:08:12.974Z","repository":{"id":32831522,"uuid":"143883226","full_name":"timkpaine/jupyterlab_email","owner":"timkpaine","description":"A jupyterlab extension to email notebooks directly from JupyterLab.","archived":false,"fork":false,"pushed_at":"2025-02-20T14:00:14.000Z","size":3087,"stargazers_count":60,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T11:09:32.648Z","etag":null,"topics":["email","email-notebooks","jupyter","jupyterlab","jupyterlab-extension"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timkpaine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-07T14:14:40.000Z","updated_at":"2025-02-20T14:00:19.000Z","dependencies_parsed_at":"2023-01-16T22:32:22.340Z","dependency_job_id":"5c29b3b6-4e29-4ed6-9cd9-f9e987e61d72","html_url":"https://github.com/timkpaine/jupyterlab_email","commit_stats":{"total_commits":166,"total_committers":2,"mean_commits":83.0,"dds":"0.10843373493975905","last_synced_commit":"bb3388089a5a0804e7c2175409bd78efd8721345"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Fjupyterlab_email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Fjupyterlab_email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Fjupyterlab_email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Fjupyterlab_email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timkpaine","download_url":"https://codeload.github.com/timkpaine/jupyterlab_email/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478321,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","email-notebooks","jupyter","jupyterlab","jupyterlab-extension"],"created_at":"2024-08-01T19:01:30.752Z","updated_at":"2025-04-06T12:08:12.943Z","avatar_url":"https://github.com/timkpaine.png","language":"Python","funding_links":[],"categories":["JupyterLab Extensions","JupyterLab扩展"],"sub_categories":[],"readme":"# jupyterlab_email\nA jupyterlab extension to email notebooks from the browser.\n\n[![Build Status](https://github.com/timkpaine/jupyterlab_email/workflows/Build%20Status/badge.svg?branch=main)](https://github.com/timkpaine/jupyterlab_email/actions?query=workflow%3A%22Build+Status%22)\n[![codecov](https://codecov.io/gh/timkpaine/jupyterlab_email/branch/main/graph/badge.svg)](https://codecov.io/gh/timkpaine/jupyterlab_email)\n[![PyPI](https://img.shields.io/pypi/l/jupyterlab_email.svg)](https://pypi.python.org/pypi/jupyterlab_email)\n[![PyPI](https://img.shields.io/pypi/v/jupyterlab_email.svg)](https://pypi.python.org/pypi/jupyterlab_email)\n[![npm](https://img.shields.io/npm/v/jupyterlab_email.svg)](https://www.npmjs.com/package/jupyterlab_email)\n\n![](https://raw.githubusercontent.com/timkpaine/jupyterlab_email/main/docs/example.gif)\n\n## Options\n- Inline notebook as email, with code\n- Inline notebook as email, without code\n- Send notebook as HTML attachment, with code\n- Send notebook as HTML attachment, without code\n- Send notebook as PDF attachment, with code\n- Send notebook as PDF attachment, without code\n- Attach output data as CSV, TSV, PDF, PNG, or Excel Spreadsheet\n\n## Install\n```bash\npip install jupyterlab_email\njupyter labextension install jupyterlab_email\njupyter serverextension enable --py jupyterlab_email\n```\n\n## Adding templates\ninstall the server extension, and add the following to `jupyter_notebook_config.py`\n\n```python3\nc.JupyterLabEmail.smtp_servers = [{'name': 'gmail',\n                                   'domain': 'gmail.com',\n                                   'username': '\u003cYOUR USERNAME\u003e',\n                                   'smtp': 'smtp.gmail.com',\n                                   'port': 465}]\n\n```\n\n\n## Create email from notebook:\nUse the function in `jupyterlab_email._email`\n```python3\ndef make_email(path, model, from_, type='email', template='', code=False, subject='',\n               also_attach='none', also_attach_pdf_template='', also_attach_html_template=''):\n    '''\n        path        : path to notebook\n        model       : notebook itself (in case deployment strips outputs or\n                      notebook not available except through ContentsManager)\n        from_       : address to send the email from\n        type        : type to convert notebook to\n        template    : template to use when converting notebook\n        code        : include input cells in notebook\n        subject     : subject of email\n        also_attach : also attach pdf/html/both\n    '''\n```\n\n## Attach dataframe as csv or spreadsheet\nIn `jupyterlab_email.attachments`\n\n```python3\ndef attach(data, filename, type):\n```\n\nModify `jupyterlab_email.attachments.EXCEL_ENGINE` to use a different excel writer (defaults to `xlsxwriter`)\n\n\n## Inline LaTeX\nIn `jupyterlab_email.attachments`\n\n```python3\n\ndef latex(expression):\n    import matplotlib.pyplot as plt\n    fig, ax = plt.subplots(figsize=(10, 1))\n    ax.xaxis.set_visible(False)\n    ax.yaxis.set_visible(False)\n    ax.axis('off')\n    plt.text(0, 0.6, r'$%s$' % expression, fontsize=25)\n    plt.show()\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkpaine%2Fjupyterlab_email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimkpaine%2Fjupyterlab_email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkpaine%2Fjupyterlab_email/lists"}