Package openid :: Module kvform
[frames] | no frames]

Module kvform

source code

Functions
str
seqToKV(seq, strict=False)
Represent a sequence of pairs of strings as newline-terminated key:value pairs.
source code
 
kvToSeq(data, strict=False)
After one parse, seqToKV and kvToSeq are inverses, with no warnings:
source code
 
dictToKV(d) source code
 
kvToDict(s) source code
Function Details

seqToKV(seq, strict=False)

source code 

Represent a sequence of pairs of strings as newline-terminated key:value pairs. The pairs are generated in the order given.

Parameters:
  • seq ([(str, (unicode|str))]) - The pairs
Returns: str
A string representation of the sequence

kvToSeq(data, strict=False)

source code 

After one parse, seqToKV and kvToSeq are inverses, with no warnings:

   seq = kvToSeq(s)
   seqToKV(kvToSeq(seq)) == seq