Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
python-codicefiscale
Advanced tools
encode / decode italian fiscal codes - codifica / decodifica del Codice Fiscale italiano.
python-codicefiscale is a library for encode/decode Italian fiscal code - codifica/decodifica del Codice Fiscale.
NEW
Auto-updated data (once a week) directly from ANPR data-source.NEW
Command Line Interface available.pip install python-codicefiscale
from codicefiscale import codicefiscale
codicefiscale.encode(
lastname="Caccamo",
firstname="Fabio",
gender="M",
birthdate="03/04/1985",
birthplace="Torino",
)
# "CCCFBA85D03L219P"
codicefiscale.decode("CCCFBA85D03L219P")
# {
# "code": "CCCFBA85D03L219P",
# "gender": "M",
# "birthdate": datetime.datetime(1985, 4, 3, 0, 0),
# "birthplace": {
# "name": "TORINO"
# "province": "TO",
# "code": "L219",
# },
# "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",
# },
# }
codicefiscale.is_valid("CCCFBA85D03L219P")
# True
codicefiscale.is_omocode("CCCFBA85D03L219P")
# False
This library can be used also as a CLI tool, for more info run:
python -m codicefiscale --help
python -m codicefiscale encode --firstname Fabio --lastname Caccamo --gender M --birthdate 03/04/1985 --birthplace Torino
python -m codicefiscale decode CCCFBA85D03L219P
# 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 unittest
python -m unittest tests.tests
Released under MIT License.
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. 🧟♂️
FAQs
encode / decode italian fiscal codes - codifica / decodifica del Codice Fiscale italiano.
We found that python-codicefiscale demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.