Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tuple of cell types to nbformat API #119

Open
wstomv opened this issue Sep 25, 2017 · 0 comments
Open

Add tuple of cell types to nbformat API #119

wstomv opened this issue Sep 25, 2017 · 0 comments

Comments

@wstomv
Copy link

wstomv commented Sep 25, 2017

When using nbformat as a library to process Jupyter notebooks, it would be convenient to have a tuple (or list, or set) of allowed cell types. For instance,

CELL_TYPES = ('markdown', 'code', 'raw', )

It would also be useful to have some other similar constants on the API, such as

OPTIONAL_CELL_FIELDS = {
    'markdown': {"attachments"},
    'code': set(),
    'raw': {"attachments"}
}
OPTIONAL_OUTPUT_TYPES = {
    'execute_result': {'data', 'metadata' ,'execution_count'},
    'stream': {'name', 'text'},
    'display_data': {'data', 'metadata', },
    'error': {'ename', 'evalue', 'traceback'},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant