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.333230494

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.333230494
File
chesslib-1.0.333230494-cp39-cp39-manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333230494-cp39-cp39-manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333230494-cp39-cp39-manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
chesslib-1.0.333230494-cp38-cp38-manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333230494-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333230494-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
chesslib-1.0.333230494-cp37-cp37m-manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333230494-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333230494-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
chesslib-1.0.333230494-cp36-cp36m-manylinux2014_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333230494-cp36-cp36m-manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333230494-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
chesslib-1.0.333230494-cp35-cp35m-manylinux2014_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.17+ x86-64 Details
chesslib-1.0.333230494-cp35-cp35m-manylinux2010_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64 Details
chesslib-1.0.333230494-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details

Total release size: 871.5 kB

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

Download URL chesslib-1.0.333230494-cp39-cp39-manylinux2014_x86_64.whl
Size 61.5 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c114327950423f4d06993df045825ef61a428e06db0fced911721c88ef2812d5
BLAKE2b-256 checksum
How to use checksums
66b3bda613dd869170777d46d85e6b36b17ca6769f19913fe533ef776e989665
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp39-cp39-manylinux2010_x86_64.whl
Size 61.2 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
063f9c801a57cd1de4c23fb218a57104398d6b96657406c3211f7c7838d2c440
BLAKE2b-256 checksum
How to use checksums
72c7e85f720365c1629d3745214b9948c2bd05fbe46ad2ff1d8655481f5279ad
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp39-cp39-manylinux1_x86_64.whl
Size 50.9 kB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
c6c6b54f3dc31fa9f16a32430e911febaf25501bd60e4168e1c856a7c69cb662
BLAKE2b-256 checksum
How to use checksums
20540525b58fa676eef772f15eac08eafef85f72f7c064a4863cff642aa3f9de
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp38-cp38-manylinux2014_x86_64.whl
Size 61.8 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
20eebcc4322561f229b010eb99f843513b719adfd83a4bd36f7d7335297058c5
BLAKE2b-256 checksum
How to use checksums
36bede9f611d8e0dd3d5eadb34117a0746cd7199dfbb503df8e46ccfed68e296
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp38-cp38-manylinux2010_x86_64.whl
Size 61.6 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
7c9070d8204d2b3ae461e525621c995aca9dbe5c442007c8dbfca0b7988dc4be
BLAKE2b-256 checksum
How to use checksums
3829d19db8d67dd52ae559d018f46c986b12cf926d419ba03a9b84514b20ab63
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp38-cp38-manylinux1_x86_64.whl
Size 51.3 kB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b0406a3255d72323397666de2817f1859bf582e6fb87c7a62a4ecdee41aae92e
BLAKE2b-256 checksum
How to use checksums
d1b4423ff64174cb411cd045191c4650dc2ffd2132384ff8477c4867bebf4987
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp37-cp37m-manylinux2014_x86_64.whl
Size 62.6 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
dabaaf0fee6e5970f3dd86580151c5b29aa2226ad3281839ea6346239f91286e
BLAKE2b-256 checksum
How to use checksums
c1bcf108a66da5bd616ab7a4c3c2980fc07ed91a17ffb3bd04389759df29fc00
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp37-cp37m-manylinux2010_x86_64.whl
Size 62.4 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
d8771e5829314cdaca3d6493ee9b50427d81af92be93981a5d5abb4f4bc30571
BLAKE2b-256 checksum
How to use checksums
fb6065e823355d51e01f9b8cfd5bd2fda9c477c40a91e0cf813243d425084c52
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp37-cp37m-manylinux1_x86_64.whl
Size 50.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
89468913929442dfa5135f71457a1eff851f72fe25065693f04cfab935c124bf
BLAKE2b-256 checksum
How to use checksums
a133bf51885c5d3e37a7a28693b6e42451eb1c9bd6c0b168326041b0705533a9
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp36-cp36m-manylinux2014_x86_64.whl
Size 61.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
560a7067eb312c63cf38fbb40e3d291f4385e75687e5ee07466e69306c01b915
BLAKE2b-256 checksum
How to use checksums
39ff89f7421fe0a40fbdb9f5cb0b0cc44758c1926d20d22e8f484d9750f15102
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp36-cp36m-manylinux2010_x86_64.whl
Size 61.4 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
fd2977a054f3b38359bdc5d19bbc0c4b7ae039e362d342fdde4489ac3d9a4e91
BLAKE2b-256 checksum
How to use checksums
c17a37b868473679c9cf46d00001a9be111cfeb0035e353529b7badaeb0a66b6
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp36-cp36m-manylinux1_x86_64.whl
Size 50.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
442bd13a1ca78dea27e7411c0fef95b20c38244c3f1cce5e7667905f7e2a1627
BLAKE2b-256 checksum
How to use checksums
fd7fda32c4d7b7eb990decd3762ef396bd0e81cbc9ef47db0d0992c75d30d831
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp35-cp35m-manylinux2014_x86_64.whl
Size 61.3 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8a2a48c7dac0e1afa1035462aaf0540210c3b75f3a4cb4b09f61c0b11591c9a3
BLAKE2b-256 checksum
How to use checksums
ffd482a2bda564abc27dd9a871d8108632a7b226d58f910c3a149045dc44341c
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp35-cp35m-manylinux2010_x86_64.whl
Size 61.1 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
d6be3783a3231e9af204151f389acce7b7bd6d42ec45e1f4d6d7fbe7452ad04b
BLAKE2b-256 checksum
How to use checksums
47ea1692b843f0fdc9240d6e38326e0c1023e51f781dbf1a1092d6793dd266a0
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.56.2 CPython/3.8.7

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

Download URL chesslib-1.0.333230494-cp35-cp35m-manylinux1_x86_64.whl
Size 50.9 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
9b7f63691d64df17b42b62b9fc19c085d2a9217ed1a76694dbc6ebb89c56b2df
BLAKE2b-256 checksum
How to use checksums
5e66ef1c584eb3d83fb56c2e32d9d92367c0e4e8226090050b1281839854f0cb
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.56.2 CPython/3.8.7

Release history Release notifications | RSS feed

This release

1.0.333230494 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