/usr/lib/python3/dist-packages/maxminddb-1.2.0.egg-info/PKG-INFO is in python3-maxminddb 1.2.0-1.2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | Metadata-Version: 1.1
Name: maxminddb
Version: 1.2.0
Summary: Python extension for reading the MaxMind DB format
Home-page: http://www.maxmind.com/
Author: UNKNOWN
Author-email: UNKNOWN
License: Apache License, Version 2.0
Description: ========================
MaxMind DB Python Module
========================
Description
-----------
This is a Python module for reading MaxMind DB files. The module includes both
a pure Python reader and an optional C extension.
MaxMind DB is a binary file format that stores data indexed by IP address
subnets (IPv4 or IPv6).
Installation
------------
If you want to use the C extension, you must first install `libmaxminddb
<https://github.com/maxmind/libmaxminddb>`_ C library installed before
installing this extension. If the library is not available, the module will
fall-back to a pure Python implementation.
To install maxminddb, type:
.. code-block:: bash
$ pip install maxminddb
If you are not able to use pip, you may also use easy_install from the
source directory:
.. code-block:: bash
$ easy_install .
Usage
-----
To use this module, you must first download or create a MaxMind DB file. We
provide `free GeoLite2 databases
<http://dev.maxmind.com/geoip/geoip2/geolite2>`_. These files must be
decompressed with ``gunzip``.
After you have obtained a database and importing the module, call
``open_database`` with a path to the database as the first argument.
Optionally, you may pass a mode as the second arguments. The modes are
exported from ``maxminddb``. Valid modes are:
* MODE_MMAP_EXT - use the C extension with memory map.
* MODE_MMAP - read from memory map. Pure Python.
* MODE_FILE - read database as standard file. Pure Python.
* MODE_MEMORY - load database into memory. Pure Python.
* MODE_AUTO - try MODE_MMAP_EXT, MODE_MMAP, MODE_FILE in that order. Default.
The ``open_database`` function returns a ``Reader`` object. To look up an IP
address, use the ``get`` method on this object. The method will return the
corresponding values for the IP address from the database (e.g., a dictionary
for GeoIP2/GeoLite2 databases). If the database does not contain a record for
that IP address, the method will return ``None``.
Example
-------
.. code-block:: pycon
>>> import maxminddb
>>>
>>> reader = maxminddb.open_database('GeoLite2-City.mmdb')
>>> reader.get('1.1.1.1')
{'country': ... }
>>>
>>> reader.close()
Exceptions
----------
The module will return an ``InvalidDatabaseError`` if the database is corrupt
or otherwise invalid. A ``ValueError`` will be thrown if you look up an
invalid IP address or an IPv6 address in an IPv4 database.
Requirements
------------
This code requires Python 2.6+ or 3.3+. The C extension requires CPython. The
pure Python implementation has been tested with PyPy.
On Python 2, the `ipaddr module <https://code.google.com/p/ipaddr-py/>`_ is
required.
Versioning
----------
The MaxMind DB Python module uses `Semantic Versioning <http://semver.org/>`_.
Support
-------
Please report all issues with this code using the `GitHub issue tracker
<https://github.com/maxmind/MaxMind-DB-Reader-python/issues>`_
If you are having an issue with a MaxMind service that is not specific to this
API, please contact `MaxMind support <http://www.maxmind.com/en/support>`_ for
assistance.
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: Proxy Servers
Classifier: Topic :: Internet
|