Socket
Socket
Sign inDemoInstall

streamlit-doubutsushogi

Package Overview
Dependencies
2
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    streamlit-doubutsushogi

A streamlit custom component for doubutsushogi (animal chess) game


Maintainers
1

Readme

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

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc