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 nfetk


nfetoolkit = nfetk.XMLHandler()             
nfeProc = nfetoolkit.nfe_from_path('nfe.xml')
nfetoolkit.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.3.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

nfetoolkit-0.2.3-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nfetoolkit-0.2.3.tar.gz
  • Upload date:
  • Size: 11.2 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.3.tar.gz
Algorithm Hash digest
SHA256 3ee207006c543d7a6a0ba5059bedf051c8ba9b946d514c2245d35d480cd3db41
MD5 463636b331b0e40aa6b532bc38b7792a
BLAKE2b-256 8e82a44fbff8fd61214da1dcdd492234c736e6d7e4743ff89a0e3510d4ff3e02

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfetoolkit-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 10.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4269e62596868673db4e653e8ceb586841bd51b861736b0088b9d22b941bc464
MD5 cbc0a1bb4b99966de289229b3c8ea0dd
BLAKE2b-256 d17a160ea23650c43b863962cdefee9fef9b15fb22442e24884022493e34e0a9

See more details on using hashes here.

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