python codicefiscale
0.10.3
Python -CodiceFiscale เป็นไลบรารีสำหรับการเข้ารหัส/ถอดรหัสรหัสการคลังอิตาลี - Codifica/decodifica del codice fiscale
NEW
(สัปดาห์ละครั้ง) โดยตรงจากแหล่งข้อมูล ANPRNEW
พร้อมใช้งาน 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
ไลบรารีนี้สามารถใช้เป็นเครื่องมือ CLI สำหรับข้อมูลเพิ่มเติมเรียกใช้:
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
ปล่อยภายใต้ใบอนุญาต MIT
python-benedict
-subclass dict ที่มีการสนับสนุน keylist/keypath, I/O ทางลัด (Base64, CSV, JSON, Pickle, Plist, Query-String, Toml, XML, Yaml) และสาธารณูปโภคมากมาย
python-fontbro
- การดำเนินการแบบอักษรที่เป็นมิตร -
python-fsutil
ยูทิลิตี้ระบบไฟล์สำหรับ devs ขี้เกียจ ?