Skip to content
This repository was archived by the owner on Apr 10, 2018. It is now read-only.

Conversation

@tiwilliam
Copy link
Contributor

>>> gi = pygeoip.GeoIP('/path/to/GeoIPNetSpeed.dat')
>>> gi.netspeed_by_name('google.com')
'Corporate'
>>> gi.id_by_name('google.com')
3
>>> gi.netspeed_by_name('defunct.cc')
'Cable'

tiwilliam added a commit that referenced this pull request Nov 16, 2013
Add support for MaxMind Netspeed
@tiwilliam tiwilliam merged commit 0771abc into master Nov 16, 2013
@oschwald
Copy link
Contributor

Do you support both Netspeed and NetspeedCell? They are unfortunately separate formats. The latter is the newer format and is more similar to the Org/ISP databases.

I noticed that some of your test databases are quite old (and large). There are some small unit test databases in the Java repo that you are free to use:

https://github.com/maxmind/geoip-api-java/tree/master/src/test/resources/GeoIP

If anything is missing from them, please let me know. The GeoIP-178 CSV corresponds to the NetspeedCell binary.

@tiwilliam
Copy link
Contributor Author

This implementation was just for the first revision of Netspeed. I got really strange negative offsets when trying my Netspeed revision 1 database. I will try again with the Java databases, I got most of my databases from support@maxmind.com +1 year ago, a refresh would be nice. Thanks for your feedback!

@oschwald
Copy link
Contributor

I haven't looked at the pygeoip code closely, but due to the format differences, you will likely need to use name_by_addr for the rev1 Netspeed databases instead of id_by_addr. This might be what is causing the offset errors.

Thanks for all of your work on the module!

@oschwald
Copy link
Contributor

@tiwilliam, Would you be ok in licensing your unit tests under the LGPL 2.1 for use in the GeoIP extension? I ported them over to the extension before realizing that pygeoip is under the LGPL 3, not 2.1. From what I can tell, you are the sole author of the unit tests, but I could be mistaken. If not, I can rewrite them from scratch.

@oschwald
Copy link
Contributor

Never mind, I see the tests were based off an earlier test file that was present when the repo was created. I'll just rewrite them.

@tiwilliam
Copy link
Contributor Author

I guess me and @jennifere together own them, I can agree to change the license but we need @jennifere's voice on this.

@oschwald
Copy link
Contributor

I ended up rewriting the tests from scratch rather than using the pygeoip one. Thanks though!

@tiwilliam tiwilliam deleted the netspeed branch February 5, 2014 10:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants