Skip to main content

Generate a chess board image given a FEN, à la Lichess style.

Project description

fen-to-image

Generate a chess board image given a FEN, à la Lichess style.

Installation

fentoimage is available on PyPI.

pip install fentoimage

Example Usage

import chess

from fentoimage.board import BoardImage

fen = "rnbqk1nr/pppp1ppp/8/4p3/1bP5/2N5/PP1PPPPP/R1BQKBNR w KQkq - 2 3"
renderer = BoardImage(fen)
image = renderer.render(highlighted_squares=(chess.F8, chess.B4))
image.show()

Example Output

English Opening: King's English Variation, Kramnik-Shirov Counterattack

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fentoimage-0.1.0.tar.gz (6.9 MB view hashes)

Uploaded Source

Built Distribution

fentoimage-0.1.0-py3-none-any.whl (7.6 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page