Um simples modulo para obter informacoes de um CEP
Project description
Py-Cep
Obtem informacoes de CEPs do Brasil
Pre requisitos
- Instalacao de qualquer versao do Python (http://www.python.org/download)
Instalacao das dependencias
$ pip install -r requirements.txt
Utilizacao
>>> from pycep import PyCep
>>> cep1 = PyCep('59104210')
>>> cep1.dadosCep
{'cep': '59104-210', 'logradouro': 'Rua Alvorada', 'complemento': '', 'bairro': 'Igapo', 'localidade': 'Natal', 'uf': 'RN', 'ibge': '2408102', 'gia': '', 'ddd': '84', 'siafi': '1761'}
>>> cep1.dadosCep['localidade']
'Natal'
>>> cep1.dadosCep['uf']
'RN'
>>> cep1.dadosCep.keys()
dict_keys(['cep', 'logradouro', 'complemento', 'bairro', 'localidade', 'uf', 'ibge', 'gia', 'ddd', 'siafi'])
>>> cep1.dadosCep.values()
dict_values(['59104-210', 'Rua Alvorada', '', 'Igapo', 'Natal', 'RN', '2408102', '', '84', '1761'])
>>>
Licença
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Py-Cep-1.0.4.tar.gz
(2.4 kB
view hashes)
Built Distribution
Py_Cep-1.0.4-py3-none-any.whl
(4.3 kB
view hashes)