https://github.com/seniverse/ipdb_decoder
IPIP.net File Format (GeoIP database) Decoder, IPDB Decoder by Elixir
https://github.com/seniverse/ipdb_decoder
17mon elixir geoip geolocation ipdb ipip
Last synced: 5 months ago
JSON representation
IPIP.net File Format (GeoIP database) Decoder, IPDB Decoder by Elixir
- Host: GitHub
- URL: https://github.com/seniverse/ipdb_decoder
- Owner: seniverse
- License: apache-2.0
- Created: 2019-06-24T17:14:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-25T10:11:05.000Z (over 6 years ago)
- Last Synced: 2024-10-30T16:56:06.474Z (11 months ago)
- Topics: 17mon, elixir, geoip, geolocation, ipdb, ipip
- Language: Elixir
- Homepage:
- Size: 1.36 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# IPIP.net File Format Decoder
[](https://travis-ci.org/seniverse/ipdb_decoder)
[](https://coveralls.io/github/seniverse/ipdb_decoder?branch=master)
[](https://hex.pm/packages/ipdb_decoder)
[](https://hex.pm/packages/ipdb_decoder)

## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `ipdb_decoder` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:ipdb_decoder, "~> 0.1.0"}
]
end
```## Usage
To prepare lookups in a given database, you need parse first and
hold the results for later usage:```elixir
iex(1)> {:ok, database} = IPDBDecoder.parse_database_file("/path/to/ipipfree.ipdb")
```Using the returned database contents, you could start looking up
```elixir
iex(2)> IPDBDecoder.lookup(database, "127.0.0.1")
{:ok, %{}}
```Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/ipdb_decoder](https://hexdocs.pm/ipdb_decoder).## ChangeLog
[CHANGELOG](https://github.com/seniverse/ipdb_decoder/blob/master/CHANGELOG.md)
## License
[Apache 2.0](https://github.com/seniverse/ipdb_decoder/blob/master/LICENSE)