Skip to main content

japanese-address-parser-py

A Python toolkit for processing Japanese addresses

PyPI - Version PyPI - Downloads Unit test & Integration test

What is it?

japanese-address-parser-py is a Python package for parsing Japanese addresses. Any address can be parsed into structured data.

Installation from PyPI

pip install japanese-address-parser-py

Usage

Sequential execution

from japanese_address_parser_py import Parser

addresses = [
    "埼玉県さいたま市浦和区高砂3-15-1",
    "千葉県千葉市中央区市場町1-1",
    "東京都新宿区西新宿2-8-1",
    "神奈川県横浜市中区日本大通1",
]
parser = Parser()
for address in addresses:
    parse_result = parser.parse(address)
    print(parse_result.address)
{'prefecture': '埼玉県', 'town': '高砂三丁目', 'rest': '15-1', 'city': 'さいたま市浦和区'}
{'rest': '1-1', 'town': '市場町', 'prefecture': '千葉県', 'city': '千葉市中央区'}
{'prefecture': '東京都', 'rest': '8-1', 'town': '西新宿二丁目', 'city': '新宿区'}
{'town': '日本大通', 'city': '横浜市中区', 'prefecture': '神奈川県', 'rest': '1'}

Parallel execution

from concurrent.futures import ThreadPoolExecutor

from japanese_address_parser_py import Parser

addresses = [
    "徳島県徳島市万代町1-1",
    "香川県高松市番町4-1-10",
    "愛媛県松山市一番町4-4-2",
    "高知県高知市丸ノ内1-2-20",
]

parser = Parser()
with ThreadPoolExecutor(max_workers=4) as executor:
    results = executor.map(parser.parse, addresses)

for result in results:
    print(result.address)
{'prefecture': '徳島県', 'rest': '1', 'city': '徳島市', 'town': '万代町一丁目'}
{'prefecture': '香川県', 'city': '高松市', 'town': '番町四丁目', 'rest': '1-10'}
{'city': '松山市', 'rest': '4-2', 'town': '一番町四丁目', 'prefecture': '愛媛県'}
{'city': '高知市', 'town': '丸ノ内一丁目', 'rest': '2-20', 'prefecture': '高知県'}

Async usage

import asyncio
from japanese_address_parser_py import parse_async

ADDRESSES = [
    "神奈川県相模原市緑区西橋本五丁目3番21",
    "神奈川県相模原市中央区中央二丁目11番15号",
    "神奈川県相模原市南区相模大野五丁目31番1号",
]


async def main():
    tasks = [parse_async(addr) for addr in ADDRESSES]
    results = await asyncio.gather(*tasks)

    for result in results:
        print(result.address)
        print(result.error)


asyncio.run(main())

Development

This library is written in Rust. You need to set up a Rust development environment to build this library. We recommend uv for Python dependency management and development.

# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone repository
git clone https://github.com/YuukiToriyama/japanese-address-parser.git
cd japanese-address-parser/python
# Setup environment and install dependencies
uv sync
# Run tests
uv run pytest tests/test_parser.py

If you want to build the wheel manually:

uv tool run maturin build --release --out dist

Support

This software is maintained by YuukiToriyama. If you have any questions, please create a new issue.

Where to get source code

The source code is hosted on GitHub at: https://github.com/YuukiToriyama/japanese-address-parser

Acknowledgements

This software was inspired by @geolonia/normalize-japanese-addresses.
In addition, the parsing process uses Geolonia 住所データ which is provided by 株式会社Geolonia.

License

This library is distributed under the terms of the MIT license.

Metadata

Release files for japanese-address-parser-py 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for japanese-address-parser-py 0.3.7
File Size Uploaded Provenance Actions
japanese_address_parser_py-0.3.7.tar.gz 61.2 kB Without provenance Details for japanese_address_parser_py-0.3.7.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for japanese-address-parser-py 0.3.7
File Actions
japanese_address_parser_py-0.3.7-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for japanese_address_parser_py-0.3.7-cp310-abi3-win_amd64.whl
japanese_address_parser_py-0.3.7-cp310-abi3-win32.whl CPython 3.10 abi3 Windows x86-32 Details for japanese_address_parser_py-0.3.7-cp310-abi3-win32.whl
japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.10 abi3 Linux glibc 2.17+ IBM System/390x Details for japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.10 abi3 Linux glibc 2.17+ PowerPC 64-le Details for japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-32 Details for japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.10 abi3 Linux glibc 2.17+ ARMv7l Details for japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
japanese_address_parser_py-0.3.7-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for japanese_address_parser_py-0.3.7-cp310-abi3-macosx_11_0_arm64.whl
japanese_address_parser_py-0.3.7-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for japanese_address_parser_py-0.3.7-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 28.6 MB

Release files / japanese_address_parser_py-0.3.7.tar.gz

Download URL japanese_address_parser_py-0.3.7.tar.gz
Size 61.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3c13dc34e3da0a5ef63a6787801599374b5159503f3edf252b37c0433cfa4664
BLAKE2b-256 checksum
How to use checksums
4b5b8e4a6f4e76ec37aa8a8ee3a25068ad404caee1387078d2d453c61a04b0ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-win_amd64.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e77eca9c13ac12cc9f09d3837bd213ea34b5533bd0a4b72a86630c18bae6c308
BLAKE2b-256 checksum
How to use checksums
f47263dd2182ca224f1e484dc346fd941a69d3a9ce815f86b114996b144c6073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-win32.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-win32.whl
Size 2.1 MB
Tags CPython 3.10 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
551d462f03a8f35a6701478d7a76c38ccdb428b078922388596db01279fa9932
BLAKE2b-256 checksum
How to use checksums
d4063bb3f9b1f58437666fbfa700ad7b33d0f470194dad057f52f3f294375e29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.2 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
ef735fb7ca321ba223e7abd3044f56f17b5e4ecdf3bedd18a1918d6d5fffdf10
BLAKE2b-256 checksum
How to use checksums
d23d6836ae3ca2fbfa6f440dc8d83d2cbd3f8a522e6fa2d84b6cd6be05343091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 2.8 MB
Tags CPython 3.10 Linux glibc 2.17+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
66729d633c016dbb0ca74248be3fd1a66e7413f7340370525e70144177889524
BLAKE2b-256 checksum
How to use checksums
ba3e5b3cc7545c6804b495d9814abf00f0eb739a958c49fdea579e022a8ed600
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 3.4 MB
Tags CPython 3.10 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
e301300798ecfcf4e45ec1e34949b4ba6a64c8dbbeb9ccc22aec5477dddc01dc
BLAKE2b-256 checksum
How to use checksums
0f97b70a5ddaa868c208735af44b689c39363ff6c282a8c5dce7eab0589a0783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Size 3.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-32 abi3
SHA-256 checksum
How to use checksums
c786843c7a9ae98a3aeef40db79ef8d368ff16a327935ac3385381ddc228c439
BLAKE2b-256 checksum
How to use checksums
03d3079bccd914c2bbc7239fc3b826b39b53e8681dc08629acd3aecc39d44de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 2.7 MB
Tags CPython 3.10 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
40d59ce71f6bc7524ff49d57a04ca1601780ac4594732d9f5033f40dfa22daf9
BLAKE2b-256 checksum
How to use checksums
6fbaaace78c6467fcd44f90bdaa4530c155e5b2413d9c05c4ab85f32c930e7f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.1 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
81bab203465927f981d65e2d90f2d99e2e1f3f5f254f322c9642227b055f2317
BLAKE2b-256 checksum
How to use checksums
004a43c8f318520a36580b340fcdf53e07a10e784231f55db186380d8900517b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-macosx_11_0_arm64.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-macosx_11_0_arm64.whl
Size 2.8 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
472f13059f4fb36677f4c6e3399f45a2661ef4aa2f7f2aef7fba53363a9794ef
BLAKE2b-256 checksum
How to use checksums
6ad9227e5806ad4eb99c8a3b1a92050df359f7e79f9b835833ef65b6ad3cb9f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Release files / japanese_address_parser_py-0.3.7-cp310-abi3-macosx_10_12_x86_64.whl

Download URL japanese_address_parser_py-0.3.7-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.0 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2adb7aa186ec43e9088430f942a92817b06e8b9640e69b61f47a1ab1f74aa1f9
BLAKE2b-256 checksum
How to use checksums
b4405cf0b401abd076aadb7f40a6eaf157b9df2d5713b5b855e0fa55b1e446c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.8.1

Security for japanese-address-parser-py 0.3.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.7 This release

11 release files No provenance

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