File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,20 @@ be thrown. If the file is invalid or there is a bug in the reader, a
251251problem. If an IP address is not in the database, a ``AddressNotFoundError ``
252252exception will be thrown.
253253
254+ Values to use for Database or Dictionary Keys
255+ ---------------------------------------------
256+
257+ **We strongly discourage your from using a value from any `names` accessor as
258+ a key in a database or dicts. **
259+
260+ These names may change between releases. Instead we recommend using one of the
261+ following:
262+
263+ * ``geoip2.records.City `` - ``city.geoname_id ``
264+ * ``geoip2.records.Continent `` - ``continent.code `` or ``continent.geoname_id ``
265+ * ``geoip2.records.Country `` and ``geoip2.records.RepresentedCountry `` - ``country.iso_code `` or ``country.geoname_id ``
266+ * ``geoip2.records.subdivision `` - ``subdivision.iso_code `` or ``subdivision.geoname_id ``
267+
254268What data is returned?
255269----------------------
256270
You can’t perform that action at this time.
0 commit comments