A common library of modules for OpenAD plugin development.
Latest version: v0.0.3
To use this library in your OpenAD plugins, please refer to our Demo Plugin.
-
Add the library to your Poetry development dependencies in
pyproject.toml, making sure to specify the latest version.[tool.poetry.dependencies] openad_tools = { git = "ssh://git@github.com/acceleratedscience/openad-tools", branch = "main", tag = "v0.0.3" } -
In your code, import the tools as you need them.
from openad_tools.output import output_table
Modules related to the output of text or data in the terminal and Jupyter Notebook.
-
output.py
A simple way to output styled text and data to the termninal and Jupyter Notebook. -
style_parser.py
Converts XML styling tags like<bold>or<error>to ansi characters for terminal output, and HTML for Jupyter Notebook output. Mostly consumed byoutput.py. -
spinner.py
A spinner (based on Halo) to provide instant user feedback during longer processes like API calls. -
pretty_data.py
Methods to display lists and key-value lists in organized columns in the terminal. -
output_msg.py
A library of templated output messages. -
ascii_type.py
Display massive type in the CLI, using an ascii art alphabet.
A variety of practical tools.
-
grammar_def.py
Pyparsing grammar definitions, used as ready-made building blocks to build new commands. -
pyparsing.py
Functions to process some of the clauses provided ingrammar_def.py. -
helpers.py
A collection of helper functions for various purposes. -
jupyter.py
Methods for working with dataframes in Jupyter Notebook. -
locale.py
Support for language localisation. -
edit_json.py
A library for quickly editing JSON files directly from the CLI.