Skip to content

heiwa4126/hello-python

Repository files navigation

heiwa4126-hello-python

PyPI - Version PyPI - Python Version


Just another useless repository for drill.

Python 練習用の意味のないレポジトリ。実態は cowsay.cow(f"Hello {msg}") だけ。

Installation

pip install heiwa4126-hello-python

Usage

heiwa4126-hello-python
heiwa4126-hello-python Dolly
heiwa4126-hello-python -h
# or
python -m heiwa4126_hello_python
python -m heiwa4126_hello_python "Mr. Monkey"
python -m heiwa4126_hello_python -h
# or
python -c "from heiwa4126_hello_python import hello; hello()"
python -c "from heiwa4126_hello_python import hello; hello('world')"

or

from heiwa4126_hello_python import hello

hello()
hello("goodbye")

開発のしかた

Hatch を使っています。 Installation - Hatch

# プロジェクトをクローンして
git clone https://github.com/heiwa4126/hello-python.git
# ディレクトリに移動して、
cd hello-python
# VSCodeで開く
hatch run code .

で、

hatch run main
hatch run main test
hatch run main -h
## update something...
hatch fmt
hatch test -ac
## 発行
hatch run bump
rm -rf dist && hatch build
hatch publish -r test
hatch publish

Docker

# ビルド
hatch run build-docker
# 実行
hatch run start-docker
## or
docker run heiwa4126-hello-python heiwa4126-hello-python -h

サイズは

$ hatch run list-docker

REPOSITORY               TAG       IMAGE ID       CREATED                  SIZE
heiwa4126-hello-python   0.2.1     4053e33e2384   Less than a second ago   57.9MB
heiwa4126-hello-python   latest    4053e33e2384   Less than a second ago   57.9MB
heiwa4126-hello-python   0.2.0     587873b24a9a   16 minutes ago           130MB

python:3-slim で 130MB、python:3-alpine で 57.9MB。 マルチステージビルドはこのプロジェクトだとサイズがほぼ一緒なので止めました。

About

Just another useless repository for drill

Resources

License

Stars

Watchers

Forks

Packages

No packages published