Simple utilitiy convert name of japanese prefectures
Project description
jp_prefecture.
Japan prefecture names and codes
Simple utility to convert the name of japanese prefectures.
- full_name from/to code (JIS X 0401-1973).
- short_name to full_name
- alphabet_name from/to full_name
Reference
Install
pip install jp_prefecture
How to use
from jp_prefecture import jp_prefectures as jp
Conversion
assert ( jp.name2code("京都府")
== jp.name2code("京都")
== jp.name2code("Kyoto")
== jp.name2code("KYOTO")
== jp.name2code("kyoto")
== 26 )
assert jp.code2name(26) == "京都府"
assert jp.code2alphabet(26) == "Kyoto"
assert ( jp.name2code("京都府")
== jp.name2code("京都")
== "Kyoto" )
assert ( jp.alphabet2name("Kyoto")
== jp.name2code("KYOTO")
== jp.name2code("kyoto")
== "京都府" )
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jp_prefecture-0.1.3.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for jp_prefecture-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db4764db1437ef5d766dea195d2c5fa52a5f20da452ab99dad1c44d01501d303 |
|
MD5 | 50c0807c9489795d0b838a9c67b54666 |
|
BLAKE2b-256 | 3f1f5dfa964b242ee955a12f968d40dd57c1df7610f9172d3fa8a318187d4246 |