Skip to main content

gum gum pistol

Minimal example to create a pypi package using poetry

image (Screen cap from https://onepiece.fandom.com/wiki/Gomu_Gomu_no_Mi/Techniques)

Pypi: https://pypi.org/project/ray-chunkit-chung-gum-gum-pistol/

Github: https://github.com/ray-chunkit-chung/essential-poetry

How to use

Install gum-gum-pistol

pip install ray-chunkit-chung-gum-gum-pistol

This gum-gum-pistol has two functions

gum load
gum shoot

That's it!

Use typer to create gum-gum-pistol

https://typer.tiangolo.com/tutorial/package/

Step 1 Install python

python -m venv .venv
# .venv\Scripts\activate
source .venv/bin/activate
python -m pip install --upgrade pip
pip install --upgrade -r requirements.txt

Step 2 Init project and dependencies

poetry new ray-chunkit-chung-gum-gum-pistol
cd ray-chunkit-chung-gum-gum-pistol
poetry add typer[all]
poetry add pytest[all]

Step 3 Define app

Define app path

[tool.poetry.scripts]
gum = "ray_chunkit_chung_gum_gum_pistol.main:app"

Install local for test

poetry install

Test app local

gum --help
gum load
gum shoot

Step 4 Distribute app

Build wheel file

poetry build

Test by changing to a new venv and install from local dist

pip install ray-chunkit-chung-gum-gum-pistol\dist\ray_chunkit_chung_gum_gum_pistol-0.1.0-py3-none-any.whl

Step 5 Upload to pypi

Create PYPI_TOKEN and export to env. Then config pypi-token in poetry. Then publish to pypi

poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build

Test by changing to a new venv and install from pypi

pip install ray-chunkit-chung-gum-gum-pistol
gum --help

Release files for ray-chunkit-chung-gum-gum-pistol 0.1.2

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

Source distribution (sdist)

Source distribution for ray-chunkit-chung-gum-gum-pistol 0.1.2
File Size Uploaded
ray_chunkit_chung_gum_gum_pistol-0.1.2.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ray-chunkit-chung-gum-gum-pistol 0.1.2
File Interpreter ABI Platform
ray_chunkit_chung_gum_gum_pistol-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / ray_chunkit_chung_gum_gum_pistol-0.1.2.tar.gz

Download URL ray_chunkit_chung_gum_gum_pistol-0.1.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
26f6082e5edf89683a0e05913cc502a31825c7b6373f412ac5e4e8d740696415
BLAKE2b-256 checksum
How to use checksums
c8e870679bb388b41cbdf3192559474c550a5f1955a2f777005def278f3a8998
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.11.1 Windows/10

Release files / ray_chunkit_chung_gum_gum_pistol-0.1.2-py3-none-any.whl

Download URL ray_chunkit_chung_gum_gum_pistol-0.1.2-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99b95db357f0865963cce717461e82790ec9ef106cf03e48e7f1330a35d1f12d
BLAKE2b-256 checksum
How to use checksums
3ff9a922c2abe37712588a83d9c3f75ca865533121058707e724748f602aad61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.11.1 Windows/10

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

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