Skip to main content

🧅 洋蔥 (Onion)

一個有趣又實用的 Python 套件,收錄洋蔥的各種名言與趣味功能!

安裝

pip install oniondctw

功能介紹

1. 🧅 hello(name) - 洋蔥問候

讓洋蔥向指定的人打招呼!

from onion import hello

print(hello("世界"))  # 🧅 洋蔥向 世界 問好!
print(hello("小明"))  # 🧅 洋蔥向 小明 問好!

2. 🧅💧 onionify(text) - 洋蔥風格裝飾

用洋蔥的專屬風格包裝你的文字!

from onion import onionify

print(onionify("哈囉"))        # 🧅💧 哈囉 💧🧅
print(onionify("今天天氣真好"))  # 🧅💧 今天天氣真好 💧🧅

3. 🧅 onion_quote() - 洋蔥語錄

隨機顯示一句洋蔥本人說過的話!收錄洋蔥的經典語錄,每次呼叫都有不同的驚喜。

from onion import onion_quote

onion_quote()  # 隨機顯示一句洋蔥語錄
# 範例輸出:
# 因為只有你是男娘
# 洋蔥女裝
# 太棒了不要跟他們同流合污
# ... 等等

4. 🧅 onion_wall(count) - 洋蔥名言牆

一次顯示多條洋蔥語錄,用精美的格式排版!讓你被洋蔥的智慧包圍。

from onion import onion_wall

# 顯示 5 條語錄(預設值)
onion_wall()

# 自訂顯示數量
onion_wall(3)  # 顯示 3 條語錄
onion_wall(10) # 顯示全部 10 條語錄

# 範例輸出:
# ==================================================
#                   🧅 洋蔥名言牆 🧅
# ==================================================
# 
# 📌 名言 1:
#    洋蔥女裝
# 
# 📌 名言 2:
#    太棒了不要跟他們同流合污
# ...
# ==================================================
#              ✨ 共展示了 5 條洋蔥的智慧結晶 ✨
# ==================================================

5. 🧅 summon_onion() - 召喚洋蔥

顯示華麗的洋蔥 ASCII Art 女裝照!

from onion import summon_onion

# 召喚洋蔥
summon_onion()
# 會顯示一個精美的 ASCII Art 圖案

6. 📦 version - 版本資訊

查看目前套件的版本資訊。

from onion import version, show_info
from onion.utils import show_info

print(version)  # 1.0.0
show_info()     # 顯示完整資訊

完整範例

from onion import hello, onionify, onion_quote, onion_wall, summon_onion

# 問候
print(hello("Python"))

# 裝飾文字
message = onionify("洋蔥套件真好用!")
print(message)

# 獲得洋蔥的智慧
onion_quote()

# 展示洋蔥名言牆
onion_wall(3)

# 召喚洋蔥
summon_onion()

系統需求

  • Python >= 3.9
  • requests

作者

作者:YiChen、HCL_2025

授權

本專案採用 CC BY-NC 4.0 授權條款。

License: CC BY-NC 4.0

這意味著您可以自由分享和修改本作品,但僅限於非商業用途,且需標註原作者。


🧅 把洋蔥帶進你的程式碼裡!

Metadata

Release files for oniondctw 1.6.0

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

Source distribution (sdist)

Source distribution for oniondctw 1.6.0
File Size Uploaded
oniondctw-1.6.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oniondctw 1.6.0
File Interpreter ABI Platform
oniondctw-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / oniondctw-1.6.0.tar.gz

Download URL oniondctw-1.6.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6192c96a32981a200d046fc8d2ae18c5eaeacc237585ab35d934f3780e73822d
BLAKE2b-256 checksum
How to use checksums
fd859224d462b6935bb01cec0f04525b6bb1ab756ee74747798df25857cf09ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / oniondctw-1.6.0-py3-none-any.whl

Download URL oniondctw-1.6.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00da265eb9871d40db86f3136d5ce0503ad36e36c660efedbf3b610f24f33bc4
BLAKE2b-256 checksum
How to use checksums
0b365d57e63613f79d2251ddeda9ad2c8f48966b4782916f701b2f1b581c77b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files

1.5.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