{"id":13508243,"url":"https://github.com/elixir-geolix/geolix","last_synced_at":"2026-02-18T21:02:48.276Z","repository":{"id":548662,"uuid":"13545085","full_name":"elixir-geolix/geolix","owner":"elixir-geolix","description":"IP information lookup provider","archived":false,"fork":false,"pushed_at":"2025-09-24T12:34:51.000Z","size":813,"stargazers_count":192,"open_issues_count":4,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-13T21:10:26.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-geolix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-10-13T19:15:38.000Z","updated_at":"2026-01-08T18:05:51.000Z","dependencies_parsed_at":"2024-01-26T04:58:46.960Z","dependency_job_id":"f2f2782c-1f61-4e21-a4a7-3b903a7f5d85","html_url":"https://github.com/elixir-geolix/geolix","commit_stats":{"total_commits":629,"total_committers":7,"mean_commits":89.85714285714286,"dds":0.009538950715421324,"last_synced_commit":"0b9d99ac421e40c1818f1d933fd8b76c5f31099f"},"previous_names":["mneudert/geolix"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/elixir-geolix/geolix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-geolix%2Fgeolix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-geolix%2Fgeolix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-geolix%2Fgeolix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-geolix%2Fgeolix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-geolix","download_url":"https://codeload.github.com/elixir-geolix/geolix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-geolix%2Fgeolix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:50.262Z","updated_at":"2026-02-18T21:02:48.258Z","avatar_url":"https://github.com/elixir-geolix.png","language":"Elixir","funding_links":[],"categories":["Geolocation"],"sub_categories":[],"readme":"# Geolix\n\nIP information lookup provider.\n\n## Package Setup\n\nTo use Geolix with your projects, edit your `mix.exs` file and add the project as a dependency:\n\n```elixir\ndefp deps do\n  [\n    # ...\n    {:geolix, \"~\u003e 2.0\"},\n    # ...\n  ]\nend\n```\n\nIf you want to use a manual supervision approach (without starting the application) please look at the inline documentation of `Geolix.Supervisor`.\n\n## Application Configuration\n\nEvery lookup request is passed to all configured databases:\n\n```elixir\nconfig :geolix,\n  databases: [\n    %{\n      id: :city,\n      adapter: MyAdapter,\n      source: \"/absolute/path/to/city.db\"\n    },\n    %{\n      id: :country,\n      adapter: MyAdapter,\n      source: \"/absolute/path/to/country.db\"\n    }\n  ]\n```\n\nAbove configuration will use the adapter `MyAdapter` and return a result for an example `:city` and `:country` database. The exact configuration values you need to provide are defined by the adapter you are using.\n\nMore details on database configuration can be found inline at the main `Geolix` module.\n\n## Adapters\n\nAll the work done by Geolix is handled using adapters. These adapters can use a database, a webservice or any other means available to handle your lookup requests.\n\nKnown adapters:\n\n- [`Geolix.Adapter.Fake`](#fake-adapter)\n- [`Geolix.Adapter.LookupCache`](https://github.com/elixir-geolix/adapter_lookup_cache)\n- [`Geolix.Adapter.MMDB2`](https://github.com/elixir-geolix/adapter_mmdb2)\n\nFor detailed information how to configure the adapter of your choice please read the adapter's configuration.\n\n### Fake Adapter\n\nPre-packaged is a fake/static adapter (`Geolix.Adapter.Fake`) working on a plain `Agent` holding your IP lookup responses. An example of how you might use this adapter:\n\n```elixir\nconfig :geolix,\n  databases: [\n    %{\n      id: :country,\n      adapter: Geolix.Adapter.Fake,\n      data: %{\n        {1, 1, 1, 1} =\u003e %{country: %{iso_code: \"US\"}},\n        {2, 2, 2, 2} =\u003e %{country: %{iso_code: \"GB\"}}\n      }\n    }\n  ]\n```\n\nPlease refer to the inline documentation of the `Geolix.Adapter.Fake` module for more details.\n\n### Custom Adapters\n\nAdapters are expected to adhere to the `Geolix.Adapter` behaviour. As a starting point for writing a custom adapter you can look at the packaged `Geolix.Adapter.Fake`.\n\n## Basic Usage\n\nLookups are done using `Geolix.lookup/1,2`:\n\n```elixir\niex(1)\u003e Geolix.lookup(\"127.0.0.1\")\n%{\n  city: %{...},\n  country: %{...}\n}\n\niex(2)\u003e Geolix.lookup({127, 0, 0, 1}, where: :my_database)\n%{...}\n```\n\nFull documentation is available inline in the `Geolix` module and at [https://hexdocs.pm/geolix](https://hexdocs.pm/geolix).\n\n## License\n\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-geolix%2Fgeolix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-geolix%2Fgeolix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-geolix%2Fgeolix/lists"}