Skip to main content

esapy

A python implementation of esa.io API

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

PyPI version Python Versions MIT License

Description in Japanese: https://esa-pages.io/p/sharing/14661/posts/184/d983bd2e71ad35528500.html

INSTALATION

  1. Install package

    $pip install esapy
    
  2. set credentials (for esa.io)

  3. generate esa.io token with read/write permission.

  4. make configuration in your environment variables Environment variables: ESA_PYTHON_TOKEN, ESA_PYTHON_TEAM. You can check your token using esa config from command line.

  5. set credentials (for growi)

  6. generate token

  7. set environment variables - GROWI_URL - GROWI_TOKEN

HOW TO USE

  1. Prepare .ipynb file

  2. Upload your notebook

    $ esa up target.ipynb
    

    This package uploads images, and uploads markdown file as a new post or update the previously uploaded post.

  3. access the new post and edit.

If process fails due to a network problem, you can check by esa stats.

Whether an ipynb file has been already uploaded can be checked by esa ls <filepath or dirpath>. For list up all notebooks recursively, esa ls --recursive.

DOCUMENT

commands

This package registers following command line tools.

  • esa up <input_filepath>

    • upload your file
    • supported format: ipynb, tex, and md
  • esa config

    • list environs and config
  • esa stats

    • show statistics of your team
    • This command can be used for access test.
  • esa reset <target.ipynb> [--number <post_number>]

    • remove upload history by esapy in notebook file
    • new post_number can be assigned
  • esa ls <dirname or filepath>

    • show notebook list in the directory
    • <dirname> can be abbreveated. Default is the current working directory.

(deprecated) config file

Use environment variable instead of config file.

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

token: your_token
team: your_team

TIPS

Combination with fuzzy finders like fzf is useful. For example,

alias esafu='esa up --no-browser "$(esa ls | fzf | sed -r "s/(.+)\\| (.+)/\\2/")"'

INSTALLATION for DEVELOPMENT

  1. setup poetry on your environment
  2. clone this repository
  3. cd repo directory
  4. poetry install
  5. git checkout develop

For Growi adminitorator

Allow details tag and open attribute by configuration. Allow guest user access by security configuration. Some APIs have bug related to authentication.

LICENSE

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

Metadata

Release files for esapy 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for esapy 2.0.1
File Size Uploaded
esapy-2.0.1.tar.gz 21.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for esapy 2.0.1
File Interpreter ABI Platform
esapy-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.1 kB

Release files / esapy-2.0.1.tar.gz

Download URL esapy-2.0.1.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
12f2e4c4d5a3a0be7bae8ed667d5fdd46a938f1b0c4d7c4f48ea638534b27040
BLAKE2b-256 checksum
How to use checksums
643111520f2807f616ae0e24771828a903ad5bece7144e4652b19212c3bbdeaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.8.10 Linux/5.8.0-59-generic

Release files / esapy-2.0.1-py3-none-any.whl

Download URL esapy-2.0.1-py3-none-any.whl
Size 22.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa0e139b900c0d2f153c5d969162ca46c4e00343f171c59d5686be0de2965fe5
BLAKE2b-256 checksum
How to use checksums
1e0ef79e9697166113a0f50ba4c8a4880d04bb56e14577784ae67744ef810249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.8.10 Linux/5.8.0-59-generic

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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