Skip to main content

Outil de téléchargement automatisé des documents fiscaux depuis impots.gouv.fr

Project description

dgfip-fetcher

dgfip-fetcher is a CLI tool to automatically download all your tax documents (income tax notices, declarations, property taxes, etc.) from your personal space on impots.gouv.fr.

Note: This tool is specifically designed for the French tax administration website.

Key Features

  • Time-saving: No more manual clicking through each year.
  • Clear Organization: Files are automatically renamed (e.g., 2023_property_tax.pdf).
  • Secure: Your credentials are stored in your system's secure vault (Keyring).
  • Simple: One command to fetch everything.

Installation

pip install dgfip-fetcher

After installation, you must download the browser used by Playwright:

python -m playwright install chromium

(Note: If you use uv, run: uv run playwright install chromium)

Usage

Once installed, simply run:

dgfip-fetcher

Options

  • --years N: Number of previous years to scan (default: 10).
  • --output DIR: Destination folder for PDFs.
  • --debug: Shows the browser during login (useful for 2FA or troubleshooting).
  • --reset: Clears saved credentials and session.

Example:

dgfip-fetcher --years 5 --output my_tax_archives

How It Works

  1. Authentication: Uses Playwright to handle login and 2FA (SMS/Email) from the official French tax portal.
  2. Secret Storage:
    • Your French tax ID (SPI) is stored in a standard config folder.
    • Your password is encrypted and stored in your OS keychain.
  3. Retrieval: Documents are detected and downloaded using efficient asynchronous requests.

Development

To contribute:

  1. Clone the repository.
  2. Install dependencies: uv sync.
  3. Run in dev mode: uv run dgfip-fetcher.

Disclaimer

This project is an independent tool and is NOT affiliated with the Direction générale des Finances publiques (DGFiP) or impots.gouv.fr. Use it at your own risk.

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

dgfip_fetcher-0.1.0.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

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

dgfip_fetcher-0.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dgfip_fetcher-0.1.0.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dgfip_fetcher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 208cee6fe3164cfb8f76af7fc23b7308508091058e917f7d1003e72ab8e19516
MD5 2ef0d7e40bc63f2ba64ca78d9f8b87db
BLAKE2b-256 00f1a22c04331a2ad45783404c8a73b95d337bf99f3e01347b770167ea8c1ba0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dgfip_fetcher-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dgfip_fetcher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63d5ae406a7e248c5de73e47043a72613eb6fd7bec47722c67eb9d52df6e6162
MD5 b64fb11280b26cee6ca99d360afe1456
BLAKE2b-256 e3c129b98df8a6a67eaf2cd32ae305a51c8db4fd018969ac88a2a1d60c9cb31b

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