GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Blog
  • Docs
  • Log in
  • Register
  • Getting help
  • Installing packages
  • Uploading packages
  • Packaging user guide
  • Infrastructure dashboard
  • Statistics
  • Logos & trademarks
  • Our sponsors
  • Bugs and feedback
  • Contribute on GitHub

This view

  • Original page
  • New address

GeezerVison is showing pypi.org โ€” python-codicefiscale

python-codicefiscale 0.12.1

encode / decode italian fiscal codes - codifica / decodifica del Codice Fiscale italiano.

pip install python-codicefiscale

python-codicefiscale

python-codicefiscale is a library for encode/decode Italian fiscal code - codifica/decodifica del Codice Fiscale.

Codice Fiscale

Features

  • NEW Auto-updated data (once a week) directly from ANPR data-source.
  • NEW Command Line Interface available.
  • Transliteration for name/surname
  • Multiple birthdate formats (date/string) (you can see all the supported string formats here)
  • Automatic birthplace city/foreign-country code detection from name
  • Omocodia support

Installation

pip install python-codicefiscale

Usage

Python

Import

from codicefiscale import codicefiscale

Encode

codicefiscale.encode(
    lastname="Caccamo",
    firstname="Fabio",
    gender="M",
    birthdate="03/04/1985",
    birthplace="Torino",
)

# "CCCFBA85D03L219P"

Decode

codicefiscale.decode("CCCFBA85D03L219P")

# {
#     "code": "CCCFBA85D03L219P",
#     "gender": "M",
#     "birthdate": datetime.datetime(1985, 4, 3, 0, 0),
#     "birthplace": {
#         "name": "TORINO"
#         "province": "TO",
#         "code": "L219",
#     },
#     "firstname_options": [
#         "Fabio",
#     ],
#     "omocodes": [
#         "CCCFBA85D03L219P",
#         "CCCFBA85D03L21VE",
#         "CCCFBA85D03L2MVP",
#         "CCCFBA85D03LNMVE",
#         "CCCFBA85D0PLNMVA",
#         "CCCFBA85DLPLNMVL",
#         "CCCFBA8RDLPLNMVX",
#         "CCCFBAURDLPLNMVU",
#     ],
#     "raw": {
#         "code": "CCCFBA85D03L219P",
#         "lastname": "CCC",
#         "firstname": "FBA",
#         "birthdate": "85D03",
#         "birthdate_year": "85"
#         "birthdate_month": "D",
#         "birthdate_day": "03",
#         "birthplace": "L219",
#         "cin": "P",
#     },
# }

Tip

Name suggestions: The firstname_options field contains a list of possible first names matching the encoded firstname code. For Italian birthplaces, in approximately 60% of cases, it returns a single name, providing near-certain identification. In other cases, it returns a list of possible names. For foreign birthplaces, the list is empty.

Check

codicefiscale.is_valid("CCCFBA85D03L219P")

# True
codicefiscale.is_omocode("CCCFBA85D03L219P")

# False

Command Line

Caution

If sensitive data is written to a log entry it could be exposed to an attacker who gains access to the logs.

This library can be used also as a CLI tool, for more info run:

python -m codicefiscale --help

Encode (CLI)

python -m codicefiscale encode --firstname Fabio --lastname Caccamo --gender M --birthdate 03/04/1985 --birthplace Torino

Decode (CLI)

python -m codicefiscale decode CCCFBA85D03L219P

Testing

# clone repository
git clone https://github.com/fabiocaccamo/python-codicefiscale.git && cd python-codicefiscale

# create virtualenv and activate it
python -m venv venv && . venv/bin/activate

# upgrade pip
python -m pip install --upgrade pip

# install requirements
pip install -r requirements.txt -r requirements-test.txt

# install pre-commit to run formatters and linters
pre-commit install --install-hooks

# run tests using tox
tox

# or run tests using pytest
pytest

License

Released under MIT License.


Supporting

  • โญ Star this project on GitHub
  • :octocat: Follow me on GitHub
  • ๐Ÿ’™ Follow me on Bluesky
  • ๐Ÿ’ฐ Sponsor me on Github

See also

  • python-benedict - dict subclass with keylist/keypath support, I/O shortcuts (base64, csv, json, pickle, plist, query-string, toml, xml, yaml) and many utilities. ๐Ÿ“˜

  • python-fontbro - friendly font operations. ๐Ÿงข

  • python-fsutil - file-system utilities for lazy devs. ๐ŸงŸโ€โ™‚๏ธ

Project links

Data verified by PyPI on May 8, 2026
Data provided by the project maintainers, verified at the time the release was uploaded to PyPI.
  • Documentation
  • Download
  • Homepage
  • Issues
  • Funding
  • Twitter

Key dates

PyPI data
Data sourced directly from PyPI's database.
  • Released: May 8, 2026
Latest release

1 maintainer

PyPI data
Data sourced directly from PyPI's database.
Avatar for fabiocaccamo from gravatar.com fabiocaccamo

Credits

Data verified by PyPI on May 8, 2026
Data provided by the project maintainers, verified at the time the release was uploaded to PyPI. Confirms that the provided email matches a verified, public email address on a PyPI user account associated with the project.

Author/Maintainer: Fabio Caccamo

GitHub Statistics

Data verified by PyPI on May 8, 2026
The GitHub source repository was provided by the project maintainers and verified by PyPI at the time of upload. Stars, forks, and open issues/PRs are derived from that repository and have not been independently verified.
  • Repository
  • Stars:
  • Forks:
  • Open issues:
  • Open PRs:

Provenance

Data verified by PyPI on May 8, 2026
Data provided by the project maintainers and verified by PyPI at the time of upload.

Full provenance

Both files in this release have provenance metadata.

View provenance details

License

MIT License (MIT License)

Tags

codicefiscale codice fiscale cf fiscal code italia italy

Classifiers

  • Development Status
    • 5 - Production/Stable
  • Environment
    • Web Environment
  • Intended Audience
    • Developers
  • License
    • OSI Approved :: MIT License
  • Natural Language
    • English
  • Operating System
    • OS Independent
  • Programming Language
    • Python :: 3
    • Python :: 3.10
    • Python :: 3.11
    • Python :: 3.12
    • Python :: 3.13
    • Python :: 3.14
    • Python :: Implementation :: PyPy
  • Topic
    • Software Development :: Build Tools

Metadata

Project links

Data verified by PyPI on May 8, 2026
Data provided by the project maintainers, verified at the time the release was uploaded to PyPI.
  • Documentation
  • Download
  • Homepage
  • Issues
  • Funding
  • Twitter

Key dates

PyPI data
Data sourced directly from PyPI's database.
  • Released: May 8, 2026
Latest release

1 maintainer

PyPI data
Data sourced directly from PyPI's database.
Avatar for fabiocaccamo from gravatar.com fabiocaccamo

Credits

Data verified by PyPI on May 8, 2026
Data provided by the project maintainers, verified at the time the release was uploaded to PyPI. Confirms that the provided email matches a verified, public email address on a PyPI user account associated with the project.

Author/Maintainer: Fabio Caccamo

GitHub Statistics

Data verified by PyPI on May 8, 2026
The GitHub source repository was provided by the project maintainers and verified by PyPI at the time of upload. Stars, forks, and open issues/PRs are derived from that repository and have not been independently verified.
  • Repository
  • Stars:
  • Forks:
  • Open issues:
  • Open PRs:

Provenance

Data verified by PyPI on May 8, 2026
Data provided by the project maintainers and verified by PyPI at the time of upload.

Full provenance

Both files in this release have provenance metadata.

View provenance details

License

MIT License (MIT License)

Tags

codicefiscale codice fiscale cf fiscal code italia italy

Classifiers

  • Development Status
    • 5 - Production/Stable
  • Environment
    • Web Environment
  • Intended Audience
    • Developers
  • License
    • OSI Approved :: MIT License
  • Natural Language
    • English
  • Operating System
    • OS Independent
  • Programming Language
    • Python :: 3
    • Python :: 3.10
    • Python :: 3.11
    • Python :: 3.12
    • Python :: 3.13
    • Python :: 3.14
    • Python :: Implementation :: PyPy
  • Topic
    • Software Development :: Build Tools

Release files for python-codicefiscale 0.12.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-codicefiscale 0.12.1
File Size Uploaded Provenance Actions
python_codicefiscale-0.12.1.tar.gz 428.2 kB May 8, 2026 With provenance Details for python_codicefiscale-0.12.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-codicefiscale 0.12.1
File Interpreter ABI Platform Actions Reset
python_codicefiscale-0.12.1-py3-none-any.whl 437.9 kB May 8, 2026 With provenance Python 3 none any Details for python_codicefiscale-0.12.1-py3-none-any.whl

Total release size: 866.1 kB

Release files / python_codicefiscale-0.12.1.tar.gz

Download URL python_codicefiscale-0.12.1.tar.gz
Size 428.2 kB
Tags Source
SHA-256 checksum
How to use checksums
80ade613229d9e7ca4983c26c81bd680982862b089e205c3ee157a292f675610
BLAKE2b-256 checksum
How to use checksums
8939a7ae8d4dac5523867ad613910d02b40e0bd70e7d8ec91c7ad27b1b7ed978
Upload date May 8, 2026
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log
Identity
Publishing platform
GitHub Actions
Publishing repository
github.com/fabiocaccamo/python-codicefiscale
Publishing commit
github.com/fabiocaccamo/python-codicefiscale/tree/df572b3d1d91a6001f742f5e474da0bf5f29c992
Workflow
Publishing configuration
github.com/fabiocaccamo/python-codicefiscale/blob/df572b3d1d91a6001f742f5e474da0bf5f29c992/.github/workflows/create-release.yml
Publishing logs
github.com/fabiocaccamo/python-codicefiscale/actions/runs/25546496743/attempts/1
Artifact
Subject
python_codicefiscale-0.12.1.tar.gz
SHA-256 checksum
80ade613229d9e7ca4983c26c81bd680982862b089e205c3ee157a292f675610 Verifying attestations

Release files / python_codicefiscale-0.12.1-py3-none-any.whl

Download URL python_codicefiscale-0.12.1-py3-none-any.whl
Size 437.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
403f029ce8a184650d969ef0eb604b3457128dff4b057de1ee40a56f0674733d
BLAKE2b-256 checksum
How to use checksums
3f8a4ed178574008c87a78927915a6eb956e5668af855ca0c795e499b425a746
Upload date May 8, 2026
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log
Identity
Publishing platform
GitHub Actions
Publishing repository
github.com/fabiocaccamo/python-codicefiscale
Publishing commit
github.com/fabiocaccamo/python-codicefiscale/tree/df572b3d1d91a6001f742f5e474da0bf5f29c992
Workflow
Publishing configuration
github.com/fabiocaccamo/python-codicefiscale/blob/df572b3d1d91a6001f742f5e474da0bf5f29c992/.github/workflows/create-release.yml
Publishing logs
github.com/fabiocaccamo/python-codicefiscale/actions/runs/25546496743/attempts/1
Artifact
Subject
python_codicefiscale-0.12.1-py3-none-any.whl
SHA-256 checksum
403f029ce8a184650d969ef0eb604b3457128dff4b057de1ee40a56f0674733d Verifying attestations

Security for python-codicefiscale 0.12.1

Report project as malware

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files
No files match the current filters. Reset filters

Attestation for python_codicefiscale-0.12.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log
Identity
Publishing platform
GitHub Actions
Publishing repository
github.com/fabiocaccamo/python-codicefiscale
Publishing commit
github.com/fabiocaccamo/python-codicefiscale/tree/df572b3d1d91a6001f742f5e474da0bf5f29c992
Workflow
Publishing configuration
github.com/fabiocaccamo/python-codicefiscale/blob/df572b3d1d91a6001f742f5e474da0bf5f29c992/.github/workflows/create-release.yml
Publishing logs
github.com/fabiocaccamo/python-codicefiscale/actions/runs/25546496743/attempts/1
Artifact
Subject
python_codicefiscale-0.12.1.tar.gz
SHA-256 checksum
80ade613229d9e7ca4983c26c81bd680982862b089e205c3ee157a292f675610 Verifying attestations

Attestation for python_codicefiscale-0.12.1-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log
Identity
Publishing platform
GitHub Actions
Publishing repository
github.com/fabiocaccamo/python-codicefiscale
Publishing commit
github.com/fabiocaccamo/python-codicefiscale/tree/df572b3d1d91a6001f742f5e474da0bf5f29c992
Workflow
Publishing configuration
github.com/fabiocaccamo/python-codicefiscale/blob/df572b3d1d91a6001f742f5e474da0bf5f29c992/.github/workflows/create-release.yml
Publishing logs
github.com/fabiocaccamo/python-codicefiscale/actions/runs/25546496743/attempts/1
Artifact
Subject
python_codicefiscale-0.12.1-py3-none-any.whl
SHA-256 checksum
403f029ce8a184650d969ef0eb604b3457128dff4b057de1ee40a56f0674733d Verifying attestations

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.12.1 This release

May 8, 2026 2 release files Full provenance

0.12.0

Apr 17, 2026 2 release files Full provenance

0.11.4

Apr 12, 2026 2 release files Full provenance

0.11.3

Jan 16, 2026 2 release files Full provenance

0.11.2

Jan 8, 2026 2 release files Full provenance

0.11.1

Jan 7, 2026 2 release files Full provenance

0.11.0

Dec 10, 2025 2 release files Full provenance

0.10.4

Aug 26, 2025 2 release files Full provenance

0.10.3

Sep 30, 2024 2 release files No provenance

0.10.2

Sep 20, 2024 2 release files No provenance

0.10.1

Jun 6, 2024 2 release files No provenance

0.10.0

Feb 19, 2024 2 release files No provenance

0.9.1

Feb 15, 2024 2 release files No provenance

0.9.0

Nov 6, 2023 2 release files No provenance

0.8.2

Oct 2, 2023 2 release files No provenance

0.8.1

Sep 5, 2023 2 release files No provenance

0.8.0

Apr 8, 2023 2 release files No provenance

0.7.1

Mar 30, 2023 2 release files No provenance

0.7.0

Mar 27, 2023 2 release files No provenance

0.6.1

Jan 12, 2023 2 release files No provenance

0.6.0

Dec 9, 2022 2 release files No provenance

0.5.0

Sep 26, 2022 2 release files No provenance

0.4.0

Feb 17, 2022 2 release files No provenance

0.3.9

Jan 27, 2022 2 release files No provenance

0.3.8

Jan 10, 2022 2 release files No provenance

0.3.7

Dec 18, 2019 2 release files No provenance

0.3.6

Nov 15, 2019 2 release files No provenance

0.3.5

Jul 4, 2019 2 release files No provenance

0.3.4

Feb 7, 2019 1 release file No provenance

0.3.3

Nov 14, 2018 1 release file No provenance

0.3.2

Sep 17, 2018 1 release file No provenance

0.3.1

May 3, 2018 1 release file No provenance

0.3.0

Nov 6, 2017 1 release file No provenance

0.2.1

Oct 18, 2017 1 release file No provenance

0.2.0

Oct 17, 2017 1 release file No provenance

0.1.1

Oct 12, 2017 1 release file No provenance

0.1.0

Oct 10, 2017 1 release file No provenance

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.