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.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

nfetoolkit-0.2.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nfetoolkit-0.2.1.tar.gz
  • Upload date:
  • Size: 11.3 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.1.tar.gz
Algorithm Hash digest
SHA256 41708ebd7400c19cddbe58f3ddeb58dba38bf4d5f646fd4fbe1d296b1f432b08
MD5 4e08d8cbf41f8a29ba338eedca6982e6
BLAKE2b-256 e16dc4f7d90fa4a9196f4f24136276bdba5b04798b2719b24a61fd7dbbdcbcad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nfetoolkit-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b36207fe799281286d74e2cbec273fc1a12d11774ecc55ad883050643ff7ed3
MD5 cadcf3fb6af41f45d68b5adc0947e815
BLAKE2b-256 b0f39eba9a0856c0f831a55fdc422fab643aaf99535a8affc6b7f76090d8938d

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