All Projects → prodis → Correios Cep

prodis / Correios Cep

Licence: apache-2.0
Find Brazilian addresses by zipcode, directly from Correios database. No HTML parsers.

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Correios Cep

Getting Started Guides
Getting Started guides and samples for CEP extensions
Stars: ✭ 296 (+78.31%)
Mutual labels:  cep
Brazilian Utils
Utils library for specific Brazilian businesses
Stars: ✭ 1,023 (+516.27%)
Mutual labels:  cep
Correios Php
Uma maneira fácil de interagir com as principais funcionalidades dos Correios.
Stars: ✭ 116 (-30.12%)
Mutual labels:  cep
Spreads
Series and Panels for Real-time and Exploratory Analysis of Data Streams
Stars: ✭ 353 (+112.65%)
Mutual labels:  cep
Parcel Plugin Cep
Zero configuration CEP extension builder for Parcel
Stars: ✭ 29 (-82.53%)
Mutual labels:  cep
Cep Gratis
Com esse pacote você poderá realizar consultas de CEP gratuitamente.
Stars: ✭ 64 (-61.45%)
Mutual labels:  cep
gocells
Event Based Applications [DEPRECATED]
Stars: ✭ 69 (-58.43%)
Mutual labels:  cep
Rivus cep
Complex event processing in Erlang
Stars: ✭ 140 (-15.66%)
Mutual labels:  cep
Grunt Cep
A Grunt plugin that helps debugging and packaging HTML5-based extensions for Adobe Creative Cloud applications.
Stars: ✭ 40 (-75.9%)
Mutual labels:  cep
Eagle
Real time data processing system based on flink and CEP
Stars: ✭ 95 (-42.77%)
Mutual labels:  cep
Brazilian Values
🇧🇷 Funções de formatação, conversão e validação para valores, documentos e outras unidades usadas no Brasil. Como CEP, CNPJ, CPF, BRL (R$), datas, números etc.
Stars: ✭ 366 (+120.48%)
Mutual labels:  cep
Kallewheel
A custom color wheel extension for Adobe Photoshop
Stars: ✭ 16 (-90.36%)
Mutual labels:  cep
Busca Cep
Módulo de node.js que busca por ceps do Brasil utilizando o serviço ViaCEP
Stars: ✭ 70 (-57.83%)
Mutual labels:  cep
Serendipity
Serendipity is an open source Customer Engagement Platform
Stars: ✭ 297 (+78.92%)
Mutual labels:  cep
Ui Dna
programmable and semantically UI design tool for Photoshop
Stars: ✭ 126 (-24.1%)
Mutual labels:  cep
Kafkastreams Cep
Complex Event Processing on top of Kafka Streams
Stars: ✭ 257 (+54.82%)
Mutual labels:  cep
Interference
opensource distributed database with base JPA implementation and event processing support
Stars: ✭ 57 (-65.66%)
Mutual labels:  cep
Pycep Correios
📦 API para busca de CEP integrado ao serviços dos Correios, ViaCEP e ApiCEP (WideNet)
Stars: ✭ 141 (-15.06%)
Mutual labels:  cep
Wayeb
Wayeb is a Complex Event Processing and Forecasting (CEP/F) engine written in Scala.
Stars: ✭ 138 (-16.87%)
Mutual labels:  cep
Siddhi
Stream Processing and Complex Event Processing Engine
Stars: ✭ 1,185 (+613.86%)
Mutual labels:  cep

Correios CEP

Gem Version Build Status Coverage Status Code Climate GitHub license

Correios Logo

Current available solutions to find Brazilian addresses by zipcode use an HTML form from Correios web site website to perform it, instead of to use a real API.

The old solution works with an HTTP request to the form, followed by parsing HTML result page. The huge problem here is when the Correios web site development team decides to modify some HTML element in the result page, even a layout update, it will break the parser logic for result.

Correios CEP gem solves this problem, retrieving data directly from Correios database.

Installing

Gemfile

gem 'correios-cep'

Direct installation

$ gem install correios-cep

Using

require 'correios-cep'

# With "get" instance method
finder = Correios::CEP::AddressFinder.new
address = finder.get('54250610')

# With "get" class method
address = Correios::CEP::AddressFinder.get('54250610')

address # =>
{
  :address => 'Rua Fernando Amorim',
  :neighborhood => 'Cavaleiro',
  :city => 'Jaboatão dos Guararapes',
  :state => 'PE',
  :zipcode => '54250610',
  :complement => ''
}

Configurations

All the configurations are set using Correios::CEP module.

Timeout

For default, the timeout for a request to Correios Web Service is 5 seconds. If Correios Web Service does not respond, a HTTP::TimeoutError exception will be raised.

Correios::CEP.configure do |config|
  config.request_timeout = 3 # It configures timeout to 3 seconds
end

HTTP Proxy

If you need to use an HTTP proxy to HTTP requests, configure HTTP proxy URL.

Correios::CEP.configure do |config|
  config.proxy_url = 'http://10.20.30.40:8888'
end

Log

From 0.7.0 version, there is no more default logger, and the log level will be the same of the given logger.

Correios::CEP.configure do |config|
  config.logger = Rails.logger
end

Configuration example

Correios::CEP.configure do |config|
  config.logger = Rails.logger
  config.request_timeout = 3 # seconds
end

Credits

Author

Fernando Hamasaki de Amorim (prodis)

Prodis Logo

Contributors

https://github.com/prodis/correios-cep/graphs/contributors

Contributing

See the contributing guide.

License

Correios CEP gem is released under the Apache 2.0 License. See the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].