Skip to content

Commit 763dee1

Browse files
committed
update
1 parent b9d8857 commit 763dee1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: README.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
# ipdb-python
22
IPIP.net officially supported IP database ipdb format parsing library
3+
4+
# Python Parse ipdb file
5+
6+
## Installing
7+
<pre>
8+
<code>pip install ipip-ipdb</code>
9+
</pre>
10+
## Code Example
11+
<pre><code>
12+
import ipdb
13+
14+
db = ipdb.Reader("/path/to/mydatatest.ipdb")
15+
print(db.find("2001:250:200::"))
16+
print(db.find_map("2001:250:200::"))
17+
18+
info = db.find_info("2a06:e881:3800::")
19+
print(info.country_name, info.region_name, info.city_name, info.owner_domain, info.isp_domain, info.latitude, info.longitude, info.timezone, info.utc_offset)
20+
</pre></code>

0 commit comments

Comments
 (0)