Skip to content
/ pysgf Public
forked from sanderland/pysgf

Small and simple SGF parser for python

License

Notifications You must be signed in to change notification settings

bixbyr/pysgf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PySGF

Release Status PyPI version Code style: black

PySGF is a lightweight but powerful parser for the Go SGF Format.

Quickstart

from pysgf import SGF
# parse either a string ..
root = SGF.parse(input_sgf)
# or pass a file name. It will try to detect the encoding specified in the SGF file
root = SGF.parse_file(input_file_name)
# all properties are stored as lists, but you can ask for the first
root.get_list_property('AB')
root.get_property('KM')
move = root.move # returns a Move object with options for SGF, GTP or 0- based coordinates
children = root.children # returns all child nodes

Documentation

For documentation, run make html in the docs directory.

About

Small and simple SGF parser for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%