{"id":31702313,"url":"https://github.com/huehodaniel/ip2location-elixir","last_synced_at":"2025-10-08T21:50:44.571Z","repository":{"id":57507422,"uuid":"80981732","full_name":"huehodaniel/ip2location-elixir","owner":"huehodaniel","description":"IP2Location API for Elixir","archived":false,"fork":false,"pushed_at":"2017-03-09T22:25:36.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-07T03:58:17.029Z","etag":null,"topics":["elixir","geolocation","ip2location","ip2location-database"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huehodaniel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-05T09:08:16.000Z","updated_at":"2017-12-29T12:37:29.000Z","dependencies_parsed_at":"2022-09-19T05:30:38.470Z","dependency_job_id":null,"html_url":"https://github.com/huehodaniel/ip2location-elixir","commit_stats":null,"previous_names":["danielgracia/ip2location-elixir"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/huehodaniel/ip2location-elixir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huehodaniel%2Fip2location-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huehodaniel%2Fip2location-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huehodaniel%2Fip2location-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huehodaniel%2Fip2location-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huehodaniel","download_url":"https://codeload.github.com/huehodaniel/ip2location-elixir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huehodaniel%2Fip2location-elixir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278882775,"owners_count":26062351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["elixir","geolocation","ip2location","ip2location-database"],"created_at":"2025-10-08T21:50:43.033Z","updated_at":"2025-10-08T21:50:44.558Z","avatar_url":"https://github.com/huehodaniel.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP2Location-Elixir\n\nInterface for accessing IP2Location Binary Format databases.\n**This is unstable software, and not officially vetted by IP2Location or anybody else.** You have been warned.\n\n## Implementation details\n\nThis is mostly a port of the [official Erlang library](https://github.com/IP2Location/IP2Location-erlang),\nwith three main differences:\n- It uses binary strings instead of charlists (as is common with Elixir libraries).\n- It returns structs instead of records (again, as usual).\n- It accepts the raw binary rather than directly using file IO, giving a very small speed bonus at a massive\n  memory cost. This library is therefore almost useless except for regional databases. Due to how large\n  binaries are stored in the BEAM VM heap (using refcounting), once you load a binary database it should\n  be safe to send it across processes without memory copying.\n\n## Installation\n\nThe package can be installed by adding `ip2location_elixir` to your list of dependencies in `mix.exs`.\nAs of now, this library does not set a OTP application, so you have to tell Mix that when building your project:\n\n```elixir\ndef deps do\n  [{:ip2location_elixir, \"~\u003e 0.1.0\", app: false}]\nend\n```\n\n## Usage\n\n```elixir\n# Load your file\nraw = File.read!(\"path/to/database.bin\")\n\n# Prepare headers for use\ndb = IP2Location.read_database(raw) \n\n# Alternatively you can just use the `open_database!/1` shortcut\n# db = IP2Location.open_database!(\"path/to/database.bin\") \n\n# Grab your stuff\n%IP2Location.Record{city: city} = IP2Location.query(db, \"some IP\")\n```\n\n## License\nSee [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuehodaniel%2Fip2location-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuehodaniel%2Fip2location-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuehodaniel%2Fip2location-elixir/lists"}