Skip to content

A module for reading and writing ANVL files and strings

License

Notifications You must be signed in to change notification settings

nausicaa-rose/anvl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anvl

anvl is a Python module designed to serialize and deserialize of A Name-Value Language.

Installation

Install via PyPI: pip install anvl

Usage

To decode an ANVL file: anvl.load(file_name). This returns a list of dictionaries.

To decode an ANVL string: anvl.loads(anvl_string). This returns a list of dictionaries.

To encode an ANVL file: anvl.dump(list_of_dict, file_name).

To encode an ANVL string: anvl.dumps(list_of_dict). Th`is returns an ANVL string.

Both dump and dumps can take additional arguments to specify the maximum line width, the character or characters used for indenting wrapped lines, and the line endings used. For example: anvl.dumps(list_of_dict, width=60, ident=" ", line_end="\n") The default line width is 80 characters. The default indentation is a tab character. The default line ending is "\r\n".

About

A module for reading and writing ANVL files and strings

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages