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

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

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 -it "chesslib-dev" bash

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

# debug the GitHub release pipeline
docker run -v $PWD/dist:/output -v $PWD:/build -it "chesslib-dev" bash

This software is available under the MIT licence's terms.

Metadata

Release files for chesslib 1.0.340181575

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.340181575
File
chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64, Linux glibc 2.17+ x86-64 Details
chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64, Linux glibc 2.12+ x86-64 Details
chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64, Linux glibc 2.5+ x86-64 Details
chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64, Linux glibc 2.5+ x86-64 Details
chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64, Linux glibc 2.5+ x86-64 Details
chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64, Linux glibc 2.5+ x86-64 Details
chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64, Linux glibc 2.17+ x86-64 Details
chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64, Linux glibc 2.5+ x86-64 Details

Total release size: 754.3 kB

Release files / chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 56.2 kB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
38c0fec8a8ff9371bfc54f40769e26c4bc352c96b09b079207417c612c183fbd
BLAKE2b-256 checksum
How to use checksums
1feb1903a8ed0c55bc73a794ac38304b196023f63f18c1c451d846a9fd39d3a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 65.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
bfb0a9add5b1703bb78ab5d9ebe6371cd5b108d80ef4a48a82b38ed8d99bf2bd
BLAKE2b-256 checksum
How to use checksums
57ac3cf5fb4f87b71e836e865d8594b04ff51b30a4f17bf0e3a954471f6d911f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL chesslib-1.0.340181575-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 65.4 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
c1de6ac7a2b67ffddd1413137dbe84c541d5603571f2d4bfc04e2be3a4fe9088
BLAKE2b-256 checksum
How to use checksums
99654465c095b850f62ef58165c1cb444983182cd394d6ae36d98a3c05299775
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 56.6 kB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
1a67a65052352552b31af81f77f1c71bbb3ce2aee8eac24c78fa64d9bee53481
BLAKE2b-256 checksum
How to use checksums
a8794f0d7ab26061ab28a130059deb4704aefef829fab803b6aa3a5e29b91460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 66.3 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
67751b5d2a99cc6be5023f6a28cc4376732886a094dd09330afd6caef158c4db
BLAKE2b-256 checksum
How to use checksums
87b3fd3f37be6d56057ebfbdbbaef1a806de10ea8905df7623d7b46ed16b2550
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL chesslib-1.0.340181575-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 65.8 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
0844fb961b84439ca8d9c6db7daa07ec8278426ce6e756de37ac9836d340d352
BLAKE2b-256 checksum
How to use checksums
3dcdddeb77712265a6f45ac8da73c0d90c29c610dd9c4f49a4a122c58a32db83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 56.2 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
51555c5f3b4083cf3951a3fcf06f9eb780c3a331205de1d6d8a0ee5e03c55732
BLAKE2b-256 checksum
How to use checksums
2a4391936709d761b690bd6c298de48014bcd2d8e899feb15e823ec177b57730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 67.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
edd3882146ab08d6a829c6cb93a06e4c8175e5f0fbcfe4dfe1e3127b5892a020
BLAKE2b-256 checksum
How to use checksums
f3ece27b98038a233b72de93cdb9b99178d21e42c6189d82084e2d46219d8a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL chesslib-1.0.340181575-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 66.6 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
0f53019510ba6d5f6d57cb4f08c5e24bf1876e400cba4bc08c322e80161b4f1e
BLAKE2b-256 checksum
How to use checksums
aee6bea646a06698d6cc3ccc50f0f25ab9302d1a8cf141e27ffabd36c8b960f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 56.2 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
36ebc29d5d5622f3a94378948ef8f9e00bcc1b72423ac7c4940adb85adebd2ee
BLAKE2b-256 checksum
How to use checksums
68a863b257635f2f29f83f49ea51e1f0281536ff38563bfa9d7949a302b4a198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 66.2 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
a8247ae314088090fdd17d5812af6492c2c438cf29b1548fdfa9d730115e59d4
BLAKE2b-256 checksum
How to use checksums
310716f75a3114331fd7d66709a8245d4e724be05b0a5bf12094e0bc9a31db92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release files / chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL chesslib-1.0.340181575-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 65.7 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
950a567dc9d7711e09f39fd12c87af8e509295c28940549b2d55f87ae05414cd
BLAKE2b-256 checksum
How to use checksums
5fa229830c41e33c6d46e211f4bc0aa65dadda0edbec039fc714372e113efde6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11

Release history Release notifications | RSS feed

This release

1.0.340181575 This release

12 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