Skip to content

leyts/lysqlnb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lysqlnb

PyPI - Version PyPI - Python Version Pydantic v2 PyPI - License

A Python library for reading and validating Oracle SQL notebooks (.sqlnb).

Warning

This package is under development. The API is subject to breaking changes.

Installation

pip install lysqlnb

Background

The data models are based on the VS Code NotebookSerializer API.

Usage

>>> from pathlib import Path
>>> import lysqlnb as sqlnb
>>> nb = sqlnb.load(Path("path/to/notebook.sqlnb"))
>>> nb.model_dump_json(indent=2)
{
  "cells": [
    {
      "kind": 1,
      "value": "# This is Markdown.",
      "language_id": "markdown"
    },
    {
      "kind": 2,
      "value": "SELECT * FROM departments;",
      "language_id": "oracle-sql"
    }
  ]
}

Requirements

Python 3.14+

Licence

MIT

About

A Python library for reading and validating Oracle SQL notebooks.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages