Skip to main content

PyPi Release Docker CI

ChessLib Python Extension

About

This project provides an efficient chess draw generation extension for Python3. The main purpose of this project is enabling further TensorFlow AI projects and learning how to write an efficient Python3 extension (using good old C).

Usage

Install the official Python package using pip:

pip install chesslib

Use the chesslib package like in the following example:

import chesslib
import numpy as np
import random


def test():

    # create a new chess board in start formation
    board = chesslib.ChessBoard_StartFormation()

    # generate all possible draws
    draws = chesslib.GenerateDraws(board, chesslib.ChessColor_White, chesslib.ChessDraw_Null, True)

    # apply one of the possible draws
    draw_to_apply = draws[random.randint(0, len(draws) - 1)]
    new_board = chesslib.ApplyDraw(board, draw_to_apply)

    # write the draw's name
    print(chesslib.VisualizeDraw(draw_to_apply))

    # visualize the board before / after applying the draw
    print(chesslib.VisualizeBoard(board))
    print(chesslib.VisualizeBoard(new_board))

    # revert the draw (just call ApplyDraw again with the new board)
    rev_board = chesslib.ApplyDraw(new_board, draw_to_apply)

    # get the board's 40-byte-hash and create a new board instance from the hash
    board_hash = chesslib.Board_ToHash(board)
    board_reloaded = chesslib.Board_FromHash(board_hash)

    # see tests/ folder for more examples

How to Develop

The commands for dev-testing the chesslib are wrapped within a Docker environment. Therefore build the 'Dockerfile-dev' file which takes your source code and performs all required CI steps (build + install + unit tests). Afterwards you may attach to the Docker image with the bash console interactively and run commands, etc.

# make a dev build using the 'Dockerfile-dev' build environment
# this runs all CI steps (build + install + unit tests)
docker build . --file Dockerfile-dev -t "chesslib-dev"

# attach to the build environment's interactive bash console (leave the session with 'exit')
docker run "chesslib-dev" -it bash

# mount a Python test script into the build environment and run it
docker run -v $PWD:/scripts "chesslib-dev" python3 /scripts/test.py

Advantages of this approach are that it simplifies the dev machine setup a lot as you only need Docker, git and a good text editor on your local machine. Moreover you don't mess up your dev machine when trying to build and install the chesslib package for debugging again and again. And most importantly you keep your local copy of the git repo clean as all temporary files are created within the Docker container, so you basically don't need to worry about accidentially including build files into git commits, etc.

For a quickstart, set up your dev machine as a VM (e.g. Ubuntu 20.04 hosted by VirtualBox). After successfully creating the VM, use following commands to install all essential dev tools (git, docker, good text editor).

# install docker (e.g. Ubuntu 20.04)
sudo apt-get update && sudo apt-get install -y git docker.io
sudo usermod -aG docker $USER && reboot

# download the project's source code (if you haven't done before)
git clone https://github.com/Bonifatius94/ChessLib.Py
cd ChessLib.Py

# install the 'Visual Studio Code' text editor (optional)
sudo snap install code --classic

You may use this project under the MIT licence's conditions.

Metadata

Release files for chesslib 1.0.333764636

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for chesslib 1.0.333764636
File
chesslib-1.0.333764636-cp39-cp39-manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333764636-cp39-cp39-manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333764636-cp39-cp39-manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
chesslib-1.0.333764636-cp38-cp38-manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333764636-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333764636-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
chesslib-1.0.333764636-cp37-cp37m-manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333764636-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333764636-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
chesslib-1.0.333764636-cp36-cp36m-manylinux2014_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333764636-cp36-cp36m-manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333764636-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
chesslib-1.0.333764636-cp35-cp35m-manylinux2014_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333764636-cp35-cp35m-manylinux2010_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333764636-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details

Total release size: 912.3 kB

Release files / chesslib-1.0.333764636-cp39-cp39-manylinux2014_x86_64.whl

Download URL chesslib-1.0.333764636-cp39-cp39-manylinux2014_x86_64.whl
Size 63.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
efac804207b2904cb6faec9227f8bd4c2c12f864fde772b2416303c20b272db0
BLAKE2b-256 checksum
How to use checksums
d14ba111195fd2ae5284fa1d5ca228952ab84d6a6eb6ad308a2e3052fc436e76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp39-cp39-manylinux2010_x86_64.whl

Download URL chesslib-1.0.333764636-cp39-cp39-manylinux2010_x86_64.whl
Size 63.5 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
6fe70a9585f0e7afb772eaec60a0594b7f74bba6a9f140d9f0432ba1b5f55e68
BLAKE2b-256 checksum
How to use checksums
1db30e03d100a01b7e250a02157d432348c9567cbbfa0bc759b4fd0dc2a99abe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp39-cp39-manylinux1_x86_64.whl

Download URL chesslib-1.0.333764636-cp39-cp39-manylinux1_x86_64.whl
Size 54.3 kB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
da3e276e31c3ece73d7a99ddb3b58c5b16948825a5e785f7d790fbdf521a3248
BLAKE2b-256 checksum
How to use checksums
98c4377c75583b543cd06797099129fac08fd1df0ede321437915ba9499871f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp38-cp38-manylinux2014_x86_64.whl

Download URL chesslib-1.0.333764636-cp38-cp38-manylinux2014_x86_64.whl
Size 64.3 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e172d018a26e4525cda4749bcc1d4be2d5c3eaaa649307104a502438d94f7dcd
BLAKE2b-256 checksum
How to use checksums
e1119bf3fdfd816b57a1b80f4296dbdcd6059a279ecfeb9c45814951affb623b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp38-cp38-manylinux2010_x86_64.whl

Download URL chesslib-1.0.333764636-cp38-cp38-manylinux2010_x86_64.whl
Size 63.9 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
c7cf37330c41f44273f7c4df2f0fd17c89c33ed87e1af481936afe60aba912b0
BLAKE2b-256 checksum
How to use checksums
d04e873b9cc04d61e2712a3d573afcb8b1e8b7164b9882fc0ea0ce608c44da46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp38-cp38-manylinux1_x86_64.whl

Download URL chesslib-1.0.333764636-cp38-cp38-manylinux1_x86_64.whl
Size 54.7 kB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
3b99770f2fb6dd898d1152b5cb85c7f3c046eb9f0a03894ae478b6b6a6879958
BLAKE2b-256 checksum
How to use checksums
3705323478d016a502686f1966d30254e214ebb8b96050e43bc58a6068298055
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp37-cp37m-manylinux2014_x86_64.whl

Download URL chesslib-1.0.333764636-cp37-cp37m-manylinux2014_x86_64.whl
Size 65.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1f99f80c64ec4e24257410cf3bdd6b6a227183915ed62013ce8ba5df9f43a73d
BLAKE2b-256 checksum
How to use checksums
ce564c213fc384a39bd0322c9f1f4829f52c6846446a1e6b58b28e4c5662f4c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp37-cp37m-manylinux2010_x86_64.whl

Download URL chesslib-1.0.333764636-cp37-cp37m-manylinux2010_x86_64.whl
Size 64.7 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
438586cf6be88c97a8d2a18ced4c66c10007197a735778773f32498e4416ad78
BLAKE2b-256 checksum
How to use checksums
c255ee100cf3d7a37378b8a13b0793487e73435fbb2c273a649591d6b49c5281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp37-cp37m-manylinux1_x86_64.whl

Download URL chesslib-1.0.333764636-cp37-cp37m-manylinux1_x86_64.whl
Size 54.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e4c63f4e280b45aeb021411629dc96d0cb8793712eff79391d5ae0f554fc0f3f
BLAKE2b-256 checksum
How to use checksums
01a4319e1a5b0ee07148f3a49a5f70c80b0f73b14eb1fabe7af1806979e3bfbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp36-cp36m-manylinux2014_x86_64.whl

Download URL chesslib-1.0.333764636-cp36-cp36m-manylinux2014_x86_64.whl
Size 64.1 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
acc8b2a64c9505e9a9db38cad4ec51a2b9d0de22274109300859c48adf89b7ed
BLAKE2b-256 checksum
How to use checksums
0cdb57c923663dfb77bd550e8ef633b0aa7a19d72454b5e3c9a440598894f55d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp36-cp36m-manylinux2010_x86_64.whl

Download URL chesslib-1.0.333764636-cp36-cp36m-manylinux2010_x86_64.whl
Size 63.7 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
3518185e8d9c8e19f819b40677988d8b60e56e5648798f8a75ec2064e9584535
BLAKE2b-256 checksum
How to use checksums
b96c15abdec8d1ab218fcfe00403f0ac48711490be75b5b3ad21523bd0755226
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp36-cp36m-manylinux1_x86_64.whl

Download URL chesslib-1.0.333764636-cp36-cp36m-manylinux1_x86_64.whl
Size 54.3 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
05e5a1c20aa7ae6aacc4bbe4898215ba1a7b1b1067201d469d452200fdef87d4
BLAKE2b-256 checksum
How to use checksums
1628175dce036b1195f0f89ab071793f5a0b677bf9129d6d8517d29c075aa2f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp35-cp35m-manylinux2014_x86_64.whl

Download URL chesslib-1.0.333764636-cp35-cp35m-manylinux2014_x86_64.whl
Size 63.9 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9ed5edfaccd8d25c4eab34ab2c2c9e5ee14977bad53870265d49a3842a1a1875
BLAKE2b-256 checksum
How to use checksums
4959ae6efe2d56d98a605564292bfce075448563ce73ddc5dfc2f44d7706340d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp35-cp35m-manylinux2010_x86_64.whl

Download URL chesslib-1.0.333764636-cp35-cp35m-manylinux2010_x86_64.whl
Size 63.5 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
bc378d8114e252e4864bb3694bb3c062c0c9afa8cd62b66dc46a4eedabcc1061
BLAKE2b-256 checksum
How to use checksums
1511e9701de392eee4f44ce91bcbe553a8053c813b27b071a0cdf425df8dc9bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release files / chesslib-1.0.333764636-cp35-cp35m-manylinux1_x86_64.whl

Download URL chesslib-1.0.333764636-cp35-cp35m-manylinux1_x86_64.whl
Size 54.3 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
166158339e6c438e4feb03f94b7fbd3775617e144bcd9e29ef240fef69b91e56
BLAKE2b-256 checksum
How to use checksums
45ebaa3702f4d74c8cb53edb411aef0681d6a3499bc685a35b04fab98b35a417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7

Release history Release notifications | RSS feed

This release

1.0.333764636 This release

15 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page