Skip to main content

CLI para conversão e sanitização de arquivos de tabelas de dados.

Project description

csv-converter-skart

PyPI Version Python Version CI GitHub Repo

Ferramenta de linha de comando para converter e sanitizar arquivos de planilha, com foco em dados inconsistentes e geração de arquivos CSV com suporte a pandas.

English version

Visão geral

O projeto converte arquivos .xlsx, .xls e .csv para CSV, aplicando etapas de normalização úteis para cenários em que a origem contém problemas de estrutura, conteúdo ou codificação.

Principais recursos:

  • Conversão de planilhas para CSV.
  • Normalização de arquivos CSV com saída em UTF-8.
  • Sanitização de XML interno de arquivos XLSX.
  • Detecção de codificação para arquivos CSV.
  • Interface de linha de comando e uso programático via módulo Python.

Requisitos

  • Python >= 3.10

Instalação

pip install csv-converter-skart

Uso

Linha de comando

Se apenas o arquivo de entrada for informado, o diretório File{NomeDoArquivo}Normalized será criado no diretório atual. O CSV gerado manterá o nome base do arquivo original.

csv-converter ./meus_arquivos/arquivo.xlsx

Para definir explicitamente o arquivo de saída, use -o ou --output.

csv-converter ./meus_arquivos/arquivo.xlsx --output ./csv/arquivo_normalizado.csv

Para exibir a ajuda da CLI:

csv-converter --help

Uso como módulo

O pacote também expõe a função csv_converter, que pode ser importada diretamente.

import pandas as pd
from pathlib import Path

from csv_converter import csv_converter

input_file = Path("./meu_arquivo.xlsx")
output_file = Path("./destino.csv")

generated_file = csv_converter(input_file, output_file)
dataframe = pd.read_csv(generated_file)

print(dataframe.info())

Comportamento de saída

  • Entradas .xlsx e .xls são processadas e exportadas para CSV.
  • Entradas .csv são lidas com detecção de codificação e regravadas em UTF-8.
  • Quando o caminho de saída não é informado, ele é criado automaticamente.

Licença

MIT License - Copyright (c) 2026 Artur dos Santos Shon

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

csv_converter_skart-0.2.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csv_converter_skart-0.2.1-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file csv_converter_skart-0.2.1.tar.gz.

File metadata

  • Download URL: csv_converter_skart-0.2.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for csv_converter_skart-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fed24ef9badfca2e717dc89b40bd8fdeaf79df9fc55e8076913c250527b9de37
MD5 aa05fc28b742d2874360d65b8915f194
BLAKE2b-256 d4c32c1a907f9d7bc6141e9155b43f52d0c1acab1db979ab23b3e9de3ae574ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for csv_converter_skart-0.2.1.tar.gz:

Publisher: cd.yml on SkyArtur/csv-converter-skart

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file csv_converter_skart-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for csv_converter_skart-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18b87b6a633d4ca8466fe79587210f41721036cd157f7ed90e093835f38e1f60
MD5 71155f76f929c93a3685d21039ed9432
BLAKE2b-256 7b5681039ce95692457d1e0e3ef34014593dc5c91af8e638d5bad58cfca337d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for csv_converter_skart-0.2.1-py3-none-any.whl:

Publisher: cd.yml on SkyArtur/csv-converter-skart

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page