从两个或三个字母的国家代码到短名称的地图
shortcountrynames的Python项目详细描述
“做一件事,做好一件事”-这个包裹有助于翻两三个字母 编码成简短的英文名称。
shortcountrynames
由robert gieseke维护(robert.gieseke@pik-potsdam.de)。
数据包
Data Package,一个简单的 CSV file,有两个和三个字母的国家 基于country-codes数据包和 更改和添加短名称的选择。
python模块
使用安装
pip install shortcountrynames
用法
fromshortcountrynamesimportto_nameassertto_name("DE")=="Germany"assertto_name("DEU")=="Germany"
javascript模块
使用安装
npm install shortcountrynames
用法
varshortcountrynames=require("shortcountrynames")// Define custom codesshortcountrynames.names["TEST"]='test'console.log(shortcountrynames.to_name("DEU"))// Germanyconsole.log(shortcountrynames.to_name("TEST"))// test
注释
非标准代码:
EU
,EUU
-欧盟
XK
,XKX
-科索沃
许可证
cc0