This is a Python CLI app designed to facilitate learning how to configure Python CLI applications.
Project description
Hello CLI
This is a Python CLI app designed to facilitate learning how to configure Python CLI applications.
세팅하기
먼저 Poetry로 프로젝트를 시작한다.
poetry add paikwiki-hello-cli
paikwiki_hello_cli/main.py
파일을 생성하고, 아래처럼 입력한다.
# main.py
def run():
print("Hello, World!")
if __name__ == "__main__":
run()
pyproject.toml
에 아래의 설정을 추가한다.
[tool.poetry.scripts]
hello = "paikwiki_hello_cli.main:run"
터미널에서 가상환경을 시작한다.
$ poetry shell
Spawning shell within /Users/{USER_NAME}/Library/Caches/pypoetry/virtualenvs/paikwiki-hello-cli-{HASH}-py3.123.12
$ emulate bash -c '. /Users/{USER_NAME}/Library/Caches/pypoetry/virtualenvs/paikwiki-hello-cli-{HASH}-py3.12
3.12/bin/activate'
(hello-cli-py3.12) $
아래 명령어로 paikwiki-hello-cli
를 설치한다.
poetry install
실행이 잘 되는지 테스트한다.
(paikwiki-hello-cli-py3.12) $ hello
Hello, World!
Deploy
PyPi API 토큰을 설정한다.
poetry config pypi-token.pypi {API_TOKEN}
패키지를 빌드한다.
$ poetry build
Building paikwiki-hello-cli (0.0.1)
- Building sdist
- Built paikwiki_hello_cli-0.0.1.tar.gz
- Building wheel
- Built paikwiki_hello_cli-0.0.1-py3-none-any.whl
패키지를 배포한다.
$ poetry publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file paikwiki_hello_cli-0.0.1.tar.gz
.
File metadata
- Download URL: paikwiki_hello_cli-0.0.1.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55ba0b09284478571af2a22cae53cae781a81088429302458cfb9a5bf8dc4a80 |
|
MD5 | 401c719f6e66c13db2d43cd3b6a5190d |
|
BLAKE2b-256 | 53ccd35ab1d0173d8ba4d3d5a0160b35fe37a3bcbc7df4db71b26a157df3343c |
File details
Details for the file paikwiki_hello_cli-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: paikwiki_hello_cli-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cf46fa9fb6f94d0d74c09309a9af93ae8ef47f5a45b6f968260e6aa869ad5b2 |
|
MD5 | 3725b5af27d5ee030eb01e760c129cc9 |
|
BLAKE2b-256 | c8af8182cba37c4d2afd95fb0ad00d10c8752025c2e3b5da701472e3845f333d |