bradata.cgu package

Submodules

bradata.cgu.cgu module

bradata.cgu.cgu.get_ceaf(date=None)[source]

gets CEAF (Cadastro de Expulsões da Administração Federal, http://www.transparencia.gov.br/servidores/SaibaMaisPunicoes.asp) data. it converts the csv encoding to utf8. :param date: a string in YYYY-mm-dd format or a datetime object with year, month, and day attributes. if not provided, will get current day (be careful if on other timezone than Brasília). input can be constructed by importing datetime module and typing datetime.date(1994, 07, 18). :return: downloads csv to directory bradata.__download_dir__

bradata.cgu.cgu.get_ceis(date=None)[source]

gets CEIS (cadastro de empresas inidôneas e suspensas, http://www.portaldatransparencia.gov.br/ceis) data. it converts the csv encoding to utf8. :param date: a string in YYYY-mm-dd format or a datetime object with year, month, and day attributes. if not provided, will get current day (be careful if on other timezone than Brasília). input can be constructed by importing datetime module and typing datetime.date(1994, 07, 18). :return: downloads csv to directory bradata.__download_dir__

bradata.cgu.cgu.get_cepim(date=None)[source]

gets CEPIM (Cadastro de Entidades sem Fins Lucrativos Impedidas, http://www.portaldatransparencia.gov.br/cepim) data. it converts the csv encoding to utf8. :param date: a string in YYYY-mm-dd format or a datetime object with year, month, and day attributes. if not provided, will get current day (be careful if on other timezone than Brasília). input can be constructed by importing datetime module and typing datetime.date(1994, 07, 18). :return: downloads csv to directory bradata.__download_dir__

bradata.cgu.cgu.get_cgu_data(date, cadastro, freq, consulta=None)[source]

gets some CGU data at http://www.portaldatransparencia.gov.br/. it is wrapped by helper functions that make the library more discoverable. it converts the csv encoding to utf8.

Parameters:date – a string in YYYY-mm-dd format or a datetime object with year,

month, and day attributes. if not provided, will get current day (be careful if on other timezone than Brasília). input can be constructed by importing datetime module and typing datetime.date(1994, 07, 18). :param cadastro: this is the database to be fetched (e.g., ‘ceis’) :param consulta: usually the same as in cadastro, but sometimes the internal API calls it something else, as in the case of CEAF. :param freq: ‘d’ for daily, ‘m’ for monthly, ‘y’ or ‘a’ for annually. :return: downloads csv to directory bradata.__download_dir__

bradata.cgu.cgu.get_cnep(date=None)[source]

gets CNEP (Cadastro Nacional de Empresas Punidas, http://www.portaldatransparencia.gov.br/cnep) data. it converts the csv encoding to utf8. :param date: a string in YYYY-mm-dd format or a datetime object with year, month, and day attributes. if not provided, will get current day (be careful if on other timezone than Brasília). input can be constructed by importing datetime module and typing datetime.date(1994, 07, 18). :return: downloads csv to directory bradata.__download_dir__

bradata.cgu.cgu.get_diarias(date=None)[source]

gets pagamentos de diárias pagas aos servidores e colaboradores eventuais (http://www.portaltransparencia.gov.br/despesasdiarias/) data. it converts the csv encoding to utf8. :param date: a string in YYYY-mm format or a datetime object with year and month attributes. if not provided, will get current day (be careful if on other timezone than Brasília). input can be constructed by importing datetime module and typing datetime.date(1994, 07, 18). :return: downloads csv to directory bradata.__download_dir__

Module contents