Skip to main content

Open-source electronic invoicing for Italian freelancers - CLI-first with AI workflows

Project description

OpenFatture 🧾

Open-source electronic invoicing for Italian freelancers — built around a CLI-first workflow, AI automation, and payment reconciliation.

Version CI Tests Release Media Generation Python 3.12+ License: MIT Code style: black

📘 For the consolidated v1.1.0 documentation, visit the docs hub at docs/README.md and the release notes in docs/releases/.


Quick Links

  • docs/README.md – Documentation hub and navigation index
  • docs/QUICKSTART.md – Extended quickstart (15-minute setup walkthrough)
  • QUICKSTART.md – Quickstart (5-minute CLI tour)
  • docs/releases/v1.1.0.md – Latest release notes
  • docs/releases/v1.0.1.md – Upcoming AI cash flow upgrade (in progress)
  • CHANGELOG.md – Full change log
  • docs/history/ROADMAP.md – Roadmap and phase breakdown
  • docs/reports/TEST_RESULTS_SUMMARY.md – Test and coverage report
  • CONTRIBUTING.md – Contribution guidelines

Highlights

  • Core invoicing – Generates FatturaPA XML v1.9, handles PEC delivery to SDI, supports digital signatures, and validates automatically.
  • Payment & reconciliation – Multi-bank imports, intelligent reconciliation, and configurable reminders (docs/PAYMENT_TRACKING.md).
  • AI workflows – Chat assistant, VAT guidance, and description generation powered by OpenAI, Anthropic, or Ollama (examples/AI_CHAT_ASSISTANT.md).
  • Developer experience – Modern Python toolchain (uv, Typer, Pydantic), 117 automated tests with CI coverage gate at 50% (targeting 60%), plus Docker and Makefile automation.
  • Compliance & operations – GDPR-ready logging, professional email templates, and turnkey PEC workflows.

Demo Library


Getting Started

Prerequisites

  • Python 3.12 or later
  • uv package manager
  • PEC mailbox credentials (for SDI delivery)
  • Optional: digital signature certificate (PKCS#12)

Installation & Setup

git clone https://github.com/gianlucamazza/openfatture.git
cd openfatture
uv sync
cp .env.example .env

Populate .env with company data, PEC credentials, and notification settings (see docs/CONFIGURATION.md), then initialise the database:

uv run python -c "from openfatture.storage.database.session import init_db; init_db()"

Next Steps

  • Follow the extended quickstart in docs/QUICKSTART.md or the slim walkthrough in QUICKSTART.md.
  • Review the complete CLI catalogue in docs/CLI_REFERENCE.md.
  • Explore docs/PAYMENT_TRACKING.md to master reconciliation and reminders.

Usage

CLI Examples

uv run openfatture fattura crea
uv run openfatture payment reconcile
uv run openfatture --interactive

Python API

from openfatture.storage.database.models import Fattura
from openfatture.core.xml.generator import FatturaXMLGenerator
from openfatture.utils.email.sender import TemplatePECSender
from openfatture.utils.config import get_settings

invoice = Fattura(...)  # See QUICKSTART for complete examples
xml_tree = FatturaXMLGenerator(invoice).generate()
TemplatePECSender(settings=get_settings()).send_invoice_to_sdi(
    invoice,
    xml_path="invoice.xml",
    signed=False,
)

More examples live in the examples/ directory.


Documentation

  • docs/README.md – Navigation index for guides, diagrams, and releases
  • docs/CONFIGURATION.md – Complete .env and settings reference
  • docs/AI_ARCHITECTURE.md – AI agent architecture and integrations
  • docs/PAYMENT_TRACKING.md – Reconciliation workflows and reminders
  • docs/ARCHITECTURE_DIAGRAMS.md – Mermaid diagrams of the platform

Development

  • Install dev extras and pre-commit hooks: uv sync --all-extras and uv run pre-commit install
  • Run the tests: uv run python -m pytest (coverage: uv run python -m pytest --cov=openfatture)
  • CI/CD, automation, and media workflows are documented in docs/DEVELOPMENT.md, docs/operations/SETUP_CI_CD.md, and related guides

Project Status

  • Latest stable release: docs/releases/v1.0.1.md (AI Cash Flow Upgrade)
  • Detailed roadmap and phase summaries: docs/history/ROADMAP.md and docs/history/PHASE_*_SUMMARY.md
  • Current focus: AI orchestration (Phase 4) and production hardening (Phase 6)

Contributing & License

Contributions are welcome! Read CONTRIBUTING.md and open an issue for substantial proposals. OpenFatture ships under the MIT License (see LICENSE).


Support


Disclaimer

The software is provided “as-is” for educational and production use. Ensure compliance with Italian tax regulations and consult a certified accountant when in doubt.


Made with ❤️ by freelancers, for freelancers.

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

openfatture-1.1.0.tar.gz (7.5 MB view details)

Uploaded Source

Built Distribution

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

openfatture-1.1.0-py3-none-any.whl (431.4 kB view details)

Uploaded Python 3

File details

Details for the file openfatture-1.1.0.tar.gz.

File metadata

  • Download URL: openfatture-1.1.0.tar.gz
  • Upload date:
  • Size: 7.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for openfatture-1.1.0.tar.gz
Algorithm Hash digest
SHA256 174cb927cd86e9ee897eeedde935fae20441eb4c291983851503586545310131
MD5 8a3c5c1173dc41696891ef8e8b0a21b2
BLAKE2b-256 c13db8f90c2c0a5966b75fa57a384fd3ef4f008a3cdcdba5a730ecf5eaccedd2

See more details on using hashes here.

File details

Details for the file openfatture-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: openfatture-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 431.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for openfatture-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fe527d4ef2950ef06e659fc8ad977e57a23f1f52498c034c68696697f7d9668
MD5 d230298d48e83a551f06fcd3ee0fcf2a
BLAKE2b-256 fca3874fcf2c07f2a43608dc89ff1814f7c00f2de2cfbc24e567997e40a13abe

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