python-codicefiscale
encode / decode italian fiscal codes - codifica / decodifica del Codice Fiscale italiano.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed under MIT. Install it if you need to work with Italian fiscal codes in Python—whether for encoding, decoding, validation, or integration into Italian administrative systems.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with three lightweight runtime dependencies (python-dateutil, python-fsutil, python-slugify).
- Active maintenance with a recent release and ongoing repository activity.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects alike.
last release 2026-05-08 (98 days) · last repo commit 2026-08-10 · 89 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 102,908 downloads/mo, #12,837 on PyPI
Alternatives
Verify before relying
pip install python-codicefiscale
from codicefiscale import codicefiscale
# Encode
code = codicefiscale.encode(
lastname="Caccamo",
firstname="Fabio",
gender="M",
birthdate="03/04/1985",
birthplace="Torino"
)
# Decode
result = codicefiscale.decode(code)
# Validate
is_valid = codicefiscale.is_valid(code)- Whether ANPR data updates occur reliably once per week as described
- Accuracy of the ~60% single-name-match rate for Italian birthplaces in real-world use
- Performance characteristics when processing large batches of codes
What it is and what it does
python-codicefiscale is a library for encoding and decoding Italian fiscal codes (Codice Fiscale), the unique personal tax identifier used in Italy. It takes personal information—name, surname, gender, birthdate, and birthplace—and generates the corresponding fiscal code, or reverses the process to extract demographic data from an existing code. The library handles multiple birthdate formats, automatically detects Italian city and foreign country codes, and supports omocodia (alternative valid representations of the same code).
The package includes both a Python API and a command-line interface. It depends on python-dateutil for date handling, python-fsutil for file operations, and python-slugify for text normalization. Data is auto-updated weekly from ANPR (the Italian national registry), and the library can suggest possible first names from encoded codes—achieving near-certain identification in approximately 60% of Italian cases. It is actively maintained, supports Python 3.10 through 3.14, and carries no known security vulnerabilities.
Use it for
- Generate fiscal codes for Italian citizens during user registration or identity verification workflows
- Validate or decode existing fiscal codes to extract and verify demographic information
- Batch-process fiscal codes in administrative or tax-related applications
- Integrate fiscal code handling into Italian e-government or compliance systems
- Resolve ambiguous name encodings by retrieving possible first-name candidates from a code
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed under MIT. Install it if you need to work with Italian fiscal codes in Python—whether for encoding, decoding, validation, or integration into Italian administrative systems.
Install
python-codicefiscale on PyPI
Before you install
Low friction install with three lightweight runtime dependencies (python-dateutil, python-fsutil, python-slugify). Active maintenance with a recent release and ongoing repository activity.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects alike.
Quickstart
pip install python-codicefiscale
from codicefiscale import codicefiscale
# Encode
code = codicefiscale.encode(
lastname="Caccamo",
firstname="Fabio",
gender="M",
birthdate="03/04/1985",
birthplace="Torino"
)
# Decode
result = codicefiscale.decode(code)
# Validate
is_valid = codicefiscale.is_valid(code)
Verify before relying
- Whether ANPR data updates occur reliably once per week as described
- Accuracy of the ~60% single-name-match rate for Italian birthplaces in real-world use
- Performance characteristics when processing large batches of codes
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespython-dateutilpython-fsutilpython-slugify |
| Maintenance | Actively maintained 98 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 102,908 / month, #12,837 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Build Tools |
Evidence: python_codicefiscale-0.12.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “italian fiscal code encoder decoder”
- python-codicefiscaleEncodes and decodes Italian fiscal codes (Codice Fiscale), with…
- pylsqpackpylsqpack provides Python Decoder and Encoder objects for reading and…
- json-streamStreams JSON data from files, URLs, or iterators without loading the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also python-stdnum · BrazilFiscalReport · sqids · fiscalyear · sed4onnx · ecoji · rf-protocols · hdx-python-country · bencode.py · ebcdic