mrz


Namemrz JSON
Version 0.6.2 PyPI version JSON
download
home_pagehttps://github.com/Arg0s1080/mrz
SummaryMachine readable zone generator and checker for passports, visas, id cards and other travel documents
upload_time2020-08-31 10:50:32
maintainer
docs_urlNone
authorIvan Rincon
requires_python
licenseGPLv3
keywords mrz passports visas id cards td1 td2 td3 mrva mrvb icao
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            MRZ Generator & MRZ Checker
===========================

Description:
------------

Machine Readable Zone generator and checker for official travel
documents sizes 1, 2, 3, MRVA and MRVB (Passports, Visas, national id
cards and other travel documents)

MRZ Generator and MRZ Checker are built according to International Civil
Aviation Organization specifications (ICAO 9303):

-  `Specifications Common to all Machine Readable Travel Documents
   (MRTDs) <https://www.icao.int/publications/Documents/9303_p3_cons_en.pdf>`__
-  `Specifications for Machine Readable Passports
   (MRPs) <https://www.icao.int/publications/Documents/9303_p4_cons_en.pdf>`__
-  `Specifications for TD1 Size Machine Readable Official Travel
   Documents
   (MROTDs) <https://www.icao.int/publications/Documents/9303_p5_cons_en.pdf>`__
-  `Specifications for TD2 Size Machine Readable Official Travel
   Documents
   (MROTDs) <https://www.icao.int/publications/Documents/9303_p6_cons_en.pdf>`__
-  `Specifications for Machine Readable Visas
   (MRV) <https://www.icao.int/publications/Documents/9303_p7_cons_en.pdf>`__

See all 9303 ICAO docs (`البيت العربي <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/Arab/Files_ar.rst>`__, `中文 <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/Chinese/Files_zh.rst>`__, `English <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/English/Files_en.rst>`__, `Français <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/French/Files_fr.rst>`__, `Русский <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/Russian/Files_ru.rst>`__ and `Español <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/Spanish/Files_es.rst>`__)


Fields Distribution of Official Travel Documents:
-------------------------------------------------

.. figure:: https://raw.githubusercontent.com/Arg0s1080/mrz/master/docs/Fields_Distribution.png
   :alt: image

   image

Usage Generator:
----------------

TD1's (id cards):
^^^^^^^^^^^^^^^^^

::

    Params:                      Case insensitive

        document_type    (str):  The first letter shall be 'I', 'A' or 'C'
        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)
        document_number  (str):  Document number
        birth_date       (str):  YYMMDD
        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', "<" or ""
        expiry_date      (str):  YYMMDD
        nationality      (str):  3 letters code (ISO 3166-1) or country name (in English)
        surname          (str):  Holder primary identifier(s). This field will be transliterated
        given_names      (str):  Holder secondary identifier(s). This field will be transliterated
        optional_data1   (str):  Optional personal data at the discretion of the issuing State.
                                 Non-mandatory field. Empty string by default
        optional_data2   (str):  Optional personal data at the discretion of the issuing State.
                                 Non-mandatory field. Empty string by default
        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default
        force           (bool):  Disables checks for country, nationality and document_type fields.
                                 Allows to use 3-letter-codes not included in the countries dictionary
                                 and to use document_type codes without restrictions.


TD2
^^^

::

    Params:                      Case insensitive

        document_type    (str):  The first letter shall be 'I', 'A' or 'C'
        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)
        surname          (str):  Holder primary identifier(s). This field will be transliterated.
        given_names      (str):  Holder secondary identifier(s). This field will be transliterated.
        document_number  (str):  Document number.
        nationality      (str):  3 letters code (ISO 3166-1) or country name
        birth_date       (str):  YYMMDD
        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', "<" or ""
        expiry_date      (str):  YYMMDD
        optional_data    (str):  Optional personal data at the discretion of the issuing State.
                                 Non-mandatory field. Empty string by default
        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default
        force           (bool):  Disables checks for country, nationality and document_type fields.
                                 Allows to use 3-letter-codes not included in the countries dictionary
                                 and to use document_type codes without restrictions.


TD3 (Passports)
^^^^^^^^^^^^^^^

::

    Params:                      Case insensitive

        document_type    (str):  Normally 'P' for passport
        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)
        surname          (str):  Primary identifier(s)
        given_names      (str):  Secondary identifier(s)
        document_number  (str):  Document number
        nationality      (str):  3 letters code (ISO 3166-1) or country name
        birth_date       (str):  YYMMDD
        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', "<" or ""
        expiry_date      (str):  YYMMDD
        optional data    (str):  Personal number. In some countries non-mandatory field. Empty string by default
        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default
        force           (bool):  Disables checks for country, nationality and document_type fields.
                                 Allows to use 3-letter-codes not included in the countries dictionary
                                 and to use document_type codes without restrictions.


MRVA (Visas type A)
^^^^^^^^^^^^^^^^^^^

::

    Params:                      Case insensitive

        document_type    (str):  The First letter must be 'V'
        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)
        surname          (str):  Primary identifier(s)
        given_names      (str):  Secondary identifier(s)
        document_number  (str):  Document number
        nationality      (str):  3 letters code (ISO 3166-1) or country name
        birth_date       (str):  YYMMDD
        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', "<" or ""
        expiry_date      (str):  YYMMDD
        optional_data    (str):  Optional personal data at the discretion of the issuing State.
                                 Non-mandatory field. Empty string by default.
        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default
        force           (bool):  Disables checks for country, nationality and document_type fields.
                                 Allows to use 3-letter-codes not included in the countries dictionary
                                 and to use document_type codes without restrictions.


MRVB (Visas type B)
^^^^^^^^^^^^^^^^^^^

::

    Params:                      Case insensitive

        document_type    (str):  The First letter must be 'V'
        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)
        surname          (str):  Primary identifier(s)
        given_names      (str):  Secondary identifier(s)
        document_number  (str):  Document number
        nationality      (str):  3 letters code (ISO 3166-1) or country name
        birth_date       (str):  YYMMDD
        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', "<" or ""
        expiry_date      (str):  YYMMDD
        optional_data    (str):  Optional personal data at the discretion of the issuing State.
                                 Non-mandatory field. Empty string by default.
        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default
        force           (bool):  Disables checks for country, nationality and document_type fields.
                                 Allows to use 3-letter-codes not included in the countries dictionary
                                 and to use document_type codes without restrictions.


Passport generator example (ICAO9303 Specimen):
'''''''''''''''''''''''''''''''''''''''''''''''

.. figure:: https://raw.githubusercontent.com/Arg0s1080/mrz/master/docs/images/passports/ICAO_Example.png
   :alt: image

   image

TD3CodeGenerator -> str:
''''''''''''''''''''''''

.. code:: python

    from mrz.generator.td3 import TD3CodeGenerator

    code = TD3CodeGenerator("P", "UTO", "Eriksson", "Anna María", "L898902C3", "UTO", "740812", "F", "120415","ZE184226B")

    print(code)

Output:
'''''''

::

    P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<
    L898902C36UTO7408122F1204159ZE184226B<<<<<10

Note: See other uses in `mrz.generator examples folder <https://github.com/Arg0s1080/mrz/tree/master/examples/mrz_generator_samples>`__


Usage Checker:
--------------

TD1's (id cards):
^^^^^^^^^^^^^^^^^

::

    Params:

        mrz_string        (str):  MRZ string of TD1. Must be 90 uppercase characters long (3 lines)
        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the
                                  document is not expired and that expiry_date is not greater than 10 years
        compute_warnings (bool):  If it's set True, warnings compute as False

TD2:
^^^^

::

    Params:

        mrz_string        (str):  MRZ string of TD2. Must be 72 characters long (uppercase) (2 lines)
        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the
                                  document is not expired and that expiry_date is not greater than 10 years
        compute_warnings (bool):  If it's set True, warnings compute as False


TD3 (Passports):
^^^^^^^^^^^^^^^^

::

    Params:

        mrz_string        (str):  MRZ string of TD3. Must be 88 characters long (uppercase) (2 lines)
        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the
                                  document is not expired and that expiry_date is not greater than 10 years
        compute_warnings (bool):  If it's set True, warnings compute as False


MRVA:
^^^^^

::

    Params:

        mrz_string        (str):  MRZ string of Visas type A. Must be 88 characters long (uppercase) (2 lines)
        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the
                                  document is not expired and that expiry_date is not greater than 10 years
        compute_warnings (bool):  If it's set True, warnings compute as False


MRVB:
^^^^^

::

    Params:

        mrz_string        (str):  MRZ string of Visas type B. Must be 72 characters long (uppercase) (2 lines)
        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the
                                  document is not expired and that expiry_date is not greater than 10 years
        compute_warnings (bool):  If it's set True, warnings compute as False


Id Card Checker example
'''''''''''''''''''''''

.. figure:: https://raw.githubusercontent.com/Arg0s1080/mrz/master/docs/images/id_cards/Sweden.png
   :alt: image

   image

TD1CodeChecker -> bool
''''''''''''''''''''''

.. code:: python

    from mrz.checker.td1 import TD1CodeChecker

    check = TD1CodeChecker("I<SWE59000002<8198703142391<<<\n"
                           "8703145M1701027SWE<<<<<<<<<<<8\n"
                           "SPECIMEN<<SVEN<<<<<<<<<<<<<<<<")
    result = bool(check)
    print(result)

Output
''''''

::

    True

Note: See other uses in `mrz.checker examples folder <https://github.com/Arg0s1080/mrz/tree/master/examples/mrz_checker_samples>`__


Fields extraction example (valid for td1, td2, td3 and visas)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

.. code:: python

    from mrz.checker.td1 import TD1CodeChecker, get_country

    td1_check = TD1CodeChecker("IDLIEID98754015<<<<<<<<<<<<<<<\n"
                               "8205122M1906224LIE<<<<<<<<<<<6\n"
                               "OSPELT<BECK<<MARISA<<<<<<<<<<<")

    fields = td1_check.fields()

    print(fields.name, fields.surname)
    print(get_country(fields.country))

Output
''''''

::

    MARISA OSPELT BECK
    Liechtenstein

Note: See other uses in `mrz.checker examples folder <https://github.com/Arg0s1080/mrz/tree/master/examples/mrz_checker_samples>`__ and `this issue <https://github.com/Arg0s1080/mrz/issues/6>`__


Installation:
-------------

From `Pypi repo <https://pypi.org/project/mrz/>`__ (It may not be the latest version):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    pip install mrz 

Cloning this repo (It may not work fine):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    git clone https://github.com/Arg0s1080/mrz.git
    cd mrz
    sudo python3 setup.py install

Features:
---------

-  [x] Transliteration of special Latin characters (acutes, tildes,
   diaeresis, graves, circumflex, etc)
-  [x] Arabic chars transliteration
-  [x] Several variations of Cyrillic added: Serbian, Macedonian,
   Belarusian, Ukrainian and Bulgarian
-  [x] Transliteration of modern Greek (experimental)
-  [x] Transliteration of modern Hebrew (without vowels) (experimental)
-  [x] Generation of the country code from its name in English (Ex.:
   "Netherlands" -> "NLD")
-  [x] Name truncation detection
-  [x] Error report, warnings report and full report in Checker.
-  [x] Possibility that warnings compute as errors using
   compute\_warnings keyword in Checker.
-  [x] Possibility of disabling checks for country code, nationality and
   type of document, allowing to use 3-letter-codes not included in the
   countries dictionary and to use document\_type codes without
   restrictions in Generator.
-  [x] Added new checks for periods of time in Checker.
-  [x] Visas support
-  [x] Fields extraction in checker (name, surname, country, sex, etc)
   (version 0.5.0)

TODO:


-  [ ] Automatic name truncation in Generator
-  [ ] Possibility of disabling checks for country code, nationality,
   type of document and the others fields in Checker.
-  [ ] Add logging



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Arg0s1080/mrz",
    "name": "mrz",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "mrz passports visas id cards td1 td2 td3 mrva mrvb icao",
    "author": "Ivan Rincon",
    "author_email": "ivan.rincon76@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/85/8b/8568edf6c8725675504dcca8e4eac15ea8edb4c397f1e6d1e01d759955e9/mrz-0.6.2.tar.gz",
    "platform": "",
    "description": "MRZ Generator & MRZ Checker\n===========================\n\nDescription:\n------------\n\nMachine Readable Zone generator and checker for official travel\ndocuments sizes 1, 2, 3, MRVA and MRVB (Passports, Visas, national id\ncards and other travel documents)\n\nMRZ Generator and MRZ Checker are built according to International Civil\nAviation Organization specifications (ICAO 9303):\n\n-  `Specifications Common to all Machine Readable Travel Documents\n   (MRTDs) <https://www.icao.int/publications/Documents/9303_p3_cons_en.pdf>`__\n-  `Specifications for Machine Readable Passports\n   (MRPs) <https://www.icao.int/publications/Documents/9303_p4_cons_en.pdf>`__\n-  `Specifications for TD1 Size Machine Readable Official Travel\n   Documents\n   (MROTDs) <https://www.icao.int/publications/Documents/9303_p5_cons_en.pdf>`__\n-  `Specifications for TD2 Size Machine Readable Official Travel\n   Documents\n   (MROTDs) <https://www.icao.int/publications/Documents/9303_p6_cons_en.pdf>`__\n-  `Specifications for Machine Readable Visas\n   (MRV) <https://www.icao.int/publications/Documents/9303_p7_cons_en.pdf>`__\n\nSee all 9303 ICAO docs (`\u0627\u0644\u0628\u064a\u062a \u0627\u0644\u0639\u0631\u0628\u064a <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/Arab/Files_ar.rst>`__, `\u4e2d\u6587 <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/Chinese/Files_zh.rst>`__, `English <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/English/Files_en.rst>`__, `Fran\u00e7ais <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/French/Files_fr.rst>`__, `\u0420\u0443\u0441\u0441\u043a\u0438\u0439 <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/Russian/Files_ru.rst>`__ and `Espa\u00f1ol <https://github.com/Arg0s1080/mrz/tree/master/docs/ICAO9303/Spanish/Files_es.rst>`__)\n\n\nFields Distribution of Official Travel Documents:\n-------------------------------------------------\n\n.. figure:: https://raw.githubusercontent.com/Arg0s1080/mrz/master/docs/Fields_Distribution.png\n   :alt: image\n\n   image\n\nUsage Generator:\n----------------\n\nTD1's (id cards):\n^^^^^^^^^^^^^^^^^\n\n::\n\n    Params:                      Case insensitive\n\n        document_type    (str):  The first letter shall be 'I', 'A' or 'C'\n        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)\n        document_number  (str):  Document number\n        birth_date       (str):  YYMMDD\n        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', \"<\" or \"\"\n        expiry_date      (str):  YYMMDD\n        nationality      (str):  3 letters code (ISO 3166-1) or country name (in English)\n        surname          (str):  Holder primary identifier(s). This field will be transliterated\n        given_names      (str):  Holder secondary identifier(s). This field will be transliterated\n        optional_data1   (str):  Optional personal data at the discretion of the issuing State.\n                                 Non-mandatory field. Empty string by default\n        optional_data2   (str):  Optional personal data at the discretion of the issuing State.\n                                 Non-mandatory field. Empty string by default\n        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default\n        force           (bool):  Disables checks for country, nationality and document_type fields.\n                                 Allows to use 3-letter-codes not included in the countries dictionary\n                                 and to use document_type codes without restrictions.\n\n\nTD2\n^^^\n\n::\n\n    Params:                      Case insensitive\n\n        document_type    (str):  The first letter shall be 'I', 'A' or 'C'\n        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)\n        surname          (str):  Holder primary identifier(s). This field will be transliterated.\n        given_names      (str):  Holder secondary identifier(s). This field will be transliterated.\n        document_number  (str):  Document number.\n        nationality      (str):  3 letters code (ISO 3166-1) or country name\n        birth_date       (str):  YYMMDD\n        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', \"<\" or \"\"\n        expiry_date      (str):  YYMMDD\n        optional_data    (str):  Optional personal data at the discretion of the issuing State.\n                                 Non-mandatory field. Empty string by default\n        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default\n        force           (bool):  Disables checks for country, nationality and document_type fields.\n                                 Allows to use 3-letter-codes not included in the countries dictionary\n                                 and to use document_type codes without restrictions.\n\n\nTD3 (Passports)\n^^^^^^^^^^^^^^^\n\n::\n\n    Params:                      Case insensitive\n\n        document_type    (str):  Normally 'P' for passport\n        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)\n        surname          (str):  Primary identifier(s)\n        given_names      (str):  Secondary identifier(s)\n        document_number  (str):  Document number\n        nationality      (str):  3 letters code (ISO 3166-1) or country name\n        birth_date       (str):  YYMMDD\n        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', \"<\" or \"\"\n        expiry_date      (str):  YYMMDD\n        optional data    (str):  Personal number. In some countries non-mandatory field. Empty string by default\n        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default\n        force           (bool):  Disables checks for country, nationality and document_type fields.\n                                 Allows to use 3-letter-codes not included in the countries dictionary\n                                 and to use document_type codes without restrictions.\n\n\nMRVA (Visas type A)\n^^^^^^^^^^^^^^^^^^^\n\n::\n\n    Params:                      Case insensitive\n\n        document_type    (str):  The First letter must be 'V'\n        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)\n        surname          (str):  Primary identifier(s)\n        given_names      (str):  Secondary identifier(s)\n        document_number  (str):  Document number\n        nationality      (str):  3 letters code (ISO 3166-1) or country name\n        birth_date       (str):  YYMMDD\n        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', \"<\" or \"\"\n        expiry_date      (str):  YYMMDD\n        optional_data    (str):  Optional personal data at the discretion of the issuing State.\n                                 Non-mandatory field. Empty string by default.\n        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default\n        force           (bool):  Disables checks for country, nationality and document_type fields.\n                                 Allows to use 3-letter-codes not included in the countries dictionary\n                                 and to use document_type codes without restrictions.\n\n\nMRVB (Visas type B)\n^^^^^^^^^^^^^^^^^^^\n\n::\n\n    Params:                      Case insensitive\n\n        document_type    (str):  The First letter must be 'V'\n        country_code     (str):  3 letters code (ISO 3166-1) or country name (in English)\n        surname          (str):  Primary identifier(s)\n        given_names      (str):  Secondary identifier(s)\n        document_number  (str):  Document number\n        nationality      (str):  3 letters code (ISO 3166-1) or country name\n        birth_date       (str):  YYMMDD\n        sex              (str):  Genre. Male: 'M', Female: 'F' or Undefined: 'X', \"<\" or \"\"\n        expiry_date      (str):  YYMMDD\n        optional_data    (str):  Optional personal data at the discretion of the issuing State.\n                                 Non-mandatory field. Empty string by default.\n        transliteration (dict):  Transliteration dictionary for non-ascii chars. Latin based by default\n        force           (bool):  Disables checks for country, nationality and document_type fields.\n                                 Allows to use 3-letter-codes not included in the countries dictionary\n                                 and to use document_type codes without restrictions.\n\n\nPassport generator example (ICAO9303 Specimen):\n'''''''''''''''''''''''''''''''''''''''''''''''\n\n.. figure:: https://raw.githubusercontent.com/Arg0s1080/mrz/master/docs/images/passports/ICAO_Example.png\n   :alt: image\n\n   image\n\nTD3CodeGenerator -> str:\n''''''''''''''''''''''''\n\n.. code:: python\n\n    from mrz.generator.td3 import TD3CodeGenerator\n\n    code = TD3CodeGenerator(\"P\", \"UTO\", \"Eriksson\", \"Anna Mar\u00eda\", \"L898902C3\", \"UTO\", \"740812\", \"F\", \"120415\",\"ZE184226B\")\n\n    print(code)\n\nOutput:\n'''''''\n\n::\n\n    P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<\n    L898902C36UTO7408122F1204159ZE184226B<<<<<10\n\nNote: See other uses in `mrz.generator examples folder <https://github.com/Arg0s1080/mrz/tree/master/examples/mrz_generator_samples>`__\n\n\nUsage Checker:\n--------------\n\nTD1's (id cards):\n^^^^^^^^^^^^^^^^^\n\n::\n\n    Params:\n\n        mrz_string        (str):  MRZ string of TD1. Must be 90 uppercase characters long (3 lines)\n        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the\n                                  document is not expired and that expiry_date is not greater than 10 years\n        compute_warnings (bool):  If it's set True, warnings compute as False\n\nTD2:\n^^^^\n\n::\n\n    Params:\n\n        mrz_string        (str):  MRZ string of TD2. Must be 72 characters long (uppercase) (2 lines)\n        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the\n                                  document is not expired and that expiry_date is not greater than 10 years\n        compute_warnings (bool):  If it's set True, warnings compute as False\n\n\nTD3 (Passports):\n^^^^^^^^^^^^^^^^\n\n::\n\n    Params:\n\n        mrz_string        (str):  MRZ string of TD3. Must be 88 characters long (uppercase) (2 lines)\n        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the\n                                  document is not expired and that expiry_date is not greater than 10 years\n        compute_warnings (bool):  If it's set True, warnings compute as False\n\n\nMRVA:\n^^^^^\n\n::\n\n    Params:\n\n        mrz_string        (str):  MRZ string of Visas type A. Must be 88 characters long (uppercase) (2 lines)\n        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the\n                                  document is not expired and that expiry_date is not greater than 10 years\n        compute_warnings (bool):  If it's set True, warnings compute as False\n\n\nMRVB:\n^^^^^\n\n::\n\n    Params:\n\n        mrz_string        (str):  MRZ string of Visas type B. Must be 72 characters long (uppercase) (2 lines)\n        check_expiry     (bool):  If it's set to True, it is verified and reported as warning that the\n                                  document is not expired and that expiry_date is not greater than 10 years\n        compute_warnings (bool):  If it's set True, warnings compute as False\n\n\nId Card Checker example\n'''''''''''''''''''''''\n\n.. figure:: https://raw.githubusercontent.com/Arg0s1080/mrz/master/docs/images/id_cards/Sweden.png\n   :alt: image\n\n   image\n\nTD1CodeChecker -> bool\n''''''''''''''''''''''\n\n.. code:: python\n\n    from mrz.checker.td1 import TD1CodeChecker\n\n    check = TD1CodeChecker(\"I<SWE59000002<8198703142391<<<\\n\"\n                           \"8703145M1701027SWE<<<<<<<<<<<8\\n\"\n                           \"SPECIMEN<<SVEN<<<<<<<<<<<<<<<<\")\n    result = bool(check)\n    print(result)\n\nOutput\n''''''\n\n::\n\n    True\n\nNote: See other uses in `mrz.checker examples folder <https://github.com/Arg0s1080/mrz/tree/master/examples/mrz_checker_samples>`__\n\n\nFields extraction example (valid for td1, td2, td3 and visas)\n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n    from mrz.checker.td1 import TD1CodeChecker, get_country\n\n    td1_check = TD1CodeChecker(\"IDLIEID98754015<<<<<<<<<<<<<<<\\n\"\n                               \"8205122M1906224LIE<<<<<<<<<<<6\\n\"\n                               \"OSPELT<BECK<<MARISA<<<<<<<<<<<\")\n\n    fields = td1_check.fields()\n\n    print(fields.name, fields.surname)\n    print(get_country(fields.country))\n\nOutput\n''''''\n\n::\n\n    MARISA OSPELT BECK\n    Liechtenstein\n\nNote: See other uses in `mrz.checker examples folder <https://github.com/Arg0s1080/mrz/tree/master/examples/mrz_checker_samples>`__ and `this issue <https://github.com/Arg0s1080/mrz/issues/6>`__\n\n\nInstallation:\n-------------\n\nFrom `Pypi repo <https://pypi.org/project/mrz/>`__ (It may not be the latest version):\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n    pip install mrz \n\nCloning this repo (It may not work fine):\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n    git clone https://github.com/Arg0s1080/mrz.git\n    cd mrz\n    sudo python3 setup.py install\n\nFeatures:\n---------\n\n-  [x] Transliteration of special Latin characters (acutes, tildes,\n   diaeresis, graves, circumflex, etc)\n-  [x] Arabic chars transliteration\n-  [x] Several variations of Cyrillic added: Serbian, Macedonian,\n   Belarusian, Ukrainian and Bulgarian\n-  [x] Transliteration of modern Greek (experimental)\n-  [x] Transliteration of modern Hebrew (without vowels) (experimental)\n-  [x] Generation of the country code from its name in English (Ex.:\n   \"Netherlands\" -> \"NLD\")\n-  [x] Name truncation detection\n-  [x] Error report, warnings report and full report in Checker.\n-  [x] Possibility that warnings compute as errors using\n   compute\\_warnings keyword in Checker.\n-  [x] Possibility of disabling checks for country code, nationality and\n   type of document, allowing to use 3-letter-codes not included in the\n   countries dictionary and to use document\\_type codes without\n   restrictions in Generator.\n-  [x] Added new checks for periods of time in Checker.\n-  [x] Visas support\n-  [x] Fields extraction in checker (name, surname, country, sex, etc)\n   (version 0.5.0)\n\nTODO:\n\n\n-  [ ] Automatic name truncation in Generator\n-  [ ] Possibility of disabling checks for country code, nationality,\n   type of document and the others fields in Checker.\n-  [ ] Add logging\n\n\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Machine readable zone generator and checker for passports, visas, id cards and other travel documents",
    "version": "0.6.2",
    "split_keywords": [
        "mrz",
        "passports",
        "visas",
        "id",
        "cards",
        "td1",
        "td2",
        "td3",
        "mrva",
        "mrvb",
        "icao"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "ac1209a9ea6c4b3a9636f13edf7f36aa",
                "sha256": "3da437c095715d9d3fc49b10a684bc2eec3085fed0b197eb23410da4e8d26e4d"
            },
            "downloads": -1,
            "filename": "mrz-0.6.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac1209a9ea6c4b3a9636f13edf7f36aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 69238,
            "upload_time": "2020-08-31T10:50:30",
            "upload_time_iso_8601": "2020-08-31T10:50:30.886595Z",
            "url": "https://files.pythonhosted.org/packages/d1/1e/e4f64575140c7b9c01d7a02f7ef668a9441aaecd3d58370d791ed50a36f6/mrz-0.6.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "43e6d96ea5ed6cb302ec9e44a9d3e7b6",
                "sha256": "54bb3b370ccc371b7fb86c05add8874346e7a86698d8822c4884cb61904ff8ee"
            },
            "downloads": -1,
            "filename": "mrz-0.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "43e6d96ea5ed6cb302ec9e44a9d3e7b6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 31402,
            "upload_time": "2020-08-31T10:50:32",
            "upload_time_iso_8601": "2020-08-31T10:50:32.640116Z",
            "url": "https://files.pythonhosted.org/packages/85/8b/8568edf6c8725675504dcca8e4eac15ea8edb4c397f1e6d1e01d759955e9/mrz-0.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-08-31 10:50:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Arg0s1080",
    "github_project": "mrz",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mrz"
}
        
Elapsed time: 0.01887s