codicefiscale


Namecodicefiscale JSON
Version 0.9 PyPI version JSON
download
home_pagehttps://github.com/ema/pycodicefiscale
SummaryPython library for Italian fiscal code (codicefiscale)
upload_time2016-01-10 16:32:36
maintainerNone
docs_urlNone
authorEmanuele Rocca
requires_pythonNone
licenseLGPL
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            Python library for Italian fiscal code

codicefiscale is a Python library for working with Italian fiscal code numbers
officially known as Italy's Codice Fiscale.

Copyright (C) 2009-2016 Emanuele Rocca

Homepage: https://github.com/ema/pycodicefiscale

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA


codicefiscale Module Documentation
==================================

A quick example
---------------
>>> import datetime
>>> from codicefiscale import build
>>>
>>> build('Rocca', 'Emanuele', datetime.datetime(1983, 11, 18), 'M', 'D969')
'RCCMNL83S18D969H'

Module Contents
---------------
``build(surname, name, birthday, sex, municipality) -> string``

    Computes the fiscal code for the given person data.

    eg: build('Rocca', 'Emanuele', datetime.datetime(1983, 11, 18), 'M', 'D969') 
        -> RCCMNL83S18D969H
    


``control_code(input_string) -> int``

    Computes the control code for the given input_string string. The expected
    input_string is the first 15 characters of a fiscal code.

    eg: control_code('RCCMNL83S18D969') -> 'H'
    


``get_birthday(code) -> string``

    Birthday of the person whose fiscal code is 'code', in the format DD-MM-YY. 

    Unfortunately it's not possible to guess the four digit birth year, given
    that the Italian fiscal code uses only the last two digits (1983 -> 83).
    Therefore, this function returns a string and not a datetime object.

    eg: birthday('RCCMNL83S18D969H') -> 18-11-83
    


``get_sex(code) -> string``

    The sex of the person whose fiscal code is 'code'.

    eg: sex('RCCMNL83S18D969H') -> 'M'
        sex('CNTCHR83T41D969D') -> 'F'
    


``isvalid(code) -> bool``

    This function checks if the given fiscal code is syntactically valid.

    eg: isvalid('RCCMNL83S18D969H') -> True
        isvalid('RCCMNL83S18D969') -> False
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ema/pycodicefiscale",
    "name": "codicefiscale",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Emanuele Rocca",
    "author_email": "ema@linux.it",
    "download_url": "https://files.pythonhosted.org/packages/8b/e5/53863848e12ff6a13651cddcc83a8df5fccc8b87bd8fae836ce2f763b534/codicefiscale-0.9.tar.gz",
    "platform": "UNKNOWN",
    "description": "Python library for Italian fiscal code\n\ncodicefiscale is a Python library for working with Italian fiscal code numbers\nofficially known as Italy's Codice Fiscale.\n\nCopyright (C) 2009-2016 Emanuele Rocca\n\nHomepage: https://github.com/ema/pycodicefiscale\n\nThis library is free software; you can redistribute it and/or\nmodify it under the terms of the GNU Lesser General Public\nLicense as published by the Free Software Foundation; either\nversion 2.1 of the License, or (at your option) any later version.\n\nThis library is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this library; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n\ncodicefiscale Module Documentation\n==================================\n\nA quick example\n---------------\n>>> import datetime\n>>> from codicefiscale import build\n>>>\n>>> build('Rocca', 'Emanuele', datetime.datetime(1983, 11, 18), 'M', 'D969')\n'RCCMNL83S18D969H'\n\nModule Contents\n---------------\n``build(surname, name, birthday, sex, municipality) -> string``\n\n    Computes the fiscal code for the given person data.\n\n    eg: build('Rocca', 'Emanuele', datetime.datetime(1983, 11, 18), 'M', 'D969') \n        -> RCCMNL83S18D969H\n    \n\n\n``control_code(input_string) -> int``\n\n    Computes the control code for the given input_string string. The expected\n    input_string is the first 15 characters of a fiscal code.\n\n    eg: control_code('RCCMNL83S18D969') -> 'H'\n    \n\n\n``get_birthday(code) -> string``\n\n    Birthday of the person whose fiscal code is 'code', in the format DD-MM-YY. \n\n    Unfortunately it's not possible to guess the four digit birth year, given\n    that the Italian fiscal code uses only the last two digits (1983 -> 83).\n    Therefore, this function returns a string and not a datetime object.\n\n    eg: birthday('RCCMNL83S18D969H') -> 18-11-83\n    \n\n\n``get_sex(code) -> string``\n\n    The sex of the person whose fiscal code is 'code'.\n\n    eg: sex('RCCMNL83S18D969H') -> 'M'\n        sex('CNTCHR83T41D969D') -> 'F'\n    \n\n\n``isvalid(code) -> bool``\n\n    This function checks if the given fiscal code is syntactically valid.\n\n    eg: isvalid('RCCMNL83S18D969H') -> True\n        isvalid('RCCMNL83S18D969') -> False",
    "bugtrack_url": null,
    "license": "LGPL",
    "summary": "Python library for Italian fiscal code (codicefiscale)",
    "version": "0.9",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "b9d1b95ab666c65235f686dc925b9b76",
                "sha256": "8caefa74a5bef476d4155ef889f6ecee84756a18fd7c9ca54d9a4470f74af3bb"
            },
            "downloads": -1,
            "filename": "codicefiscale-0.9-py2.7.egg",
            "has_sig": false,
            "md5_digest": "b9d1b95ab666c65235f686dc925b9b76",
            "packagetype": "bdist_egg",
            "python_version": "2.7",
            "requires_python": null,
            "size": 7655,
            "upload_time": "2016-01-10T16:33:11",
            "upload_time_iso_8601": "2016-01-10T16:33:11.425259Z",
            "url": "https://files.pythonhosted.org/packages/4c/71/54a81e41132984e0d5eec5c28646a34ad517306cbc62bb333d613be20212/codicefiscale-0.9-py2.7.egg",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "a3516fe5519f0c076afa87ddff9e4dd9",
                "sha256": "d2e7b20576fabdf51379e43c42bfefed842b61c71186f5b8776f43f3970b6a4d"
            },
            "downloads": -1,
            "filename": "codicefiscale-0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "a3516fe5519f0c076afa87ddff9e4dd9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3904,
            "upload_time": "2016-01-10T16:32:36",
            "upload_time_iso_8601": "2016-01-10T16:32:36.845514Z",
            "url": "https://files.pythonhosted.org/packages/8b/e5/53863848e12ff6a13651cddcc83a8df5fccc8b87bd8fae836ce2f763b534/codicefiscale-0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2016-01-10 16:32:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ema",
    "github_project": "pycodicefiscale",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "codicefiscale"
}
        
Elapsed time: 0.04193s