Skip to main content

streamlit-doubutsushogi

Open in Streamlit

A streamlit custom component for interactive board of doubutsushogi (animal chess) game.

Install

# from pypi
pip3 install streamlit-doubutsushogi

# or from github
# see also the streamlit component API manual (https://docs.streamlit.io/library/components/components-api)
git clone https://github.com/kota7/streamlit-doubutsushogi.git
cd streamlit-doubutsushogi/streamlit_doubutsushogi/frontend
npm run build
pip3 install -U ../../

Usage

See the minimal example at example.py:

import streamlit as st
from streamlit_doubutsushogi import st_doubutsushogi

c1, c2 = st.columns([6, 6])
with c1:
    state, status, action = st_doubutsushogi()

if status != 0:
    c2.write(f"Game over! Won by the player {status}")

Run the script by:

streamlit run example.py

example.gif

Doubutsu Shogi Master App

An interactive app is deployed on the Streamlit Cloud. To run the app on the computer locally, run the following:

streamlit run app/streamlit_app.py

Tips

How to upload this app to PyPI

# 1. build javascript sources
cd streamlit_doubutsushogi/frontend && npm run build && cd ../../
# 2. make python package wheel
rm -r build dist *.egg-info   # only for the second time or later
python3 setup.py sdist bdist_wheel
# 3. upload to PyPI
twine upload --repository pypi dist/*
  1. Build the javascript application
  2. Make Python package wheel
  3. Upload to PyPI

Release files for streamlit-doubutsushogi 0.0.21

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

Source distribution (sdist)

Source distribution for streamlit-doubutsushogi 0.0.21
File Size Uploaded
streamlit-doubutsushogi-0.0.21.tar.gz 717.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-doubutsushogi 0.0.21
File Interpreter ABI Platform
streamlit_doubutsushogi-0.0.21-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / streamlit-doubutsushogi-0.0.21.tar.gz

Download URL streamlit-doubutsushogi-0.0.21.tar.gz
Size 717.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a762a2707147ec0c903946c0dba2d2710abaa9f943fe26b73abbf2191e16ea6f
BLAKE2b-256 checksum
How to use checksums
b60c1f5e24314d5ca6a70b9aae771c861ab610b649c496c8a9463bd59c016c03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / streamlit_doubutsushogi-0.0.21-py3-none-any.whl

Download URL streamlit_doubutsushogi-0.0.21-py3-none-any.whl
Size 722.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c309fb00be5918f4879204ca403004b083163e77e29e82c7c344551b4215787
BLAKE2b-256 checksum
How to use checksums
81be19b234c146ae139dfd561f95e0f911bd476bd5f7597cabad5bb6e506f770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.0.21 This release

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 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