How renan20553/baixar_nfse_portal_nacional works
A desktop Tkinter application downloads NFS-e XMLs and event documents from Brazil’s ADN API using a PFX client certificate. The user configures the target CNPJ, environment and output settings, starts or stops a download, and receives saved files and logs; NSU checkpoints support resumption. The main workflow is visible in the README and sampled entry-point/downloader code. Some filename-generation details and other UI behavior were not fully sampled, so those relationships rely on documented behavior rather than inferred implementation.
Main entry points: download_nfse.py Tkinter application · downloader.py Download coordinator · config.py Config model · selftest.py Local self-test
Components 15
User interface
- Tkinter application
download_nfse.py - About and license
download_nfse.py - License text
license_text.py - Version metadata
version.py
Download workflow
- Download coordinator
nfse/downloader.py - PFX certificate
- ADN API
- NSU distribution
nfse/downloader.py - XML and event files
- Download logs
- Local self-test
nfse/selftest.py
Configuration and state
- Configuration file
config.json - Config model
nfse/config.py - NSU checkpoint
nfse/downloader.py
Other components
- User
Connections 17
- User → Tkinter application: operates
README.md - Tkinter application → Configuration file: loads settings
download_nfse.py - Tkinter application → Config model: validates and saves
download_nfse.py - Config model → Configuration file: reads and writes
nfse/config.py - Tkinter application → Download coordinator: starts download
download_nfse.py - Download coordinator → Config model: uses settings
nfse/downloader.py - Download coordinator → PFX certificate: converts PFX
nfse/downloader.py - Download coordinator → ADN API: requests batches
nfse/downloader.py - Download coordinator → NSU distribution: processes responses
nfse/downloader.py - NSU distribution → NSU checkpoint: updates next NSU
nfse/downloader.py - NSU distribution → XML and event files: saves documents
README.md - Download coordinator → Download logs: records activity
nfse/downloader.py - User → About and license: opens details
README.md - About and license → License text: displays text
download_nfse.py - Tkinter application → Version metadata: shows version
download_nfse.py - Tkinter application → Local self-test: dispatches diagnostic
download_nfse.py - Local self-test → PFX certificate: tests conversion
nfse/selftest.py