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.

Usage

from jp_prefectures_simple.prefs 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.1.0.tar.gz (3.5 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.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jp_prefectures_simple-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 4f05dbdf03abbee9a632b8a5a9b1750ecd269b4154c89201860f3a33651c617a
MD5 adddeb95037c510d2bc4a452d70d1572
BLAKE2b-256 e762da462b6038fdff8dc81c1a44634214be5da3bdd8ea42b1b80420c4fddf2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jp_prefectures_simple-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 570ccf389e03bfbb295135c0b438c9941edb05f722782ba36eaa9ea4d0e4a85b
MD5 3e10d639c9a8cae3b1d3bad6e750d475
BLAKE2b-256 88405bdb295aee8e8d4cd1f82c211bf684858021f655bb04b8b231a0cff2493f

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