ace.ari_text package

CODEC for converting ARI to and from text URI form.

class ace.ari_text.Decoder

Bases: object

The decoder portion of this CODEC.

decode(buf: TextIO) ARI

Decode an ARI from UTF8 text.

Parameters:

buf – The buffer to read from.

Returns:

The decoded ARI.

Throw ParseError:

If there is a problem with the input text.

class ace.ari_text.Encoder

Bases: object

The encoder portion of this CODEC.

encode(obj, buf: TextIO)

Encode an ARI into UTF8 text.

Parameters:
  • obj – The ARI object to encode.

  • buf – The buffer to write into.

exception ace.ari_text.ParseError

Bases: RuntimeError

Indicate an error in ARI parsing.

Submodules

Lexer configuration for ARI text decoding.

ace.ari_text.lexmod.new_lexer(**kwargs)

Parser configuration for ARI text decoding.

ace.ari_text.parsemod.new_parser(**kwargs)