Skip to main content

A performant library designed for creating and managing bots in a -like game environment. This library offers various tools and features to build, test, and deploy bots efficiently to Botris.

Project description

botris-interface

GitHub license GitHub issues GitHub stars GitHub forks Wheels

botris-interface is a performant library designed for creating and managing bots in a Tetris-like game environment. This library offers various tools and features to build, test, and deploy bots efficiently to Botris.

Installation

To install the library, use the following command:

pip install botris-interface

Usage

Creating a Bot

To create a bot, you need to implement the Bot interface provided by the library. Here is an example:

from botris.bots import Bot

class CoolBot(Bot):
    async def analyze(
        self, game_state: GameState, players: List[PlayerData]
    ) -> Awaitable[List[Command]]:
        # Implement your bot logic here
        pass

Running the TetrisGame

You can run the TetrisGame using the following code:

from botris import TetrisGame
from botris.engine import Move

gs = TetrisGame()
gs.execute_move(Move.move_left)

Connecting a Bot to the Server

To connect your bot to the server, use the following code:

import asyncio
from botris import Interface

async def main():
    bot = MyBot()
    itf = Interface.create(TOKEN, ROOM_KEY, bot)
    await itf.connect()

asyncio.run(main())

License

This project is licensed under the MIT License - see the LICENSE file for details.

GitHub Repository

For more information, visit our GitHub repository.

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

botris-interface-0.2.0.dev2.tar.gz (67.1 kB view details)

Uploaded Source

Built Distributions

botris_interface-0.2.0.dev2-pp310-pypy310_pp73-win_amd64.whl (132.9 kB view details)

Uploaded PyPy Windows x86-64

botris_interface-0.2.0.dev2-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (144.1 kB view details)

Uploaded PyPy manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

botris_interface-0.2.0.dev2-cp312-abi3-win_amd64.whl (135.2 kB view details)

Uploaded CPython 3.12+ Windows x86-64

botris_interface-0.2.0.dev2-cp312-abi3-win32.whl (126.5 kB view details)

Uploaded CPython 3.12+ Windows x86

botris_interface-0.2.0.dev2-cp312-abi3-musllinux_1_2_x86_64.whl (256.2 kB view details)

Uploaded CPython 3.12+ musllinux: musl 1.2+ x86-64

botris_interface-0.2.0.dev2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (148.0 kB view details)

Uploaded CPython 3.12+ manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

botris_interface-0.2.0.dev2-cp311-cp311-win_amd64.whl (135.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

botris_interface-0.2.0.dev2-cp311-cp311-win32.whl (126.5 kB view details)

Uploaded CPython 3.11 Windows x86

botris_interface-0.2.0.dev2-cp311-cp311-musllinux_1_2_x86_64.whl (255.7 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

botris_interface-0.2.0.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (147.0 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

botris_interface-0.2.0.dev2-cp310-cp310-win_amd64.whl (135.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

botris_interface-0.2.0.dev2-cp310-cp310-win32.whl (126.7 kB view details)

Uploaded CPython 3.10 Windows x86

botris_interface-0.2.0.dev2-cp310-cp310-musllinux_1_2_x86_64.whl (256.0 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

botris_interface-0.2.0.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (147.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

File details

Details for the file botris-interface-0.2.0.dev2.tar.gz.

File metadata

  • Download URL: botris-interface-0.2.0.dev2.tar.gz
  • Upload date:
  • Size: 67.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for botris-interface-0.2.0.dev2.tar.gz
Algorithm Hash digest
SHA256 0ee894e25c48543d574934a4a309a61e65b73c55b6afd05ab553cefc39514b1a
MD5 de545b681c0cb4f801038222a6defa98
BLAKE2b-256 daaadb519cd77a1f77858318bb792d9089ca9ae6e1e1885f9a8269490d5561fa

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 f4afe025d2ea7aa6e94660ee529753c58a68d8a43e186699d41874ac4685dff3
MD5 ad6724d4b568e490a256e4ed313b98fe
BLAKE2b-256 2b0066930092242c6414e3674c7f6b50df274d3bc5b440c13263f19bf2023b5a

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 41ec68790c6c06ed111dd4de68dbc0229b2769e6a441b875a28e9fb1fc81d7d9
MD5 6f5956c07e0254ed1fd3de237aa39d0d
BLAKE2b-256 ab6da00a0129b497d03a9dd6c965e396cdb8ef24e7ad35d744223d879c0c8dd3

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 87ab162b7397ae73874403ed2bf46d76fb7fd77b05ed1a20132a96ebe280964f
MD5 ee2c1c443697be355b7fe5b576925f8f
BLAKE2b-256 4074213b18cb0100d30780dd3a40b005b72cdb38f81c40175a1463127b56a406

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp312-abi3-win32.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp312-abi3-win32.whl
Algorithm Hash digest
SHA256 3724a81a808ddad5ae7f2fe92c215a90d43e0de15e356f48dfbbcd913a564d5d
MD5 a00638cd16205825d709e32e83fa4cbf
BLAKE2b-256 6c1520c672bda3bb808438f91b76d21fb6bd2261dd0ba8e869ae214bd2f4a169

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e72cbf5d538224bf86b9b7942273c48bf7b7573873ddbd30f1a47b9e2c9c45ea
MD5 8cfc8e18dca2290453cbeaab1edea19f
BLAKE2b-256 2969ead9743b14f74b434b730fd8f2869c987953a6363f505cbd3583544b16f2

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1fd2b9039787dfefba545ac04cd2c43b689bc0f7aa229ac09d19e6dfb1dc3c54
MD5 09d88299e688ed841c81374a44b34116
BLAKE2b-256 a6f6e487f7a988f87b52cf226962c609e4318f00a87f44a1ff4598d86a85fb0e

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7386c9351e851fce5e2d200806c2f713168cd8af93fa471f492a5319f8f9a6b7
MD5 30d5e99634a8bf5de718604128052512
BLAKE2b-256 b5132dbc2100ab758af16f90b4f9b46363df6143f868230a33b5cf27700a3f69

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 9049d551593063309236ba62c8c1542ceb6b450a06253c7743d9905b28d15092
MD5 b35deb050349821cb3c3210ded20bb2f
BLAKE2b-256 8fa61717f785f49dd2a849f20a9b4b62522661e44868bc329a2b29dd0817545a

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cdec927b3c82339d5b27cd6686a82161f3cb9cfa279e0a06a516cd87f2bab978
MD5 2399f47a2675e6fabbff4801093de79f
BLAKE2b-256 4225846b2552e58063885290d592675c7a6140079c3e7263a0bddf757fa14c07

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22dc9ef798d8fe80b546f0f11021aa26bfd2cb2ec4f37256bc95e777b15a8f4c
MD5 ec9201e0c2874a49f66fda190d6b2a05
BLAKE2b-256 5252d9edde913021ccc339e611dc0746c1adfe819943c544fe0daa45d278cc52

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9f6574e83bf73d237ff4506a15f7160e4fcb180a603e53240628f2183bada365
MD5 1e6ad93080370ec4086e528475140f20
BLAKE2b-256 6f0f31bb2ebab23011d762ce14275cf69ec518cf46cb8d8c9549bd4cc9e6045d

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp310-cp310-win32.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 eb5bd0fe3d0db451ce398a43a6399e1aafb4168b73413de4b53f93f53d78b75c
MD5 f728437c7f49a3dc679fdef3f74370aa
BLAKE2b-256 bce5ce37145a8be246c7dee913fb173ac78fc5cc0bad3d2cb7f10b06439ea590

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bf20ed71bd04485d26155153dbfb7747ae9a55eddbbc3741f22b941eb6e824dc
MD5 d8d775fdb4617c6770658011618bf6c5
BLAKE2b-256 cb7c3c47a9bb1b88fc013b9d9d0bd8b0a72b26e3b57b2c456392bca992d2190f

See more details on using hashes here.

File details

Details for the file botris_interface-0.2.0.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for botris_interface-0.2.0.dev2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 277c337d1cdbec303212ce7f4a69f5a2bbb5ba5ff28773d8ede7244a3e988fed
MD5 601af4832c04bef48afe00cc0a10e526
BLAKE2b-256 644b41f39662765edf0e142bab7b7a0f6d96e5966ef7ab48968d11a6f6068104

See more details on using hashes here.

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