Skip to main content

A python implementation of API

Project description


A python implementation of API

The main purpose of this package is implementation of easy uploading and sharing jupyter notebook to service.

PyPI version Python Versions MIT License


  1. Install pandoc

    $ sudo apt install pandoc

    This package call nbconvert internally.

  2. Install package

    $ pip install esapy
  3. generate token with read/write permission.

  4. make configuration file in your home directory (~/.esapyrc).

    token: your_token
    team: your_team
    • You can set them as environment variables: ESA_PYTHON_TOKEN, ESA_PYTHON_TEAM.
    • Environment variables are prior to .esapyrc file.
    • You can check your token using esa config from command line.


  1. Prepare .ipynb file

  2. Convert to markdown and upload images.

    $ esa up target.ipynb

    This package will call nbconvert and upload images, and upload markdown file as new post.

  3. access the new post and edit.

  4. if process fails due to a network problem, you can re-try with esa up . When the input is a markdown, nbconvert step will be skipped.



This package registers following command line tools.

  • esa up <input_filepath>

    • upload your file
    • supported format: ipynb, tex, and md
    • This command calls esa convert , esa replace , and esa publish internally
  • esa config

    • list environs and config
  • esa stats

    • show statistics of your team
    • This command can be used for access test.
  • esa convert <input_filepath>

    • subcommand
    • call nbconvert or pandoc depending input format
  • esa replace <input_filepath markdown file>

    • subcommand
    • scan lines of markdown finding image tags (![xxx](yyy)).
    • when the file path is not url, image file will be uploaded to your team of
    • If token/team are given as arguments and config file simultaneously, arguments are used.
  • esa publish <input_filepath markdown file>

    • subcommand
    • create new post

config file

The config file (~/.esapyrc) should be written in yaml format. An example is shown below.

token: your_token
team: your_team

  goto_clipboard: true

If action.goto_clipboard is true, a markdown body with modified urls will be copied to clipboard. Default is false.


Copyright (c) 2020 Kosuke Mizuno
This package is released under the MIT license (see LICENSE file).

Project details

Download files

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

Files for esapy, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size esapy-0.5.0-py3-none-any.whl (9.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size esapy-0.5.0.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page