Skip to main content

A cool way to import notebooks into notebooks! Also can parameterize notebooks when it loads!

Project description

Nimport

uses github action twine-upload

Requirements

  • Needs git to be installed for github provider to work

Use

!pip install --upgrade nimport
%load_ext nimport

Examples

  • Get a file from public repo and navigate to that file

    %nimport container="yaananth/hack-sample-note2" path="one.ipynb" provider="github" providerOptions={} navigate="trueOrAnythingHere"
    
  • Get a file from public repo and display a link to that file

    %nimport container="yaananth/hack-sample-note2" path="one.ipynb" provider="github" providerOptions={}
    
  • Get a file from private repo and navigate to that file

    %nimport container="yaananth/hack-sample-note2" path="one.ipynb" provider="github" providerOptions={{"token":"PATTOKENHERE"}} navigate="trueOrAnythingHere"
    
  • Clone a public repo and navigate to the boot strap file

    Needs git to be accessible

    %nimport container="yaananth/pipeline-delays" path="delays.ipynb" provider="github" providerOptions={"clone":"true"}
    
  • Parameterize notebook from URL

    from nimport.utils import open_nb, load_params
    params = load_params(currentUrl)
    open_nb("pipeline-delays/delays.ipynb", params, redirect=True)
    
  • Get URL from browser into python (Javascript to python communication in nteract)

    clientData = {}
    def callback(x):
        global clientData
        clientData = x
    parse_client_data(callback)
    print(clientData)
    

Develop

Package

pip install -r requirements.txt
python setup.py sdist

Publish

pip install twine
twine upload dist/*

Test

Resources

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

nimport-0.10.21.tar.gz (7.3 kB view details)

Uploaded Source

File details

Details for the file nimport-0.10.21.tar.gz.

File metadata

  • Download URL: nimport-0.10.21.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.17

File hashes

Hashes for nimport-0.10.21.tar.gz
Algorithm Hash digest
SHA256 479a049ee391dad3b1e6de76cff9f42fa254afa0575967fe33cabdfcc20ea4f6
MD5 3b8af8fc7c57c91ff66f93c26e58101e
BLAKE2b-256 cd9ae087cbb9f511941efe8a79cf28845d27abd3eac50dc3b63b1ab440d554c4

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