Skip to main content

Toolkit para manipulação de notas fiscais eletrônicas

Project description

NFE Toolkit

Biblioteca para manipulação de arquivos nfe (Nota Fiscal Eletrônica)

Requisitos

  • python
  • nfelib
  • spedpy

Como instalar

$ pip install nfetoolkit

Objetivos do Projeto

A ideia é criar um toolkit para leitura/criação/organização de xmls relacionados ao projeto da Nota Fiscal Eletrônica

Casos de uso:

1) Ler uma nfe a partir do xml e gerar o pdf correspondente:
    
from nfetoolkit import NFeHandler

nfeProc = NFeHandler.nfe_from_path('nfe.xml')
NFeHandler.nfe_to_pdf(nfeProc, 'nfe.pdf')

2) Extrair os xmls contidos em um arquivo Zip na pasta do diretório corrente e organizar em subpastas padrão: nfe, canc, inut e cce

from nfetoolkit import nfetk


zip_path = 'notas.zip'
dest_dir_fd = os.getcwd()

test = nfetk.XMLOrganizer()
test.extract_xmls(zip_path, dest_dir_fd)   

3) Gravar conjunto de dados de notas fiscais em um único arquivo texto, separado por pipes (ArquivoDigital) 

from nfetoolkit import nfetk


nfeToolkit = nfetk.NFeRepository()
nfeToolkit.store_all('C:\\temp\\dest\\nfe', verbose=True)
nfeToolkit.save('nfe_data.txt')

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

nfetoolkit-0.2.4.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

nfetoolkit-0.2.4-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file nfetoolkit-0.2.4.tar.gz.

File metadata

  • Download URL: nfetoolkit-0.2.4.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for nfetoolkit-0.2.4.tar.gz
Algorithm Hash digest
SHA256 f3945bb6aa8fc7b077368a9f4fc71d2f97aac90d031bbdf78a81cb6e25fbe503
MD5 95bc912b681e073974d42b627fc7a592
BLAKE2b-256 ea4923da3230cc99503e1bfcdb5f9c698d5aecf974bc3576f473b03b3b8884e5

See more details on using hashes here.

Provenance

File details

Details for the file nfetoolkit-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: nfetoolkit-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for nfetoolkit-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9b642127e15923f3ca6117ed08c8f830f3bec4031f14b94cd42778f47e50ff70
MD5 8622314366fd411fd2d4092b7f53d2d4
BLAKE2b-256 2392d1423767b9b7184a135002c9d9c1f3883760bb3d6748db001d3a04096607

See more details on using hashes here.

Provenance

Supported by

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