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.
Metadata
Release files for chinese-administrative-divisions 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| chinese_administrative_divisions-1.0.tar.gz | 28.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chinese_administrative_divisions-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.9 kB
Release files / chinese_administrative_divisions-1.0.tar.gz
| Download URL | chinese_administrative_divisions-1.0.tar.gz |
|---|---|
| Size | 28.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45a6cafde46f9a1e8e11a999db17e49ddae78164003e97e4898bee6c94a4231d
|
|
BLAKE2b-256 checksum How to use checksums |
394ff34939eb153c98e4564645a6fe612dbf65667fd347a9b94a720404fd2630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.8
|
Release files / chinese_administrative_divisions-1.0-py3-none-any.whl
| Download URL | chinese_administrative_divisions-1.0-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74ddc9aa4d75b598f62cc17158f474d4adb90475a163b8971bdfb5b9d27d4090
|
|
BLAKE2b-256 checksum How to use checksums |
afa8d87c23f39b1773d023e80e0c53ac59b2c39f5ea4306580ce8f6284e3a6fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.8
|
Security for chinese-administrative-divisions 1.0
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.