Skip to main content

Biblioteca para baixar NFSe do Ambiente Nacional (ADN)

Project description

NFSe Nacional

Biblioteca Python para baixar Notas Fiscais de Serviço Eletrônicas (NFSe) do Ambiente de Dados Nacional (ADN).

Instalação

Você pode instalar a biblioteca via PyPI:

pip install dfe-nfse

Uso

Para utilizar a biblioteca, você precisa de um certificado digital A1 (.pfx) e sua respectiva senha.

from nfse import download_nfse

cnpj = "00000000000000"
nsu = 100 
output_path = "./notas" 
cert_path = "/caminho/para/seu/certificado.pfx"
cert_password = "sua_senha_aqui"

resultado = download_nfse(
    cnpj=cnpj, 
    nsu=nsu, 
    output_path=output_path, 
    cert_path=cert_path, 
    cert_password=cert_password
)

print(resultado)

Requisitos

  • Python 3.6+
  • requests
  • cryptography

Estrutura

Os arquivos XML baixados serão organizados em pastas por ano e mês (ex: 2024.01) dentro do diretório de saída especificado.

Licença

MIT

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

dfe_nfse-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

dfe_nfse-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dfe_nfse-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for dfe_nfse-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d61c77ae5f8ff1936fe0a5fb17c351ed9e0119419bf0508c2956abbe6f760a7d
MD5 666fe89bafc6ac888d97c497c9d6693b
BLAKE2b-256 2fde9b3258bfe7dac79b539f856369bea1531ca8319dd78ac0c3f5118cd993df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dfe_nfse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for dfe_nfse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9ed14de7f9ad4f7f5e2d60dd8f4a88dcf56ad098d515f2b0f71a44cbffc6f02
MD5 1575be5fd2dbbac23cea4450a00cfadc
BLAKE2b-256 42e8655a992ddaacf5632d772428e350687c3a131e7c65d840f780e27276b517

See more details on using hashes here.

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