{"id":45932,"library":"python-codicefiscale","title":"python-codicefiscale","description":"A Python library to encode and decode Italian fiscal codes (Codice Fiscale). Current version 0.12.1, with regular maintenance and updates.","status":"active","version":"0.12.1","language":"python","source_language":"en","source_url":"https://github.com/fabiocaccamo/python-codicefiscale","tags":["italian fiscal code","codice fiscale","italy"],"install":[{"cmd":"pip install python-codicefiscale","lang":"bash","label":"install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from codicefiscale import CodiceFiscale","symbol":"encode","correct":"from codicefiscale import encode"},{"symbol":"decode","correct":"from codicefiscale import decode"},{"symbol":"is_valid","correct":"from codicefiscale import is_valid"}],"quickstart":{"code":"from codicefiscale import CodiceFiscale\n\ncf = CodiceFiscale(\n    firstname='Mario',\n    lastname='Rossi',\n    birthdate='1990-01-01',\n    birthplace='Roma',\n    gender='M'\n)\nprint(cf.decode())","lang":"python","description":"Create a CodiceFiscale instance and decode the fiscal code."},"warnings":[{"fix":"Use the Italian name as per official ISTAT code.","message":"The 'birthplace' parameter must be the official Italian comune name (e.g., 'Roma', not 'Rome'). Incorrect birthplace will produce an invalid code.","severity":"gotcha","affected_versions":"all"},{"fix":"Always use 'M' or 'F'.","message":"The 'gender' parameter expects 'M' or 'F' as a string, not boolean or integer. Passing 'male' or 1 will raise an error or produce unexpected behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Convert dates to string using .strftime('%Y-%m-%d') before passing.","message":"Birthdate must be a string in 'YYYY-MM-DD' format. Passing a datetime.date object without converting may cause a TypeError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.12.1':18 'code':13,26 'codic':14,27 'codicefiscal':3 'current':16 'decod':10 'encod':8 'fiscal':12,15,25,28 'itali':29 'italian':11,24 'librari':6 'mainten':21 'python':2,5 'python-codicefiscal':1 'regular':20 'updat':23 'version':17","created_at":"2026-06-07T12:57:26.253563+00:00","updated_at":"2026-06-07T12:57:26.253563+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/fabiocaccamo/python-codicefiscale","github":"https://github.com/fabiocaccamo/python-codicefiscale","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}