Giter Club home page Giter Club logo

ipynb's Introduction

ipynb

CI tests

ipynb is a Haskell library for representing Jupyter notebooks and converting them to and from the JSON .ipynb format. The format is documented here: https://nbformat.readthedocs.io/en/latest/.

Both version 4 and version 3 are supported, though the data structure used is the same. A phantom type is used to provide different JSON serializations for the two versions. When working with version 4, use Notebook NbV4; when working with version 3, use Notebook NbV3.

The test suite verifies that write . read and read . write are identities, up to semantically insignificant differences in the JSON output.

Related work

The JuPyTer-notebook library has a similar job description, but there are some important differences:

  • JuPyTer-notebook parses code cell output as JSON; ipynb has a custom representation of Output.

  • JuPyTer-notebook allows representing some illegal cells (e.g., with cell_type markdown but also with execution_count and outputs). ipynb goes further in making illegal notebooks unrepresentable.

  • ipynb supports both v3 and v4 of nbformat, both in reading and writing; JuPyTer-notebook supports only v4 (and does not support the more recent v4 feature, attachments).

  • JuPyTer-notebook parses some notebook metadata into custom structures (using data type disjunction (:|:) to provide a fallback of text or a JSON value when parsing fails). ipynb just leaves all metadata as JSON Values.

  • JuPyTer-notebook depends on json-autotype, and thus has a much heavier transitive dependency graph than ipynb.

ipynb's People

Contributors

jgm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.