CLI tool to download NoCFO attachments and organize them by document number.
Project description
NoCFO File Downloader
CLI tool to download all attachments from a NoCFO business and organize them by document number.
Features
-
Fetches all documents and maps
document_number -> attachment_ids. -
Downloads every attachment.
-
Files linked to a document are saved as:
<document_number>/<document_number> <original_filename> -
Files not linked to any document are saved under:
UNCATEGORIZED/<original_filename> -
Shows a progress bar while downloading.
Installation
pip install nocfo-file-downloader
Usage
nocfo-dl <business_slug> --output-dir ./downloads
Options
--output-dir/-oOutput folder (default:./downloads)--base-urlAPI base URL (default:https://api-prd.nocfo.io)--page-sizePage size for pagination (default:200)--tokenPAT token (if omitted, the tool will prompt)--concurrency/-cNumber of concurrent downloads (default:4)
PAT token (Personal Access Token)
The API uses token-based authentication. The token must be passed in the Authorization header as:
Authorization: Token <your_token_here>
You can create and manage tokens in the NoCFO web app under Account Settings:
- Production: https://login.nocfo.io/auth/tokens/
- Testing: https://login-tst.nocfo.io/auth/tokens/
The CLI prompts for a token at startup if you do not provide --token.
Examples
Download attachments for business acme-corp to ./exports:
nocfo-dl acme-corp --output-dir ./exports
Use a custom API base URL:
nocfo-dl acme-corp --base-url https://api-prd.nocfo.io
Limit concurrency:
nocfo-dl acme-corp --concurrency 8
Development
python -m venv .venv
source .venv/bin/activate
pip install -e .
Run locally:
python -m nocfo_file_downloader <business_slug>
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nocfo_file_downloader-0.1.0.tar.gz.
File metadata
- Download URL: nocfo_file_downloader-0.1.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.8 Darwin/24.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60b97be1d51fd49bee8f51d89d0544c8445119f900c193891f40647f96f0524e
|
|
| MD5 |
6adf58893ed9725e3ecd1ca841f4ae92
|
|
| BLAKE2b-256 |
6c95db2d47c369f0e2a899dc753ccb735ce8f9f0366090a1f2521b48c988150c
|
File details
Details for the file nocfo_file_downloader-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nocfo_file_downloader-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.8 Darwin/24.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c6d95d5feda122933367261c472b7e73bbb457a2314b9438c091b543a39ba73
|
|
| MD5 |
6cce737b0a550877e702726bb1e51f60
|
|
| BLAKE2b-256 |
9535dab859ead1c81d531f9128bab66b0fc916e3642c74dfa5804e0d956cda89
|