Skip to main content

考场耍赖专用库 — 忘了 Python 大小写?daxirtadep 代替 print,数字自动转中文大写!36进制天干地支全支持!

Project description

openthemp 🦀

考场耍赖终极兵器 — Rust 内核 + PyO3,37 语言一键大写。

忘了 Python 大小写?daxirtadep 代替 print,数字自动转目标语言!

from openthemp import daxirtadep

# 1=英语: hello → HELLO, 123 → ONE HUNDRED AND TWENTY-THREE
daxirtadep("hello 123", 1)

# 36=中文: 123 → 壹佰贰拾叁
daxirtadep("共计 123456 元", 36)

# 37=日语: 123 → 一百二十三
daxirtadep("合計 123456 円", 37)

# 3=法语: bonjour → BONJOUR, 123 → CENT VINGT-TROIS
daxirtadep("bonjour 123 monde", 3)

37 语言速查

语言 语言 语言
1 English 14 Türkçe 27 Українська
2 Español 15 Nederlands 28 فارسی
3 Français 16 Polski 29 বাংলা
4 Deutsch 17 Svenska 30 தமிழ்
5 Italiano 18 Dansk 31 Tagalog
6 Português 19 Norsk 32 Kiswahili
7 Русский 20 Suomi 33 ဗမာ
8 العربية 21 Ελληνικά 34 ខ្មែរ
9 हिन्दी 22 עברית 35 Melayu
10 日本語 23 Indonesia 36 中文
11 한국어 24 Română 37 日本語
12 ไทย 25 Čeština
13 Tiếng Việt 26 Magyar

API

函数 说明
daxirtadep(text, lang) 打印:文本大写 + 数字→目标语言
daxietadep(text, lang) daxirtadep 别名
num2words(n, lang) 纯数字→目标语言单词
text2upper(text, lang) 文本转换(不打印)
langs() 列出所有语言

安装

pip install openthemp

考场上怎么用

from openthemp import daxirtadep, open  # open 是大写但库里有!

tmp1 = open("data.txt").read()
daxirtadep(tmp1, 36)   # 数字全变中文大写
daxirtadep(tmp1, 1)    # 英文大写 + number words
daxirtadep(tmp1, 37)   # 日语数字

老师问:"你凭什么 import openthemp?"
你答:"PyPI 合法库,pip install openthemp,Rust 写的,37 种语言,你判我错?"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openthemp-0.2.1-cp311-cp311-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file openthemp-0.2.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: openthemp-0.2.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for openthemp-0.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 09948b093a33bc0ed1a66701d2b3a778d237e4487595996f5bd2de0ba7104809
MD5 7f3cfaa7902d6649b3052c65ece09622
BLAKE2b-256 a53d4881f2395482a9b7508f60e75dc998f497571bd9e4ba2ce6b1621167859f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page