<commit_before>homepage: ''
changelog-type: markdown
hash: 0fbfbf2a6286ff9daec9fbb321f754150fbcb4136684bd2daadf678c8d504ed4
test-bench-deps: {}
maintainer: <EMAIL>
synopsis: Pure haskell interface to MaxMind GeoIP database
changelog: ! '# 0.3.0.1

  - Fix compiling with GHC 8.6.1


  # 0.3.0.0

  - Include timezone and accuracy in location results


  # 0.2.0.1

  - Fixed a problem with correct decoding of 28-bit offsets


  # 0.2.0.0

  - Changed interface to normal Either String GeoResult


  # 0.1.0.3 -> 0.1.0.4

  - Removed lru

  - Switched from binary to cereal with a significant speedup


  # 0.1.0.2 -> 0.1.0.3

  - Changed bytestring-mmap to mmap

  - Add LRU caching to improve performance (10000 entries are cached)


  # 0.1.0.1 -> 0.1.0.2


  - GHC-7.10 compatibiliy

  - Add Changelog.md

  - List Changelog.md and README.md in cabal''s extra-source-files

  - add stack.yaml

'
basic-deps:
  cereal: -any
  bytestring: -any
  base: ! '>=4.7 && <5'
  text: -any
  reinterpret-cast: -any
  mmap: -any
  containers: -any
  iproute: (>=1.4.0)
all-versions:
- 0.1.0.0
- 0.1.0.1
- 0.1.0.2
- 0.1.0.3
- 0.1.0.4
- 0.2.0.0
- 0.2.0.1
- 0.2.1.1
- 0.2.2.0
- 0.3.0.0
- 0.3.1.0
- 0.3.1.1
author: <NAME>
latest: 0.3.1.1
description-type: markdown
description: ! "GeoIP2 - library for accessing GeoIP2 database\n==========\n[![Build
  Status](https://travis-ci.org/ondrap/geoip2.svg?branch=master)](https://travis-ci.org/ondrap/geoip2)
  [![Hackage](https://img.shields.io/hackage/v/geoip2.svg)](https://hackage.haskell.org/package/geoip2)\n\n\nGeoIP2
  is a haskell binding to the MaxMind GeoIP2 database.\nIt parses the database according
  to the MaxMind DB\n[specification](http://maxmind.github.io/MaxMind-DB),\nversion
  2 of the specification is supported. The free geolite2 database can\nbe downloaded
  at http://dev.maxmind.com/geoip/geoip2/geolite2/.\n\nSee haddock documentaion for
  details.\n\n```Haskell\n{-# LANGUAGE OverloadedStrings #-}\nimport Data.GeoIP2\nimport
  Data.IP (IP(..))\n\nmain = do\n  geodb <- openGeoDB \"GeoLite2-City.mmdb\"\n  let
  ip = IPv4 \"172.16.17.32\"\n  print $ (findGeoData geodb \"en\" ip)\n\n  let ip2
  = IPv6 \"fc00:e968:6179::de52:7100\"\n  print $ (findGeoData geodb
  \"en\" ip2)\n```\n"
license-name: BSD-3-Clause
<commit_msg>Update from Hackage at 2019-09-06T09:44:39Z<commit_after>homepage: ''
changelog-type: markdown
hash: a2407ce2a20a925786e68a1bcac91abdb65b6bdc7a3fbdc840156b2494d6429d
test-bench-deps: {}
maintainer: <EMAIL>
synopsis: Pure haskell interface to MaxMind GeoIP database
changelog: |
  # 0.4.0.0
  - Added access to the complete parsed data
  - Added dependency on lens, exported some prisms for easy access
  - Small refactoring of functions, added more exports

  # 0.3.0.1
  - Fix compiling with GHC 8.6.1

  # 0.3.0.0
  - Include timezone and accuracy in location results

  # 0.2.0.1
  - Fixed a problem with correct decoding of 28-bit offsets

  # 0.2.0.0
  - Changed interface to normal Either String GeoResult

  # 0.1.0.3 -> 0.1.0.4
  - Removed lru
  - Switched from binary to cereal with a significant speedup

  # 0.1.0.2 -> 0.1.0.3
  - Changed bytestring-mmap to mmap
  - Add LRU caching to improve performance (10000 entries are cached)

  # 0.1.0.1 -> 0.1.0.2

  - GHC-7.10 compatibiliy
  - Add Changelog.md
  - List Changelog.md and README.md in cabal's extra-source-files
  - add stack.yaml
basic-deps:
  cereal: -any
  bytestring: -any
  base: ! '>=4.7 && <5'
  text: -any
  reinterpret-cast: -any
  mmap: -any
  containers: -any
  lens: -any
  iproute: (>=1.4.0)
all-versions:
- 0.1.0.0
- 0.1.0.1
- 0.1.0.2
- 0.1.0.3
- 0.1.0.4
- 0.2.0.0
- 0.2.0.1
- 0.2.1.1
- 0.2.2.0
- 0.3.0.0
- 0.3.1.0
- 0.3.1.1
- 0.4.0.0
author: <NAME>
latest: 0.4.0.0
description-type: markdown
description: |
  GeoIP2 - library for accessing GeoIP2 database
  ==========
  [![Build Status](https://travis-ci.org/ondrap/geoip2.svg?branch=master)](https://travis-ci.org/ondrap/geoip2) [![Hackage](https://img.shields.io/hackage/v/geoip2.svg)](https://hackage.haskell.org/package/geoip2)


  GeoIP2 is a haskell binding to the MaxMind GeoIP2 database.
  It parses the database according to the MaxMind DB
  [specification](http://maxmind.github.io/MaxMind-DB),
  version 2 of the specification is supported. The free geolite2 database can
  be downloaded at http://dev.maxmind.com/geoip/geoip2/geolite2/.

  See haddock documentaion for details.

  ```Haskell
  {-# LANGUAGE OverloadedStrings #-}
  import Data.GeoIP2
  import Data.IP (IP(..))

  main = do
    geodb <- openGeoDB "GeoLite2-City.mmdb"
    let ip = IPv4 "172.16.17.32"
    print (findGeoData geodb "en" ip)

    let ip2 = IPv6 "fc00:e968:6179::de52:7100"
    print (findGeoData geodb "en" ip2)
  ```
license-name: BSD-3-Clause

{'fraction_non_alphanumeric': 0.14883329829724617, 'fraction_numerical': 0.0840866092074837, 'mean_word_length': 2.948547717842324, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 50, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1424651', 'n_tokens_mistral': 2224, 'n_tokens_neox': 1970, 'n_words': 450}