{"id":29104443,"url":"https://github.com/ks6088ts-labs/template-streamlit","last_synced_at":"2026-04-29T14:01:59.404Z","repository":{"id":295745573,"uuid":"991097690","full_name":"ks6088ts-labs/template-streamlit","owner":"ks6088ts-labs","description":"This is a template repository for Streamlit","archived":false,"fork":false,"pushed_at":"2025-06-23T06:20:47.000Z","size":1159,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T07:19:43.829Z","etag":null,"topics":["azure-openai","streamlit"],"latest_commit_sha":null,"homepage":"https://ks6088ts-labs.github.io/template-streamlit/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ks6088ts-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-27T05:58:41.000Z","updated_at":"2025-06-23T06:19:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc2e356f-6877-4fdd-8598-8ae71b398b91","html_url":"https://github.com/ks6088ts-labs/template-streamlit","commit_stats":null,"previous_names":["ks6088ts-labs/template-streamlit"],"tags_count":7,"template":true,"template_full_name":"ks6088ts/template-python","purl":"pkg:github/ks6088ts-labs/template-streamlit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ks6088ts-labs%2Ftemplate-streamlit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ks6088ts-labs%2Ftemplate-streamlit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ks6088ts-labs%2Ftemplate-streamlit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ks6088ts-labs%2Ftemplate-streamlit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ks6088ts-labs","download_url":"https://codeload.github.com/ks6088ts-labs/template-streamlit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ks6088ts-labs%2Ftemplate-streamlit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262514201,"owners_count":23322697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-openai","streamlit"],"created_at":"2025-06-29T00:05:21.357Z","updated_at":"2026-04-29T14:01:54.370Z","avatar_url":"https://github.com/ks6088ts-labs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![test](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/test.yaml?query=branch%3Amain)\n[![docker](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/docker.yaml/badge.svg?branch=main)](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/docker.yaml?query=branch%3Amain)\n[![docker-release](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/docker-release.yaml/badge.svg)](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/docker-release.yaml)\n[![ghcr-release](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/ghcr-release.yaml/badge.svg)](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/ghcr-release.yaml)\n[![docs](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/github-pages.yaml/badge.svg)](https://github.com/ks6088ts-labs/template-streamlit/actions/workflows/github-pages.yaml)\n\n\u003c!-- Docker Hub URL and icon --\u003e\n\n[![Docker Hub](https://img.shields.io/docker/v/ks6088ts/template-streamlit?sort=semver)](https://hub.docker.com/r/ks6088ts/template-streamlit)\n[![Docker Pulls](https://img.shields.io/docker/pulls/ks6088ts/template-streamlit)](https://hub.docker.com/r/ks6088ts/template-streamlit)\n[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/ks6088ts/template-streamlit/latest)](https://hub.docker.com/r/ks6088ts/template-streamlit)\n\n# template-streamlit\n\n## 概要 (Overview)\n\n`template-streamlit`は、[Streamlit](https://streamlit.io/)アプリケーションの開発に必要な基本構造とツールを提供するテンプレートリポジトリです。このテンプレートを使用することで、AI 機能を持つ Web アプリケーションを迅速に開発・デプロイすることができます。\n\nThis template repository provides the basic structure and tools needed for developing [Streamlit](https://streamlit.io/) applications. By using this template, you can quickly develop and deploy web applications with AI capabilities.\n\n## 特徴と利点 (Features and Benefits)\n\n### 主な特徴 (Key Features)\n\n- **Streamlit フレームワーク**: インタラクティブな Web アプリケーションを短時間で構築\n- **LangChain サポート**: AI モデル（Azure OpenAI、Ollama）との連携機能\n- **Docker サポート**: コンテナベースの開発・デプロイが可能\n- **テキスト分割プレイグラウンド**: 異なるテキスト分割方法の視覚化\n- **環境変数管理**: API キーなどの機密情報を安全に管理\n- **MkDocs 統合**: プロジェクトドキュメントの自動生成\n\n### 利点 (Benefits)\n\n- **開発時間の短縮**: 必要なコンポーネントが事前構成済み\n- **Makefile による標準化**: 一貫した開発ワークフロー\n- **コンテナ対応**: 環境依存性の問題を削減\n- **モジュール構造**: 拡張や機能追加が容易\n- **CI パイプライン**: ビルドとテスト自動化の設定済み\n\n## 前提条件 (Prerequisites)\n\n- [Python 3.10+](https://www.python.org/downloads/)\n- [uv](https://docs.astral.sh/uv/getting-started/installation/)\n- [GNU Make](https://www.gnu.org/software/make/)\n- Docker（Docker を使用する場合）\n\n## 開発手順 (Development Instructions)\n\n当プロジェクトは`Makefile`を中心とした開発ワークフローを採用しています。主な操作はすべて Make コマンドから実行できます。\n\n### ヘルプ表示 (View Help)\n\n`Makefile`で定義されているすべてのコマンドを表示するには：\n\n```shell\nmake\n# または\nmake help\n```\n\n### ローカル開発 (Local Development)\n\n#### 依存関係のインストール (Install Dependencies)\n\n```shell\n# 開発用依存関係をインストール\nmake install-deps-dev\n\n# 本番用依存関係のみをインストール\nmake install-deps\n```\n\n#### コードフォーマットとリント (Code Formatting and Linting)\n\n```shell\n# コードフォーマットを適用\nmake format\n\n# 自動修正を適用\nmake fix\n\n# リントチェック\nmake lint\n```\n\n#### テスト実行 (Run Tests)\n\n```shell\n# テストを実行\nmake test\n\n# CIテストを実行（フォーマットチェック、リント、テスト）\nmake ci-test\n```\n\n#### Streamlit アプリの実行 (Run Streamlit App)\n\n```shell\n# Streamlitアプリを起動（ポート8000）\nmake streamlit\n```\n\n実行後、ブラウザで http://localhost:8000 を開くと Streamlit アプリケーションにアクセスできます。\n\n#### その他の開発ツール (Other Development Tools)\n\n```shell\n# JupyterLabを起動\nmake jupyterlab\n\n# ドキュメントをローカルで表示\nmake docs-serve\n```\n\n### Docker 開発 (Docker Development)\n\nDocker を使用して開発環境を構築することもできます。\n\n```shell\n# Dockerイメージをビルド\nmake docker-build\n\n# Dockerコンテナを実行\nmake docker-run\n\n# DockerでCIテストを実行\nmake ci-test-docker\n```\n\n## Docker 使用方法 (Docker Usage)\n\n### 簡単な実行方法 (Quick Start)\n\nDocker を使ってワンライナーでアプリを実行する：\n\n```shell\ndocker run --rm -p 8000:8000 ks6088ts/template-streamlit:latest streamlit run main.py --server.port 8000 --server.address 0.0.0.0\n```\n\n### 環境変数の設定 (Environment Variables)\n\n環境変数を使用する場合（例：Azure OpenAI API キー）：\n\n```shell\n# .envファイルをコンテナにマウント\ndocker run --rm \\\n  -v $(pwd)/.env:/app/.env \\\n  -p 8000:8000 \\\n  ks6088ts/template-streamlit:latest\n```\n\n`.env`ファイルの例（`.env.template`をコピーして作成）：\n\n```\nAZURE_OPENAI_API_KEY=your_api_key\nAZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/\nAZURE_OPENAI_API_VERSION=2023-07-01-preview\nAZURE_OPENAI_GPT_MODEL=your-gpt-deployment\n```\n\n### ポート設定 (Port Configuration)\n\nデフォルトでポート 8000 を使用しますが、ホスト側のポートは変更可能です：\n\n```shell\n# ホスト側ポート3000をコンテナの8000にマッピング\ndocker run --rm \\\n  -p 3000:8000 \\\n  ks6088ts/template-streamlit:latest\n```\n\nこの場合、ブラウザで http://localhost:3000 にアクセスします。\n\n### トラブルシューティング (Troubleshooting)\n\n- **コンテナが起動しない場合**: ポートが既に使用されていないか確認してください\n- **環境変数が読み込まれない場合**: `.env`ファイルのパスが正しいか確認してください\n- **API エラー**: `.env`ファイル内の API キーや設定を確認してください\n\n## デプロイ手順 (Deployment Instructions)\n\n### Docker Hub\n\nDocker Hub にイメージを公開するには、[アクセストークンを作成](https://app.docker.com/settings/personal-access-tokens/create)し、リポジトリの設定に以下のシークレットを設定する必要があります。\n\n```shell\ngh secret set DOCKERHUB_USERNAME --body $DOCKERHUB_USERNAME\ngh secret set DOCKERHUB_TOKEN --body $DOCKERHUB_TOKEN\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fks6088ts-labs%2Ftemplate-streamlit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fks6088ts-labs%2Ftemplate-streamlit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fks6088ts-labs%2Ftemplate-streamlit/lists"}