china_cities
Introduction
china_cities is a python package to list Chinese cities and provinces. The cities
can be retrieved in English or Chinese language.
The data is based on wikipedia as a source
Installation
Install with pip
Run pip install china-cities
Install from source
git clone https://github.com/boeboe/china-cities.git
Run python setup.py install
Run tests
Run make tests
Update source when wikipedia changed
Run make generate
Usage
Some examples on how to use this package.
from china_cities import *
for city in cities.get_cities():
print("english name:", city.name_en)
print("chinese name:", city.name_cn)
print("province: ", city.province)
for city_en in cities.get_cities_en():
print(city_en)
for city_cn in cities.get_cities_cn():
print(city_cn)
for province in cities.get_provinces():
print(province)
for province_city in cities.get_cities_by_province("Anhui"):
print(province_city.name_en)
Release files for china-cities 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| china_cities-0.0.4.tar.gz | 11.4 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| china_cities-0.0.4-py3.10.egg | Legacy Egg format | - | - | Details |
| china_cities-0.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 33.4 kB
Release files / china_cities-0.0.4.tar.gz
| Download URL | china_cities-0.0.4.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
883106b61561ad76859e618ca2151f1f1003ab35d5541bbf71dddafd17e2b552
|
|
BLAKE2b-256 checksum How to use checksums |
5c42e17e6e3eb706205d56928ee60ab83416f3d583742e99229c0226e03eff17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.28.2 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.15 CPython/3.10.6
|
Release files / china_cities-0.0.4-py3.10.egg
| Download URL | china_cities-0.0.4-py3.10.egg |
|---|---|
| Size | 11.4 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
18fbc9e45402364807ea5056684c754a43cc9421d13d17aeefa631516b4e72b2
|
|
BLAKE2b-256 checksum How to use checksums |
350d70a47e32cf99b80d7fe41225407c0738004ce5abfe64b98d983934570180
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.28.2 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.15 CPython/3.10.6
|
Release files / china_cities-0.0.4-py2.py3-none-any.whl
| Download URL | china_cities-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1694765b617f8d1ca9bc00d43232242e0a0349eee3b67e941ba5af2c182131c0
|
|
BLAKE2b-256 checksum How to use checksums |
be3ce1d30e0d916086bcfe78c47e57ffe5b0f842f3e00c32a00654bdfaa28d2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.28.2 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.15 CPython/3.10.6
|