Skip to main content

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 种语言,你判我错?"

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.3-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.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: openthemp-0.2.3-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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ba34984f42a3d417b2ceb948cea986781d88cb8fc936575a3d3e674b6ca8da23
MD5 3528728064f4ab9edc0db5ef6141bab5
BLAKE2b-256 ec79dfbb333810e7db4af9748a88a1a67ca1f917e2e6eef93df2dd05b52fd21f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

1 file

0.2.2

1 file

0.2.1

1 file

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