fenlmagic

Integration with IPython (Notebooks) for Fenl.

raises UsageError:

when improper arguments are provided

Submodules

Package Contents

Classes

QueryResult

FenlMagics

Functions

arg_to_response_type(arg)

load_ipython_extension(ipython)

clean_arg(arg)

Strips quotes and double-quotes from passed arguments

test_arg(arg, val)

Compares an argument against a test value.

Attributes

logger

arg_to_response_type(arg)[source]
Parameters:

arg (str) –

Return type:

kaskada.query.ResponseType

logger[source]
class QueryResult(expression, query_response)[source]

Bases: object

Parameters:
  • expression (str) –

  • query_response (kaskada.kaskada.v1alpha.query_service_pb2.CreateQueryResponse) –

dataframe: pandas.DataFrame[source]
set_dataframe(dataframe)[source]
Parameters:

dataframe (pandas.DataFrame) –

class FenlMagics(shell, client)[source]

Bases: IPython.core.magic.Magics

client[source]
fenl(arg, cell=None)[source]

fenl query magic

load_ipython_extension(ipython)[source]
clean_arg(arg)[source]

Strips quotes and double-quotes from passed arguments

Parameters:

arg (str) – input argument

Returns:

cleaned output

Return type:

str

test_arg(arg, val)[source]

Compares an argument against a test value. Returns true when the two strings are equal in a case-insensitive and dash/underscore-insensitive manner.

Parameters:
  • arg (str) – the argument to test

  • val (str) – the comparison value

Returns:

The comparision result.

Return type:

bool