SkillAgentSearch skills...

Cep.ex

🌎 Brazilian zipcode lookup (CEP) library for Elixir

Install / Use

/learn @vinibrsl/Cep.ex
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/BRA_orthographic.svg/270px-BRA_orthographic.svg.png" align="right" />

cep.ex

Brazilian zipcode lookup (CEP) library for Elixir.

Installing

The package can be installed by adding cepex to your list of dependencies in mix.exs:

def deps do
  [
    {:cepex, "~> 0.1.0"}
  ]
end

# => Rock on! πŸš€

Usage

# With formatted zipcode strings :)
iex> Cepex.lookup("80010-180")
{:ok, %Cepex.Address{
  address: "Rua BarΓ£o do Rio Branco",
  cep: "80010180",
  city: "Curitiba",
  complement: "",
  http_response: %Cepex.HTTP.Response{},
  neighborhood: "Centro",
  state: "PR"
}}

# With zipcode integers :)
iex> Cepex.lookup(80010180)
{:ok, %Cepex.Address{
  address: "Rua BarΓ£o do Rio Branco",
  cep: "80010180",
  city: "Curitiba",
  complement: "",
  http_response: %Cepex.HTTP.Response{},
  neighborhood: "Centro",
  state: "PR"
}}

# With unformatted zipcode strings :)
iex> Cepex.lookup("80210130")
{:ok, %Cepex.Address{
  address: "Rua BarΓ£o do Rio Branco",
  cep: "80010180",
  city: "Curitiba",
  complement: "",
  http_response: %Cepex.HTTP.Response{},
  neighborhood: "Centro",
  state: "PR"
}}

Docs

The full documentation is available on Hex.

Contributing

  1. Create a fork (https://github.com/vnbrs/cep.ex/fork)
  2. Create a branch (git checkout -b my-new-feature)
  3. Make a commit (git commit -am 'Add some feature')
  4. Push your code (git push origin my-new-feature)
  5. Create a Pull Request
  6. Thanks! πŸ€™
View on GitHub
GitHub Stars8
CategoryDevelopment
Updated1y ago
Forks0

Languages

Elixir

Security Score

70/100

Audited on Mar 17, 2025

No findings