中国行政区划查询包
Project description
Chinese Administrative Divisions
A Python package for querying Chinese administrative divisions.
Description
This package provides a simple way to query Chinese administrative divisions by code or name. It includes data for all provinces, cities, and districts in China.
Installation
You can install this package using pip:
pip install chinese_administrative_divisions
Usage
Query by Code
from chinese_administrative_divisions import get_division_name
Get division name by code
print(get_division_name("110000")) # Output: 北京市
Query by Name
from chinese_administrative_divisions import get_division_code
#Get division code by name
print(get_division_code("上海市")) # Output: 310000
Project Structure
chinese_administrative_divisions/
├── chinese_administrative_divisions/
│ ├── init.py
│ ├── data.py
│ └── query.py
├── setup.py
└── README.md
Contributing
If you want to contribute to this project, please follow these steps:
1.Fork the repository
2.Create a new branch for your feature or bug fix
3.Make your changes
4.Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chinese_administrative_divisions-1.0.tar.gz.
File metadata
- Download URL: chinese_administrative_divisions-1.0.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45a6cafde46f9a1e8e11a999db17e49ddae78164003e97e4898bee6c94a4231d
|
|
| MD5 |
8ebe7756f53b0ac078b72aa329112a7d
|
|
| BLAKE2b-256 |
394ff34939eb153c98e4564645a6fe612dbf65667fd347a9b94a720404fd2630
|
File details
Details for the file chinese_administrative_divisions-1.0-py3-none-any.whl.
File metadata
- Download URL: chinese_administrative_divisions-1.0-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74ddc9aa4d75b598f62cc17158f474d4adb90475a163b8971bdfb5b9d27d4090
|
|
| MD5 |
a9b1d4cd4d072f56a900ec089a86d872
|
|
| BLAKE2b-256 |
afa8d87c23f39b1773d023e80e0c53ac59b2c39f5ea4306580ce8f6284e3a6fa
|