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

Copyright

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

Metadata

Release files for chesslib 1.0.329564886

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

Total release size: 862.2 kB

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

Download URL chesslib-1.0.329564886-cp39-cp39-manylinux2014_x86_64.whl
Size 60.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
29e256fdedb85e6e9e3143f165c2c46a3aa6e34105f5b398db0ec43d063489c8
BLAKE2b-256 checksum
How to use checksums
a53303c00fad6ef99829bd4957162fcea121c990563de80304014837983f4c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp39-cp39-manylinux2010_x86_64.whl
Size 60.5 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
1b5fa8ab23a9c9136c5889e76592c51345758a44c86f6107ab26ab42156f1715
BLAKE2b-256 checksum
How to use checksums
0d3a3aeaea10a57b24ecad0b524aa04494160d11b3e42896373277811d44f443
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp39-cp39-manylinux1_x86_64.whl
Size 50.4 kB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
73c0930d3b97d281752505f39cb7d655f6525a0e2c51fc2ddf431d38368ec84f
BLAKE2b-256 checksum
How to use checksums
f6d0c9f9a88a71d6a15bcebf94f8d6cdf6be7c5417fcef9dba7c21d2fc6e6fe8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp38-cp38-manylinux2014_x86_64.whl
Size 61.1 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
47e77e896487bac31157a45ae92f19d88a9fee8501035134b352cc86d45137f0
BLAKE2b-256 checksum
How to use checksums
3c39555d8dfa1b3a28738d2616f3ac0209e7f504ff051be3f54b56ef3dbf4697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp38-cp38-manylinux2010_x86_64.whl
Size 60.9 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
76fc6c1e8fbeaad2ce16ae79fe67822442600ce56d7320583f9ee790c8143d6f
BLAKE2b-256 checksum
How to use checksums
7b8836dbb8a16c33035066065a19e38da6469f06289d96e6d01ef513440b307e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp38-cp38-manylinux1_x86_64.whl
Size 50.8 kB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
05739c60c7dd10b4b165cb21349e5233ad835386df4e5571566c318e855ff82f
BLAKE2b-256 checksum
How to use checksums
b7c8415c1b2155a34749ba6912c37e55b4661a6da638eca79ebec9d39164e042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp37-cp37m-manylinux2014_x86_64.whl
Size 61.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
a1838d996bd6ef38ec9c87ace15647a8017b16ab67658190db303597938bf926
BLAKE2b-256 checksum
How to use checksums
5f2afbe665100c985ac83a732e4ed38659279974d780eb5729b3605afa64265a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp37-cp37m-manylinux2010_x86_64.whl
Size 61.7 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
99ddf6d6fdc0f7bfcb33edb43974cf3867d564c9a4ec2585ec629dd310893d77
BLAKE2b-256 checksum
How to use checksums
6db0f4e995e8b7aaa58ffd8f15def8451fd77598933b6a5fe62cbf7c06ef5d29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp37-cp37m-manylinux1_x86_64.whl
Size 50.4 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
5cd31cd6244f1965de8b09a69d3622710e781ec79da9399047baeec7874bedb5
BLAKE2b-256 checksum
How to use checksums
961b599191c043dbed87303d9b0c8a693e8c8b8bdb4856f7c72daa0fe8a2dc7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp36-cp36m-manylinux2014_x86_64.whl
Size 61.0 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
69af35c4db0710677285b051c3d7a2eaa9a902b0a3c5d0f9ed8a430d78efad08
BLAKE2b-256 checksum
How to use checksums
d8451694d1131a4a69d7b2680d01824a4e7f11379ab2bdfff59ef51bc5b25906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp36-cp36m-manylinux2010_x86_64.whl
Size 60.7 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
509944943a5a3bb00e3c960987232c1d5cb4bc98ad7a084903a9a5c45c9b1eea
BLAKE2b-256 checksum
How to use checksums
5f507413ed826222b8a67f9fb7323ed1920da16cc8481b50c9c221c08bbd843d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp36-cp36m-manylinux1_x86_64.whl
Size 50.4 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
71da98e0ddaff836c09c29a6817ed472bdf4d6b0d1066a8304fdeac0dfa55903
BLAKE2b-256 checksum
How to use checksums
83701f313c82483a7d92e50f291a18f48ac55366b1c52b3415d9744f762e31e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp35-cp35m-manylinux2014_x86_64.whl
Size 60.7 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9136875213480f09d18d9c049a08b40ae2ccdd93221f7dc9b8230d9cc9232d0b
BLAKE2b-256 checksum
How to use checksums
d587f1bd590ec235a084334a117f350feaae426230493c1ffee665f8b064746a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp35-cp35m-manylinux2010_x86_64.whl
Size 60.5 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
27805ad23345c0c548e907797509b14d8a19bde87f7dafd1a1c800dab42e9c2b
BLAKE2b-256 checksum
How to use checksums
c4f70946d6987cdbabfa31c8c997fbb1d654a2e510bb90d2d421219358a38ff3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

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

Download URL chesslib-1.0.329564886-cp35-cp35m-manylinux1_x86_64.whl
Size 50.4 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
d5ddff51190f3a821176f75dccdc671b1b578ad97aca0df474422f2d99b2fd95
BLAKE2b-256 checksum
How to use checksums
7e8c383bf0d7a4e0e6b4940cd33bad477bbcce59e033f5d18ea9ab8678be213d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

1.0.329564886 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