geodb-rs 0.1.2__pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
geodb_rs/__init__.py
ADDED
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: geodb-rs
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Classifier: Programming Language :: Python
|
|
5
|
+
Classifier: Programming Language :: Python :: 3
|
|
6
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
7
|
+
Classifier: Programming Language :: Rust
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Summary: Python bindings for geodb-core
|
|
10
|
+
Home-Page: https://github.com/holg/geodb-rs
|
|
11
|
+
Author: Holger Trahe
|
|
12
|
+
License: MIT
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
15
|
+
|
|
16
|
+
# geodb-py
|
|
17
|
+
|
|
18
|
+
Python bindings for the [`geodb-rs`](https://github.com/holg/geodb-rs) project.
|
|
19
|
+
|
|
20
|
+
For full documentation, examples, and details about the underlying Rust library,
|
|
21
|
+
please see the main project README:
|
|
22
|
+
|
|
23
|
+
- Project repository: https://github.com/holg/geodb-rs
|
|
24
|
+
- Main README: https://github.com/holg/geodb-rs/blob/main/README.md
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
# Load the database
|
|
30
|
+
import geodb_py
|
|
31
|
+
db = geodb.PyGeoDb.load_default()
|
|
32
|
+
|
|
33
|
+
# Find a country by ISO2 code
|
|
34
|
+
country = db.find_country_by_iso2("US")
|
|
35
|
+
if country:
|
|
36
|
+
print(f"Country: {country['name']}")
|
|
37
|
+
print(f"Capital: {country['capital']}")
|
|
38
|
+
print(f"Phone Code: {country['phone_code']}")
|
|
39
|
+
print(f"Currency: {country['currency']}")
|
|
40
|
+
|
|
41
|
+
# Search countries by phone code
|
|
42
|
+
countries = db.find_countries_by_phone_code("+1")
|
|
43
|
+
for country in countries:
|
|
44
|
+
print(f"{country['name']} uses phone code +1")
|
|
45
|
+
```
|
|
46
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
geodb_rs-0.1.2.dist-info/METADATA,sha256=LazuafiBmi36BaslhV2nO8KRDKrbHVIra2aYOZg572M,1328
|
|
2
|
+
geodb_rs-0.1.2.dist-info/WHEEL,sha256=r3SCMgLnMUlKuwlsK_XptXMr7_5YUfmNJvBKuCcmPP8,159
|
|
3
|
+
geodb_rs/__init__.py,sha256=Aot-J6O9j3BaJz5G2EbiOWPa7x6HPTZbQZn_Ts0O8G0,115
|
|
4
|
+
geodb_rs/geodb_rs.pypy37-pp73-aarch64-linux-gnu.so,sha256=wb2j-dvWOWyxYiszLZM6n00zRIzVM0a-3Jm1J4GC3Y0,807888
|
|
5
|
+
geodb_rs_data/countries+states+cities.json.gz,sha256=oVZWEApZ0fZOsTtSNKViSggpEFg9WUYruZ4k6xKsG-E,3495015
|
|
6
|
+
geodb_rs-0.1.2.dist-info/RECORD,,
|
|
Binary file
|