Skip to main content

Japanese prefecture names and JIS X 0401 codes converter.

Project description

jp-prefectures-simple

Japanese prefecture names and JIS X 0401 codes converter.

This package has no external dependencies.

Installation

pip install jp-prefectures-simple

Usage

Python API

You can import functions directly from the package:

from jp_prefectures_simple import name2code, code2name

# Convert name to code
code = name2code("東京都")
print(code)  # "13"

# Convert code to name
name = code2name(13)
print(name)  # "東京都"

name = code2name("13")
print(name)  # "東京都"

# Convert list of names to codes
codes = name2code(["北海道", "東京都"])
print(codes)  # ["01", "13"]

# Convert list of codes to names
names = code2name([1, "13"])
print(names)  # ["北海道", "東京都"]

Project details


Download files

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

Source Distribution

jp_prefectures_simple-0.2.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

jp_prefectures_simple-0.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file jp_prefectures_simple-0.2.0.tar.gz.

File metadata

  • Download URL: jp_prefectures_simple-0.2.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for jp_prefectures_simple-0.2.0.tar.gz
Algorithm Hash digest
SHA256 031b46632374a7f40929ab1ce159269af2c9043f4549068214f7f76eb2fd61c0
MD5 0619fe8064bef1fae0dffde6a028a8d7
BLAKE2b-256 cfb978ab6ab0b63b7bf3deed31e7670c28b6878fa6b74c6e6f3097fbf3a6f42c

See more details on using hashes here.

File details

Details for the file jp_prefectures_simple-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jp_prefectures_simple-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca93664cdd7f92e7b030820311bb723e2d3e292bc14bb31a7b048b4a1a5cdb44
MD5 e16558e9d4f861bcc2ca6f7953da83c7
BLAKE2b-256 c23c62e5490303bc573ceaa89b0be488c65ad9ec9d9c36fac4fba0c67924668d

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