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.add_all_nfe('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.1.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

nfetoolkit-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nfetoolkit-0.1.0.tar.gz
  • Upload date:
  • Size: 10.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.1.0.tar.gz
Algorithm Hash digest
SHA256 e7d16dee03e8261e1b8ae737e117051365ae0d9d4dd74d60ac8c428e31435d8d
MD5 75252888c6845338502cfc28a18cf049
BLAKE2b-256 f63c074b317561c94631351a7b0985b188fe57df5b2765e55c665957c735c393

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: nfetoolkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e154fa952598ca671629638707ec1eb53eadb27830d6cbd2609c09abe8cc1f13
MD5 d2d775f3676ec9e5dc1da58c04bcf18d
BLAKE2b-256 a8fe7b36af9e632821d51f7613cf37de1912e305a8ea70546eaa631ddeafe912

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