python-stdnum-1.2/0000755000000000000000000000000012606445507014154 5ustar rootroot00000000000000python-stdnum-1.2/getiban.py0000755000000000000000000000551012606424374016142 0ustar rootroot00000000000000#!/usr/bin/env python # getiban.py - script to donwload and parse data from the IBAN registry # # Copyright (C) 2011-2015 Arthur de Jong # # 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 """This script downloads data from SWIFT (the Society for Worldwide Interbank Financial Telecommunication which is the official IBAN registrar) to get the data needed to correctly parse and validate IBANs.""" import csv import urllib # The place where the current version of IBAN_Registry.txt can be downloaded. download_url = 'http://www.swift.com/dsp/resources/documents/IBAN_Registry.txt' def clean_row(row): """Clean up a read row from the CSV file.""" stripit = ' \t\n\r;:\'"' return dict( (k.strip(stripit).lower(), v.strip(stripit)) for k, v in row.items()) def get_country_codes(line): """Return the list of country codes this line has.""" # simplest case first if len(line['country code as defined in iso 3166']) == 2: return [line['country code as defined in iso 3166']] # fall back to parsing the IBAN structure return [x.strip()[:2] for x in line['iban structure'].split(',')] def parse(f): """Parse the specified file.""" print '# generated from IBAN_Registry.txt, downloaded from' print '# %s' % download_url for row in csv.DictReader(f, delimiter='\t', quotechar='"'): row = clean_row(row) bban = row['bban structure'] if not(bban) or bban.lower() == 'not in use': bban = row['iban structure'] for cc in get_country_codes(row): if bban.startswith(cc + '2!n'): bban = bban[5:] # print country line print '%s country="%s" bban="%s"' % ( cc, row['name of country'], bban.replace(' ', '')) # TODO: some countries have a fixed check digit value # TODO: some countries have extra check digits # TODO: use "Bank identifier position within the BBAN" field # to add labels to the ranges (Bank identifier and Branch # Identifier) if __name__ == '__main__': #f = open('IBAN_Registry.txt', 'r') f = urllib.urlopen(download_url) parse(f) python-stdnum-1.2/setup.py0000755000000000000000000000502012606445152015662 0ustar rootroot00000000000000#!/usr/bin/env python # setup.py - python-stdnum installation script # # Copyright (C) 2010-2015 Arthur de Jong # # 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 """python-stdnum installation script.""" import os import sys from setuptools import setup, find_packages import stdnum # fix permissions for sdist if 'sdist' in sys.argv: os.system('chmod -R a+rX .') os.umask(int('022', 8)) setup(name='python-stdnum', version=stdnum.__version__, description='Python module to handle standardized numbers and codes', long_description=stdnum.__doc__, author='Arthur de Jong', author_email='arthur@arthurdejong.org', url='http://arthurdejong.org/python-stdnum/', license='LGPL', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: Financial and Insurance Industry', 'Intended Audience :: Information Technology', 'Intended Audience :: Telecommunications Industry', 'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Office/Business :: Financial', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Text Processing :: General', ], packages=find_packages(), package_data={'': ['*.dat']}, extras_require={ 'VIES': ['suds'], 'VIES-ALT': ['PySimpleSOAP'], }, ) python-stdnum-1.2/tests/0000755000000000000000000000000012606445507015316 5ustar rootroot00000000000000python-stdnum-1.2/tests/test_verhoeff.doctest0000644000000000000000000000366712154625050021553 0ustar rootroot00000000000000test_verhoeff.doctest - more detailed doctests for stdnum.verhoeff module Copyright (C) 2010, 2011, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.verhoeff module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import verhoeff These are normal variations that should just work. Calculating checksums: >>> verhoeff.checksum('654') 1 >>> verhoeff.checksum('1428570') 0 >>> verhoeff.checksum('398438246238642378648236487236482734') 3 The same numbers but now simply ask for validation: >>> verhoeff.validate('654') Traceback (most recent call last): ... InvalidChecksum: ... >>> verhoeff.validate('1428570') '1428570' >>> verhoeff.validate('398438246238642378648236487236482734') Traceback (most recent call last): ... InvalidChecksum: ... Adding a check digit to the numbers so they are all valid: >>> verhoeff.calc_check_digit('654') '8' >>> verhoeff.validate('6548') '6548' >>> verhoeff.calc_check_digit('1428570') '8' >>> verhoeff.validate('1428570') '1428570' >>> verhoeff.calc_check_digit('398438246238642378648236487236482734') '7' >>> verhoeff.validate('3984382462386423786482364872364827347') '3984382462386423786482364872364827347' python-stdnum-1.2/tests/test_luhn.doctest0000644000000000000000000000354612154625043020713 0ustar rootroot00000000000000test_luhn.doctest - more detailed doctests for stdnum.luhn module Copyright (C) 2010, 2011, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.luhn module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import luhn These are normal variations that should just work. Calculating checksums: >>> luhn.checksum('4992739871') 9 >>> luhn.checksum('490154203237518') 0 >>> luhn.checksum('abcdefe', alphabet='abcdef') 0 The same numbers but now simply ask for validation: >>> luhn.validate('4992739871') Traceback (most recent call last): ... InvalidChecksum: ... >>> luhn.validate('490154203237518') '490154203237518' >>> luhn.validate('abcdefe', alphabet='abcdef') 'abcdefe' Adding a check digit to the numbers so they are all valid: >>> luhn.calc_check_digit('4992739871') '6' >>> luhn.validate('49927398716') '49927398716' >>> luhn.calc_check_digit('142857') '2' >>> luhn.validate('1428572') '1428572' >>> luhn.calc_check_digit('398438246238642378648236487236482734') '7' >>> luhn.validate('3984382462386423786482364872364827347') '3984382462386423786482364872364827347' python-stdnum-1.2/tests/test_ru_inn.doctest0000644000000000000000000000302212601744732021230 0ustar rootroot00000000000000test_ru_inn.doctest - more detailed doctests for the stdnum.ru.inn module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.ru.inn module. It tries to validate a number of numbers that have been found online. >>> from stdnum.ru import inn >>> from stdnum.exceptions import * These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 005826107187 ... 0108003670 ... 0273074555 ... 0279111370 ... 0716007984 ... 5190187770 ... 6223002330 ... 6440019934 ... 6672238301 ... 6903022126 ... 6908012650 ... 6911001698 ... 7609000881 ... 7709442668 ... 7716450028 ... 7724051595 ... 7726485118 ... 7727705694 ... 7728127936 ... 7813045547 ... 7825498171 ... 8614008550 ... 8906008726 ... 8906008740 ... ... ''' >>> [x for x in numbers.splitlines() if x and not inn.is_valid(x)] [] python-stdnum-1.2/tests/test_robustness.doctest0000644000000000000000000000244212154625047022152 0ustar rootroot00000000000000test_robustness.doctest - test is_valid() functions to not break Copyright (C) 2011, 2012 Arthur de Jong 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 This file contains some tests for modules in the stdnum package to check whether all provided is_valid() functions can handle clearly invalid junk. >>> testvalues = ( None, '*&^%$', '', 0, False, object(), 'Q', 'QQ', '3') >>> from stdnum.util import get_number_modules Go over each module and try every value. >>> badmodules = [] >>> for mod in get_number_modules(): ... results = [ x for x in testvalues if mod.is_valid(x) != False ] ... if results: ... print(mod.__name__, results) python-stdnum-1.2/tests/test_markit_red6.doctest0000644000000000000000000000612612606037304022150 0ustar rootroot00000000000000Markit Red6 BB347Q 04A988 TT594F GG6EBT FF667M GPF79N GPF79N FG25BN GOA33D 2H66B7 2BB7DV 28EFBV 4DEC96 DI535D 5EB8D8 GMB517 7I568A FMD67C GNC59O GNDF9A 7FDC9O 8D8575 RZC53W DLA7AK 8F7339 HOB65N 8FDBC7 FO96DD WY7EBJ 8GB53A FKDFG6 GPGFFQ GPHAA6 NP4897 4F16FD 48DGFE 8D8575 FF1AAK 1C145A GI9F8T NQ48AB DG48AB GKDHCE NTBEFL FMDCAQ FNC9BR FNC9BR W4FCDX 8E831M DLCCCO 9A6979 GPCA8F GG49CQ TT58BN XX891M GJ476R NP29D8 GL501U ELA9CI NUED68 XC859Y FOHB91 LL332J TU9F9X HI5CC7 3J78MG FJBDFF GL86AK 555DE7 XD79FA X2CB9K X2CB9K 6FC9LG 7CEFDA DLBCG0 9AAA47 0A477B 006DC9 007GB6 NN2A8F 0B11AH 0B11AI DD359M 0C3368 EE475E 037CDU 0E996B 05A75U DD6837 0H99A3 0H99B7 DE111Q 05AB84 1C148C GH6DA2 FG4CAM FG554O 16B9CT FG872C HK7D9F 2C48D6 DE7C9Q 2F999Z DEAB47 2H66BC 2H767T DF6DAH TW8A7X FHBD4H DF796P 2BB8B1 GJ57CT XZBGF7 EJ9DCN 2BBAEJ FF4D97 467A5U HLBDEM EK77AV GKB89Z 4J8456 4AC86D GL731F FK976O 5F04AD NS517V NR6BGI NTFGGO FG29CJ DI537C 5F2685 GLDABF DI8CFE 687DNG GM9ACP 6A516F FLEECZ 7H5516 NU923F GNBDCO EMCDAT 7ECCF9 7BDGCJ GNEDEU F8128F 8A87AG FND50F 8B787A 8E7113 8EFEDF 8F876A T2B9EF 8FGCBA 8FGD7T 8FGD80 W5EDH9 8G96CC FK9A9I 994BFC 9A442R W5GGHN 9BAD68 FOGGHN 9BADC3 9BAEC8 9GEFFB HQHEFU 9BAGDB 2D17E8 X3DGB7 3E9829 HK5754 4G5657 NU811I TU29GI TU29GI EF2985 EF2985 EFAGG9 EFAGG9 TYA56D TYA56D FH49GG GLA88B Markit Red6 9B48AA 115CCB XA78EO 8B9825 9J0135 7FB37H 9A18EC 4A88DE 4AB951 8CA965 7AA999 0F77EA 0F77EA BC236K BC236K 17EGE9 786B9B 1AE857 7A4112 NRCDE0 NRCDE0 9A17DE 9A17DE 3AB549 3AB549 3I68EE 3I68EE Markit Red6 0A8985 014B98 027D97 028EFB 0A3576 0F9733 08CAD7 09C9BK 09GECK 1C8747 1F445B 1F444H 15DA2S 136CDC 2C5899 2F664B 25A8AD 3D233R 3H98A7 38E96G 8FG91K 39FF84 3A978M 4E6837 4A615A 4BFB9C 5F78AG 5H865C 59A97B 5AB77V 5C88BC 5DB667 5EA6BX 6I209O 69CCBK 6B634B 6BABCA 6FE77J 7J68BG 7B774X 7B9DFM 27CFED 7F8168 8AAG87 8C8BB5 8DAE9A 8FD73G 8GB4AI 09G725 2I6597 39ABD6 457B66 47A77D 6B5122 7FBADA 8GHDBF 9J26DD 9AAA4I 9BBA6K 9F9652 9GAB9H 9HC533 GPHABP 4I517N 2C375K UB78A0 9J143F 0A4848 0C4291 027A8A 0D4278 03AB52 0E69A8 0A226X 0F8665 058B87 06DG91 0H8994 07AAAI 09G715 1B123T 1B124A 1C1134 1D39HN 138DAS 1E786B 1E99BR 1F55D7 1F79BD 15DA35 16BCFO 17CDCH 137A59 1I99CW 2C033N 225DGF 228A7H 2E6448 138A48 138CBK 2G58AI 2G85AI 26B72T 2H68GV 2H99EY 27CBAF 28A85G 2I9887 29EB75 2BB755 2BB9AU 28EGCE 3D177O 36AGC5 38BD8L 3J758C 3A7367 3BA5BG 5F07CP 4E455P 46AA59 47BD67 49BEEC 49EB20 4DD8AX 4DD9A5 4DD9BH 5F027A 5I759F 58CHB3 5J4466 59CEC7 5A78DD 5C8A93 5D8148 UZDD52 669B27 68BEBE 69AB75 6B874U 6BADC8 6CCE9H 6D737A 6E86CB 6E9AAA 6FD738 7I8789 7B7589 7B8752 7BCB7P 7CA622 7D7884 7FB89D 7FEB65 8J332L 897ED6 8DA533 8GB523 0C2002 09A8GG 1I8355 4H57DH 5F1148 7B6989 8A677C 8F9794 8HD58L 279AEF 9FFD9C 8GFA5L 8GFA48 8HCBB3 997F99 9A2443 9A456T 9A4C93 9A9A24 9B579L 9B7A8S 9BB947 9C4256 GPE58H 9HGCDH 27CCAE 6B67AL 9F837C 2BB75N 8FFFB8 8G976F 0A143H 3BA7A5 0C205P UU2679 0D47B7 058AEB 17B67D 237EB4 24BD6E 2G6597 2H946D 279AFU 4E452A 49EGB9 579A9X 5I366F 6CFGE3 68BCAE 8B546C U2D947 8EDAAM 8G836J 46A844 6A423G 9A249M 0A169A 9A389S 07CABW 3A749R 4I66CG 4CECCQ 5E901L UY955C 007G93 5A831E 7DDEC9 8EED89 5CGDCH 8HB568 137AD9 7C5259 8J3644 2C39CC 34AIF9 5H99BW 8D7273 python-stdnum-1.2/tests/test_isan.doctest0000644000000000000000000000771412606424756020712 0ustar rootroot00000000000000test_isan.doctest - more detailed doctests for stdnum.isan module Copyright (C) 2010, 2012, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.isan module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import isan This is how numbers should be split (possible with and without episode number): >>> isan.split('000000018947000000000000') ('000000018947', '0000', '', '00000000', '') >>> isan.split('0000-0000-D07A-0090-Q-0000-0000-X') ('00000000D07A', '0090', 'Q', '00000000', 'X') >>> isan.split('000000018947000000000000') ('000000018947', '0000', '', '00000000', '') >>> isan.split('1881-66C7-3420-6541-Y') ('188166C73420', '6541', 'Y', '', '') >>> isan.split('1881-66C7-3420-6541') ('188166C73420', '6541', '', '', '') Compacting should also work: >>> isan.compact('000000018947000000000000') '000000018947000000000000' >>> isan.compact('0000-0000-D07A-0090-Q-0000-0000-X') '00000000D07A009000000000' >>> isan.compact('0000-0000-D07A-0090-Q-0000-0000-X', strip_check_digits=False) '00000000D07A0090Q00000000X' >>> isan.compact('000000018947000000000000') '000000018947000000000000' >>> isan.compact('1881-66C7-3420-6541-Y') '188166C734206541' >>> isan.compact('1881-66C7-3420-6541-Y', strip_check_digits=False) '188166C734206541Y' >>> isan.compact('1881-66C7-3420-6541') '188166C734206541' These should be valid numbers: >>> isan.validate('0000-0000-D07A-0090-Q-0000-0000-X') '00000000D07A0090Q00000000X' >>> isan.validate('1881-66C7-3420-6541-Y-9F3A-0245-O') '188166C734206541Y9F3A0245O' >>> isan.validate('0000-0000-D07A-0090-Q-0000-0000-X') '00000000D07A0090Q00000000X' >>> isan.validate('0000-0000-D07A-0090-Q') '00000000D07A0090Q' And these should be invalid: >>> isan.validate('00000000D07A0090-Z') Traceback (most recent call last): ... InvalidChecksum: ... >>> isan.validate('3abc6800-0041X1-20') Traceback (most recent call last): ... InvalidFormat: ... >>> isan.validate('3abc6800-0041') Traceback (most recent call last): ... InvalidLength: ... The format() function can add the check digit if needed. It should leave alone existing check digits (even invalid ones) and respect the presence or absence of a version number. >>> isan.format('00000000D07A0090') '0000-0000-D07A-0090-Q' >>> isan.format('1881-66C734206541-9F3A-0245') '1881-66C7-3420-6541-Y-9F3A-0245-O' >>> isan.format('1881-66C7-3420-6541-?-9F3A-0245-?', strip_check_digits=True, add_check_digits=False) '1881-66C7-3420-6541-9F3A-0245' >>> isan.format('1881-66C7-3420-6541-?-9F3A-0245-?', strip_check_digits=True, add_check_digits=True) '1881-66C7-3420-6541-Y-9F3A-0245-O' The validate() function also allows stripping and (re)adding check digits. >>> isan.validate('1881-66C7-3420-6541-Y-9F3A-0245-O', strip_check_digits=True) '188166C7342065419F3A0245' >>> isan.validate('188166C7342065419F3A0245', add_check_digits=True) '188166C734206541Y9F3A0245O' >>> isan.validate('1881-66C7-3420-6541-X-9F3A-0245-A', strip_check_digits=True, add_check_digits=True) '188166C734206541Y9F3A0245O' A simple test for the to_binary() function. >>> import binascii >>> import sys >>> x = binascii.b2a_hex(isan.to_binary('0000-0000-D07A-0090-Q')) >>> if sys.version > '3': ... x = str(x, encoding='ascii') >>> x '00000000d07a0090' python-stdnum-1.2/tests/test_iban.doctest0000644000000000000000000001364412601744732020662 0ustar rootroot00000000000000test_iban.doctest - more detailed doctests for the stdnum.iban module Copyright (C) 2011-2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.iban module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import iban These should all be valid numbers and are from the IBAN REGISTRY as sample numbers: >>> numbers = ''' ... AD12 0001 2030 2003 5910 0100 ... AD1200012030200359100100 ... AE070331234567890123456 ... AL47 2121 1009 0000 0002 3569 8741 ... AL47212110090000000235698741 ... AT61 1904 3002 3457 3201 ... AT611904300234573201 ... AZ21NABZ00000000137010001944 ... BA39 1290 0794 0102 8494 ... BA391290079401028494 ... BE68 5390 0754 7034 ... BE68539007547034 ... BG80 BNBG 9661 1020 3456 78 ... BG80BNBG96611020345678 ... BH67BMAG00001299123456 ... BR1800000000141455123924100C2 ... BR9700360305000010009795493P1 ... CH93 0076 2011 6238 5295 7 ... CH9300762011623852957 ... CR0515202001026284066 ... CY17 0020 0128 0000 0012 0052 7600 ... CY17002001280000001200527600 ... CZ65 0800 0000 1920 0014 5399 ... CZ6508000000192000145399 ... CZ94 5500 0000 0010 1103 8930 ... CZ9455000000001011038930 ... DE89 3704 0044 0532 0130 00 ... DE89370400440532013000 ... DK50 0040 0440 1162 43 ... DK5000400440116243 ... DO28BAGR00000001212453611324 ... EE38 2200 2210 2014 5685 ... EE382200221020145685 ... ES91 2100 0418 4502 0005 1332 ... ES9121000418450200051332 ... FI21 1234 5600 0007 85 ... FI2112345600000785 ... FI5542345670000081 ... FO62 6460 0001 6316 34 ... FO6264600001631634 ... FR14 2004 1010 0505 0001 3M02 606 ... FR1420041010050500013M02606 ... GB29 NWBK 6016 1331 9268 19 ... GB29NWBK60161331926819 ... GE29 NB00 0000 0101 9049 17 ... GE29NB0000000101904917 ... GI75 NWBK 0000 0000 7099 453 ... GI75NWBK000000007099453 ... GL89 6471 0001 0002 06 ... GL8964710001000206 ... GR16 0110 1250 0000 0001 2300 695 ... GR1601101250000000012300695 ... GT82TRAJ01020000001210029690 ... HR12 1001 0051 8630 0016 0 ... HR1210010051863000160 ... HU42 1177 3016 1111 1018 0000 0000 ... HU42117730161111101800000000 ... IE29 AIBK 9311 5212 3456 78 ... IE29AIBK93115212345678 ... IL62 0108 0000 0009 9999 999 ... IL620108000000099999999 ... IS14 0159 2600 7654 5510 7303 39 ... IS140159260076545510730339 ... IT60 X054 2811 1010 0000 0123 456 ... IT60X0542811101000000123456 ... JO94CBJO0010000000000131000302 ... KZ86125KZT5004100100 ... LB62 0999 0000 0001 0019 0122 9114 ... LB62099900000001001901229114 ... LI21 0881 0000 2324 013A A ... LI21088100002324013AA ... LT12 1000 0111 0100 1000 ... LT121000011101001000 ... LU28 0019 4006 4475 0000 ... LU280019400644750000 ... LV80 BANK 0000 4351 9500 1 ... LV80BANK0000435195001 ... MC11 1273 9000 7000 1111 1000 h79 ... MC1112739000700011111000h79 ... MD24AG000225100013104168 ... ME25 5050 0001 2345 6789 51 ... ME25505000012345678951 ... MK072 5012 0000 0589 84 ... MK07250120000058984 ... MR13 0002 0001 0100 0012 3456 753 ... MR1300020001010000123456753 ... MT84 MALT 0110 0001 2345 MTLC AST0 01S ... MT84MALT011000012345MTLCAST001S ... MU17 BOMM 0101 1010 3030 0200 000M UR ... MU17 BOMM0101101030300200000MUR ... NL91 ABNA 0417 1643 00 ... NL91ABNA0417164300 ... NO93 8601 1117 947 ... NO9386011117947 ... PK36SCBL0000001123456702 ... PL61 1090 1014 0000 0712 1981 2874 ... PL61109010140000071219812874 ... PS92PALS000000000400123456702 ... PT50 0002 0123 1234 5678 9015 4 ... PT50000201231234567890154 ... QA58DOHB00001234567890ABCDEFG ... RO49 AAAA 1B31 0075 9384 0000 ... RO49AAAA1B31007593840000 ... RS35 2600 0560 1001 6113 79 ... RS35260005601001611379 ... SA03 8000 0000 6080 1016 7519 ... SA0380000000608010167519 ... SE45 5000 0000 0583 9825 7466 ... SE4550000000058398257466 ... SI56 1910 0000 0123 438 ... SI56191000000123438 ... SK31 1200 0000 1987 4263 7541 ... SK3112000000198742637541 ... SM86 U032 2509 8000 0000 0270 100 ... SM86U0322509800000000270100 ... TL 38 008 00123456789101 57 ... TN59 1000 6035 1835 9847 8831 ... TN5910006035183598478831 ... TR33 0006 1005 1978 6457 8413 26 ... TR330006100519786457841326 ... VG96VPVG0000012345678901 ... XK051212012345678906 ... ''' >>> [ x for x in numbers.splitlines() if x and not iban.is_valid(x) ] [] These all have broken checksums or are mangled: >>> numbers = ''' ... AL48212110090000000235698741 ... AD1210012030200359100100 ... AT611804300234573201 ... BE68530907547034 ... BA391290709401028494 ... BG80BNBG99611020345678 ... HR1210010052863000160 ... CY17002001281000001200527600 ... CZ6508000000129000145399 ... CZ9455000000000101038930 ... DK5000400440116342 ... ''' >>> [ x for x in numbers.splitlines() if x and iban.is_valid(x) ] [] These are the wrong length but otherwise have valid checksums: >>> numbers = ''' ... AD48 0001 2030 2003 5910 01 ... AT93 1904 3002 3457 3201 99 ... BE36 5390 0754 7034 1234 ... BA30 1290 0794 0102 84 ... ''' >>> [ x for x in numbers.splitlines() if x and iban.is_valid(x) ] [] These are mostly valid except that they have alphabetic characters where they are not allowed or numbers where alphabetic characters are expected or have an unknown country code: >>> numbers = ''' ... BG93 BNBG 9661 1A20 3456 78 ... GI22 NW3K 0000 0000 7099 453 ... NL56 3003 0A17 1643 00 ... QQ93 1234 5678 ... ''' >>> [ x for x in numbers.splitlines() if x and iban.is_valid(x) ] [] python-stdnum-1.2/tests/test_br_cpf.doctest0000644000000000000000000000010212605730741021164 0ustar rootroot00000000000000 CPF nO247.439.921-69 95524361503 -> true 12345678900 -> false python-stdnum-1.2/tests/test_asx.doctest0000644000000000000000000021646612606037440020547 0ustar rootroot00000000000000ASX code This report last updated: 04/09/15 1PG 1PGDA 1PGAA 1PGAB 1PGAE 1PGAC 1PGAD ONT 1ST 1STAC 1STAD 1STAE 1STAF 1STAG 1STAH 1STAJ 1STAL 1STAI 1STAK TIX TIXAI TGP TOF TOT 3DM 3DMDA 3DMAE 3DMAH 3DMAI 3DMAJ 3DMAK 3DMAF 3DMAG TDO TDOAI TDOAM TDOAW DDD DDDAA 3PL 3PLXX 3PLZZ 88E 88EO 88EXX 88EYY 88EZZ 88EAK 8CO 8COAA 8COAB 8COAC 8IH NWG01 NNW NNWAK ACB ACBAQ APE APEAA APEAB APEAC APEAI APEAM APEAU APEAK APEAO APEAQ APEAS AYC AYCO AYCAA AYCAB AYI AYIAA AAT ABP ABPAI AFZ01 AFZ03 AFZ04 AFZ18 AFZ19 AFZ20 AFZ21 AFZ29 AFZ30 ALR ABL ABLDA ABLAA ABU ABUDA AJC AJCAI AJCAM AKG AXX ACS ACSAI ACX ACXAA ACQ ACQO ACR ACRAB ACW ACWOA ACWXX ACWAI AIV AIVAW AIVAI AIVAO ACU ACUDA ACUDC ACUAA ACUAC ACUAE ACUAB ACUAD ACUAF ACUAG ACUAH ADA ADH ADD ADDDA ADDAM ADDAO ADDAU ADDAY AAU AAUAK ABC ABCAK ADN ADNO ADNAS ADQ ADQAK ADQAM ADR ADRXX ADRAA ADRAC ADRAE ADRAD ADRAB ADRAF ABY AHZ AHZAA AHZAB AHZAC AHZAK AHZAR AHZAI AHZAM AHZAQ ADY ADYNA ADYAI ADJ ADJAA ABV ABVO ABVAK ABVAM AES AESAI AESAK ACE ACEDA ACEAO ACEAQ ACEAS ACEAU ACEAW ACEAY ACEAZ ASW A88 ADX ADXAI AED AEDAI AEDAK AER AERAA AERAB AERAD AERAC AERAE AERAF AQR AQRN AQRAK AQRAM AQRAO AEI AEIAB AFJ AFJAA AFJAI AFJAK AFR AFRAA AFRAB AFRAI AFT AHA AHAR AGX AGXO AGL AGLNA AGLRA AGLHA AG1 AG2 AGH AGJ AMN AMNOA AMNAN AMNAO AGR AGRAU AGRAE AHL AHLDA AHLDC AHLXX AHLAB AHLAA AHLAC AHLAD AHLAE AI1 ENY FIN FIX IDD RSR MAM APW AGI AGIAI AGIAK AHJ AHJAI AIZ AIZAK AIZAM AIZAN AIZAI AXP AXPAA AXPAB AXPAC AXPAD AXPAE AXPAG AXPAF AJL AJLAO AJLAQ AJLAI AJLAS AJLAM AQG AQGAI AQGAM AUQ AUQAM ACL ACLAK ALY ALYAN AL1 AAI AAIAI AYN AYNOA AYNAB AYNAI AYNAK AYNAO AYNAW AYNAY AYNAZ AYNAM AYNAQ LEP AWD AWDDA AWDDB AWDO AJX AJXYY AJXAB AJXAA AJXAC AJXAD AJXAI AJXAZ AEB AEBAI AEBAO AEBAS AEBAT AEBAV AEBAW AEBAU AQI AQIAI AQIAU AQIAV AQIAW AA1 ALK ALKAA AQY01 AQY02 AHQ AHQAU AHQAW AMT AQZ AGS AGSAO AGSAK AGE AGENB AGEAB AGEAI AZG AZGAI AZGAO AZGAQ AYR AYRAI AYRAM AYRAO IWM01 IWM02 IWM03 IWM04 IWM05 RAA RAK RAY ALQ ALQN ALQR ALQAI ARS ATC ATCOA ATCAA ATCAN ATCAC ATCAK AIQ ALU AOH AOHAK AOHAS AJM AJMO AJMAL AJMAK AWC AWCBSK AMA AMAXX AHD AHDAU AHDAW AHDAK AHDAO AHDAQ AHDAS AYS AYSXX AQO AMO AMOAI AMB AMBAP AKY AMH AMM AMC AMCAP AMCBSK AMCAO AMCAK AM1 AMR AOW AOWO AOWAF AXZ AXZAA AXZAI AXZAK AXZAO AXZAQ AXZAS AXZAU AXZAY AXZAZ AGF AMP AMPHA AMY ACA01 ACA02 ACA03 ACA04 ACA05 AM9 AYK AYD AYJ AYH ANQ ANQAK ALT ALTNB ALTR ALTO ALTOA ALTXX ALTAI ALTAK ALTAM ALTAO ANR ANRXX ANRYY ANRAB AEK AEKO AEKAO AEKAM AEKAQ AEKAR AEKAS AEKAU AEKAW ACI AHR AHRAO ATM AQMHA AAR AARAI AGG AGGAO AGGAS AGGAI AGGAK AGGAM AB1 AB1DA AB1XX AB1AA AB1AD AB1AB AB1AC AB1AE AB1AF AB1AG XINAA XINAAA XINAAB XINAAC XINAAD XINAAE XINAAF XINAAG XINAAH XINAAI XINAAJ XINAAK XINAAL XINAAM XINAAN XINAAO XINAAP XINAAQ XINAAR XINAAS XINAAT XINAAU XINAAV XINAAW XINAAX XINAAY XINAAZ XINAB XINABA XINABB XINABC XINABD XINABE XINABF XINABG XINABH XINABI XINABJ XINABK XINABL XINABM XINABN XINABO XINABP XINABQ XINABR XINABS XINABT XINABU XINABV XINABW XINABX XINABY XINABZ XINAC XINACA XINACB XINACC XINACD XINACE XINACF XINACG XINACH XINACI XINACJ XINACK XINACL XINACM XINACN XINACO XINACP XINACQ XINACR XINACS XINACT XINACU XINACV XINACW XINACX XINACY XINACZ XINAD XINADA XINADB XINADC XINADD XINADE XINADF XINADG XINADH XINADI XINADJ XINADK XINADL XINADM XINADN XINADO XINADP XINADQ XINADR XINADS XINADT XINADU XINADV XINADW XINADX XINADY XINADZ XINAE XINAEA XINAEB XINAEC XINAED XINAEE XINAEF XINAEG XINAEH XINAEI XINAEJ XINAEK XINAEL XINAEM XINAEN XINAEO XINAEP XINAEQ XINAER XINAES XINAET XINAEU XINAEV XINAEW XINAEX XINAEY XINAEZ XINAF XINAFA XINAFB XINAFC XINAFD XINAFE XINAFF XINAFG XINAFH XINAFI XINAFJ XINAFK XINAFL XINAFM XINAFN XINAFO XINAFP XINAFQ XINAFR XINAFS XINAFT XINAFU XINAFV XINAFW XINAFX XINAFY XINAFZ XINAG XINAGA XINAGB XINAGC XINAGD XINAGE XINAGF XINAGG XINAGH XINAGI XINAGJ XINAGK XINAGL XINAGM XINAGN XINAGO XINAGP XINAGQ XINAGR XINAGS XINAGT XINAGU XINAGV XINAGW XINAGX XINAGY XINAGZ XINAH XINAHA XINAHB XINAHC XINAHD XINAHE XINAHF XINAHG XINAHH XINAHI XINAHJ XINAHK XINAHL XINAHM XINAHN XINAHO XINAHP XINAHQ XINAHR XINAHS XINAHT XINAHU XINAHV XINAHW XINAHX XINAHY XINAHZ XINAI XINAIA XINAIB XINAIC XINAID XINAIE XINAIF XINAIG XINAIH XINAII XINAIJ XINAIK XINAIL XINAIM XINAIN XINAIO XINAIP XINAIQ XINAIR XINAIS XINAIT XINAIU XINAIV XINAIW XINAIX XINAIY XINAIZ XINAJ XINAJA XINAJB XINAJC XINAJD XINAJE XINAJF XINAJG XINAJH XINAJI XINAJK XINAJL XINAJM XINAJN XINAJO XINAJP XINAJQ XINAJR XINAJS XINAJT XINAJU XINAJV XINAJW XINAJX XINAJY XINAJZ XINAK XINAKB XINAKC XINAKD XINAKE XINAKF XINAKG XINAKH XINAKI XINAKJ XINAKK XINAKL XINAKM XINAKN XINAKO XINAKP XINAKQ XINAKR XINAKS XINAKT XINAKU XINAKV XINAKW XINAKX XINAKY XINAKZ XINAL XINALA XINALB XINALC XINALD XINALE XINALF XINALG XINALH XINALI XINALJ XINALK XINALL XINALM XINALN XINALO XINALP XINALQ XINALR XINALS XINALT XINALU XINALV XINALW XINALX XINALY XINALZ XINAM XINAMA XINAMB XINAMC XINAMD XINAME XINAMF XINAMG XINAMH XINAMI XINAMJ XINAMK XINAML XINAMM XINAMN XINAMO XINAMP XINAMQ XINAMR XINAMS XINAMT XINAMU XINAMV XINAMW XINAMX XINAMY XINAMZ XINAN XINANA XINANB XINANC XINAND XINANE XINANG XINANH XINANI XINANJ XINANK XINANL XINANM XINANN XINANO XINANP XINANQ XINANR XINANS XINANT XINANU XINANV XINANW XINANX XINANY XINANZ XINAO XINAOA XINAOB XINAOC XINAOD XINAOE XINAOF XINAOG XINAOH XINAOI XINAOJ XINAOK XINAOL XINAOM XINAON XINAOO XINAOP XINAOQ XINAOR XINAOS XINAOT XINAOU XINAOV XINAOW XINAOX XINAOY XINAOZ XINAP XINAPA XINAPB XINAPC XINAPO XINAQ XINAR XINAS XINAT XINAU XINAV XINAV1 XINAV7 XINAV8 XINAV9 XINAW XINAWO XINAWU XINAX XINAY XINAZ XINEB XINEC XINED XINEE XINEEA XINEEB XINEEC XINEF XINEG XINEH XINEI XINEJ XINEK XINEL XINEM XINEN XINENO XINENU XINEOA XINEOB XINEP XINES XINET XINEU XINEV XINEW XINEX XINEZ XINP10 XINP18 XINP19 XINP7 XINAKA AWV AWVAJ AWVAK AWVAW ANN ANNAI AZZ AZZG AWW ANO ANOAW ANOAZ ADO ADOAC ADOAD ADOAE ADOAK ADOAB AVD AVDDA AVDDC AVDNB AVDR AVDOB AVDG AVDAB AVDAW AVDAC AVDAE AZY AZYO AZYAB AZYAY AZYAA ANP ANPO ANPAU ANZ ANZPA ANZPB ANZPC ANZPD ANZPE ANZPF ANZXX ANZAA ANZHA ANZHAP ANZHAO ANZHAN ANZHAL ANZHAM ANZHAT ANZHAQ ANZHAR ANZHAS ZYAU ZGOL ZCNH ZYUS ZUSD ZOZI APA APAAI AAL AALAM AALAO AALAQ AQQ AQQAA APF01 APF02 APN APNAI APNAK APNAM APO APOAA APD APDAI AORHA AOP AOPNA AOPO AOPAI AOPAA AOPAB AOPAK AOPAZ AON AONDA AONAI AONAK AOYHA AOJHA AOJHB APX APXAA ALA ALAO ALAAI AP1 AQHHA AQHHB AQHHC AQHHD AQU AQUAB AQP AQS AQSAA AQSAI ARU ARUAA ARUAB ARUAM ARUAS ARUAZ ARB ARX ARXAA ARXAR AAW AXE AXEAZ AAD AWO ADV ADVDA ADVAM ADVAO ADVAP ARF ARFDC ARD ARDO ARDAK ARDAM AXT AXTAI ALI ALIO ALIXX ARG ARGAM ARGAK ARE AREO AREAI AREAK AGY AGYAI AGYAA ARA ARAAS ALL ARJ AHK AHKAI AIK AJQ AJQAO AJO ACY01 ACY02 AWQ AWQO AWN ARI ARIN ARIR ARV ARVOA ARVOB ARVAL ARVAK AAJ AAJAK AAJAL AAJAM AJR AJRO AJRAI AJRAM AJRAA AJRAJ AJRAK AHY AJY AIO AIOAU AIOAI AZQ AZQDA AZQAA AZQAB AZQAI AZQAM AFA AFAAA ASZ ASZAA ASH ASHAA DIG DIGDA DIGAI AJD AJJ ATBHB ATBHL ATBHJ ATBHK ATBHH ATBHM ATBHO ATBHG ATBHI ATBHN AUF AIC AKF APZ APZAI APZAM APZAK ASP ASPAK ASPAI AKM AKMO AKMAA AIR AJA ARO ARODA AROO AROAA ATR UUU ASX ASXN ASXR ACG ACGN ACGYY ACGAI AHN AHNAI ATE ATEAA ATEAO ATEAB ATI ATIAM ATIAI ATIAQ AGO AGOO AGOXX AGOAAH AGOAZ AGOAAD AGOAAG ATP ATPAI ATPAQ ATPAS ATPAT ATU ATUN ATUAU ATUAA ATUAI ATUAW ATUAY ATUAZ AYA AYAAA AYAAB AYAAI AYAAK AYAAS AYAAW AYAAZ AYAAY AYAAU AIA AIADA ACP AKP AKPAA AUK AUKAA AUKAQ AZP AEE AEEOA AEEAI AEEAQ AMI AMIAO AMIAQ AZJ AZJAI AOU AOUAI AOUAO AOUAN AOUAM ABW AOD AIB ARM ARMAB ARMAO ARMAD AUP AQJ AQJAA AHF AHFDA AHFAK AHFAA AHFAI AQF ANB ANW ANWAI ANWAP ANWAQ AXW01 AXW02 AXW04 ASL ASLAK ASLAQ ASLAY ASLAZ ASLAS ASLAW AAX AAXAK AAXAI AUC AUCNA AUCAU AUCAV AUCAW AUCAO AUCAQ GSBS15 GSBK16 GSBC17 GSBM17 GSBA18 GSBS18 GSBE19 GSBS19 GSBG20 GSBU20 GSBI21 GSBM22 GSBG23 GSBG24 GSBG25 GSBG26 GSBG27 GSBG29 GSBG33 GSBK35 GSBG37 GSIO15 GSIU18 GSIO20 GSIC22 GSIQ25 GSIQ30 GSIO35 GSIO40 ABF AOA AOAAQ ANVHA ANVHB ANVHD ANVHC AST ASTDA AQC AQCDA AQD AQDO AQDOA AQDAK ARK ARKDA ARKDB ARKO ARKAA ARKAI ARKAK ARKAM ARKAO ARKAS ARKAU ARKAW ABX ACO ACOAA AET01 AET02 AET03 AET04 AET05 AET06 AET07 AFG ANI ANIAI ARC ARCDA ARCO 8SA 868 AVG AVGAI AVGAM AVGAK AVGAO AWI AWIXX ASB ASBAA ASBAU ASBAI AUB AUBAK AUBAU AUBAW AUBAY AUBAZ AUBAO AOK AOKAA AOKAO AOKAM ANG ANGXX ANGYY ANGZZ ANGAA ANGAI AKK AKKDA ACK APG APGAI AGD AGDAI ARH AAK AAKXE AAKAA AAKAB AYM AYMNA AAP AAC AACAU AACAY AACAZ AACAO AACAK XCLWU XCLWD XCLWY XCLWT XCLWJ XCLWZ XCLWW XCLWAH XCLWAJ XCLWK XCLWAK XCLWO XCLWE XCLWAN XCLWM XCLWAB XCLWR XCLWX XCLWAC XCLWAE XCLWP XCLWAI XCLWAA XCLWAD XCLWV XCLWAG XCLWAM XCLWAF XCLWAL XCLWAO AYF AEF AEFAE AEFAC AEFAG AFI AFIG ALF AUZ AUZO AUZN AOC AOCAM AOCAN API APKO AYB AYBAA ARW ARWAK ARWAY AUI AYUHA AZC AZCCA AZCAA ABA AIY AIYAA AIYAI AIYAY AIN AHG AHGAI AVI AVIDA AVIAL AVIAS AVB AVBN AVBAO AVBAP AVBAQ AOG AOGXX AOGYY AOGZZ AOGAU AVX AVH AVHAE AVJ AVJAA AVZ AVZAU AVZAZ AWE AWEAU AXJHA AXJHB AVQ AVQDA AVQAB AVQAA AVQAM AXI AXIAI AYG AYGAI AYGAQ AYZ AZK APY APYAY APYAA AZM AZMAR AZMAQ AZMAT AZV AZVAA AZS AZSN AZSAI AZSAQ BTI BTIO BTIAA BTIAC BTIAB BTIAD BND BNDAQ BNDAS BNDAM BKCHA BOQ BOQPC BOQPD BOQAA BOQAQ BOQAS BOQAK BOQAM BMN BMNAAM BMNAN BMNAO BKP BG1 BAR BARAA BST BSTO BSE BSEAM BSEAN BSEAO BSEAI BSEAK RSB LPT BAN IFB BSM BSMAK BAS BSR BSRAA BRL BRLAZ BMH BMHAA BMHAB BAU BAUAI BAUAO BBX BBXO BBXAI BBXAJ BBXAK BCI BCIAI BCD BCDAM BPT BPTAK BPTAS BLX BLXAA BCN BCNO BDR BDRAI BDRAY BHG BGA BGAAI BFG BFGAI BNJHA BNJHB BAL BALAI BEN BENPB BENPD BENPE BENPF BENAB BENAC BENAD BENAA BENAI BENAK BENAS BENHB BENHA BLT BLTAA BLTAB BLTAC BLTAM BLTAW BLTAZ BAM01 BAM02 BAM03 BEL BHA BKY BKYAM BKYAO BKYAR BKYAK BKYAQ BEZ BEZAI BEZAK BEZAO BEZAM BFC BFCXX BFCAA BBOZ HVST GGUS UMAX BBUS QAG QCB QFN QRE BEAR EEU QAU POU QUS USD AAA QCP OOO NDQ QOZ QOZBSK YMAX GEAR GEABSK BYI BGD BGDDA BGDDB BGDO BGDAA BGDAB BGDAI BHP BHPAQ BHPAS BHPAU BHPAO ZBH BIG BIGDA BIGAH BIGAI BIGAJ BIGAL BIGAK BGL ZBR BBG BBGN BBGR BBGAI BBGAO BBGAQ BBGAS BBGAM BMR BNO BNOAO BNOAP BTC BIT BITO BITAI BXN BXNAB BXNAY BOP BOPAI BGS BGSN BGSO BGSAI BGSAO BGSAQ BIC BICAK BIS BISZZ BISAI BSN BSNO BSNAK BSNAL BCG BKI BKM BKMDA BMZ BMZN BMZR BMZAI BMZAO BOK BOKDA BOKAO BOKAQ BLR BLRAM BLRAO BLRAQ BLRAR BRD BRDN BRDAI BKT BKTDA BKTOC BKTAA BKTAB BKTAC BKTAD BKTAF BKTAE BSP BSPO BGG BGGO BLK BLKAB BLKAC BKL BTR BTRAK BWR BWRDA BWRR BWF BLZ BLZDA BGH BGHAK BGHAL BGHAA BDI BDIAI BIVAI BUL BULAK BULAM BAF BAFO BLA BLAAA BLAAB BLAAI BCT BEG BEGAM BSL BSLR BSLAM BUE BUEAK BUEAM BUEAO BUEAS BUEAU BUEDA BUEDB BLG BLGAK BMG BMGDA BMGAK BFM01 BFM02 BFM03 BFM04 BA1 BOA BLY BLYAB BLYAA BNE BNEAI BNEAQ BNEAS BNEAW BNEAZ BOL BBR BBRXX BBRAA BBRAB BBRAI BBRAQ BBRAU BLD BLDAI BOB BOE BOEAA BML BMLOB BOC BNT BNTAI BUY BPBHA BPBHB BPH BPHAC BPHAA BPHAB BPS BPSAA BKN BKNAI BRC BRCAA BRCAB BRCAK BRCAO BRCAM BRCAQ ZBI BXB BXBN BXBR BXBAI BNV BNVAS BNVAU BZL BZLAA BRB BRBCA BRBAK BRBAM BRBAQ BRG BRGAM BKW BGC BGCO BGCAB BGCAD BGCAF BGCAC BGCAE BGCAG BYL BYLAI BTN BTNAM BTNAU BBL BBLAM BCS BRO BROAK BCK BCKAK BCKAL BCKAM BCKAS BCKAU BCKAY BPL BPLN BPLO BPLAI BGR BGRDA BAO BPA BRK BRKDA BRKDC BSA BSAAA BSAAB BTT BTTAK BTTAI BCC BCCAO BCCAU BCCAS BCCAY BUG HU1 BNR BNRAJ BPF BPFAS BPFAI BUN BUNDA BYR BYRO BYRAK BYRAL BUR BURAA BURAB BAP BAPXX BAPYY BAPZZ BAPAI BAPAK BRU BRUAQ BUX BUXO BUXXX BUXAA BUXAB BUXAI BUXAM BWP BWPAI BWPAK BYE BYEAM BYEAN BYEO BPG CAB CBS CBSDA CBSAS CDM CDMN CDMO CAD CADAI CADAK CADAM DXAHH DXAHB CGH CUU CUUAI CUUAJ CTX CTXAO CTXHA CAE CAY CAYO CAYOA CAYAA CAYAB CAYAC CAYAK CFE CFEAI CFEAJ CAG CZZ CMY CMYDA CMYN CMYDB CMYO CPX CLP CAJ CAA CAAAI CAAAS CAQ CAQDD CAQDC CLR CJC CJCDA CJCN CJCDB CJCOA CJCAA CJCAB CJCAC CVV CVVO CVVOA CVVXX CVVAU CVVAM CVVAN CVVAO CRB CRBAA CRBAB CNQ CNQAA CCF CCFAY CNX CNXO CNXAI CNXAK CNXAM CNXAZ CNXAQ CNXAY CRM CRMAM CDV CDVOA CDVAB CDVAM CDVAO CDVAA CDD CDDAI CDP CIN CINPA CVN CVNO CAV CAVAI CAVAJ CWE CWEXE CWEAK CWEAI CWEAA CAP CAPAO CAPAQ CAR CARAI CCV CCVAI CZI CZIO CZIAI CZIAK CZIAM CZIAO CZIAS CCZ CCZAM CDT CDTAI CDTAK CGT CGTAI CYL CYLO CYLAO CAT CATAB CATAC CATAD CATAF CATAG CATAE CXU CXUAK CXUAO CXUAQ CXUAR CXUAS CXUAM CAZ CAZAO CBK CBKAI CBC CBCO VXX CC2 CWP CNL CNLCA CNLAA CNLAM CDY CDYO CDYAU CDYAK CDYAS CDYAY CLT CLTAA CLA CLAAK CLAAA CLAAU CLAAY CLAAS CLAAZ CTM CTMO CTMAS CVR CTP CTPAU CAF CAFAM CAFAK CXM CXMAK CXMAO CER CNI CNIAA CMA CMAAI CYA CYAN CFU CFUO CFUAQ CFUAA CFUAI CVS CHN CHNAS CHNAI CEL CELO CELAA CELAI CQL CGF CGFPA CHJHB CHJHC CHJHD CHJHE CHUHA CHUHB CHUHC CWTNA CHR CIA CIAOA CIAAC CIAAD CIAAA CIAAB CHP CHPDA CHC CHCAD CHCAE CHCAF CHCAY CHCAZ CHCAA CHCAC CHCAI CHCAM CQR CQRXX CHF CHFAI CHFAJ CH5 CHZ CHZAO CCBHA CCBHB CHI CIK CMC CMCO ZCH CWC CWCAA CYU CYUAA CDH CNU CNUAI CNUAK CNUAM CYS CII CIM CIMAM CIMAK CIR CIRO CIRAB CNW CNWDA CNWAA CNWAB CNWAI CNWAC CNWAD ZCS CGG CGGAQ CTR CTRDA CTRDB CTRO CTRAA CTRAB RAX MLW CTB ZCP CTO CTOAA CTA AACKOA AACKOB AADKOB AADKOC ABCKOA ABCKOE AFIJOH AGIKOA AGIKOB AGLIOV AGLJOC AGLJOP AGLJOQ AGLKOA AGLKOB AGLKOC AGLKOD AGLSO1 AGLSOB AIOIOO AIOIOV AIOKOB AIOKOC AIOKOD AIOKOF ALLIOO ALLIOV ALLKOA ALLKOB ALLKOD ALLKOG ALQKOA ALQKOB ALQKOC ALQKOD ALQKOF ALQKOH AMCIOO AMCIOV AMCKOA AMCKOB AMCKOC AMCKOD AMCSOE AMPIOI AMPIOL AMPIOO AMPIOV AMPIOZ AMPJOE AMPJOF AMPJOJ AMPJOK AMPKOA AMPKOB AMPKOD AMPKOE AMPKOF AMPKOJ AMPKOM AMPLOA AMPLOB AMPLOC AMPLOE AMPSOE AMPSOF AMPSOG ANNKOA ANNKOB ANNKOC ANNKOD ANZIO1 ANZIO2 ANZIOI ANZIOL ANZIOO ANZIOV ANZIOZ ANZJOC ANZJOE ANZJOH ANZJOI ANZJOJ ANZJOK ANZJOT ANZKOA ANZKOB ANZKOC ANZKOD ANZKOE ANZKOF ANZKOG ANZKOH ANZKOI ANZKOJ ANZKOK ANZKOL ANZKOM ANZKON ANZKOO ANZLOA ANZLOB ANZLOC ANZLOD ANZLOE ANZLOF ANZLOI ANZQOA ANZQOB ANZQOC ANZQOD ANZQOF ANZQOG ANZQOH ANZQOI ANZSO1 ANZSOB ANZSOC ANZSOE ANZSOF ANZSOG ANZSOH ANZWOA ANZWOB ANZWOI ANZWOJ ANZXOC ANZXOD APAJOH APAKOA APAKOB APAKOC AQPKOC ARGJOH ARGJOM ARIIOL ARIIOO ARIIOV ARIKOA ARIKOB ARIKOD ASTKOA ASTKOB ASXIOI ASXIOL ASXIOO ASXIOV ASXIOZ ASXKOA ASXKOB ASXKOE ASXKOF ASXSO1 ASXSOE ASXSOG AWCIOI AWCIOO AWCIOV AWCIOZ AWCKOA AWCKOB AWCKOD AWCKOE AWCKOF AWCKOG AWCKOH AWCKOI AWCKOL AWCSOE AWEKOA AWEKOB AWEKOD AWEKOF AWEKOG AZJKOA AZJKOC AZJKOE AZJKOG AZJKOH AZJSOE BDRKOJ BDRKOL BENIOI BENIOO BENIOV BENIOZ BENJOE BENJOF BENJOP BENJOQ BENJOT BENKOA BENKOC BENKOD BENKOE BENKOG BHPIO1 BHPIO2 BHPIOI BHPIOL BHPIOM BHPIOO BHPIOV BHPIOZ BHPJOC BHPJOE BHPJOJ BHPJOP BHPJOQ BHPJOT BHPKOB BHPKOC BHPKOD BHPKOE BHPKOF BHPKOG BHPKOH BHPKOI BHPKOL BHPKOM BHPKON BHPKOO BHPLOA BHPLOB BHPLOC BHPLOD BHPLOE BHPLOF BHPLOG BHPLOK BHPQOA BHPQOC BHPQOD BHPQOE BHPQOF BHPSO1 BHPSOB BHPSOE BHPSOF BHPSOG BHPSOH BHPWOA BHPWOB BHPWOG BHPWOH BHPWOI BHPXOC BHPXOD BKIJOH BKNKOA BKNKOB BLDIOO BLDIOV BLDKOA BLDKOB BLDKOC BOQIOI BOQIOO BOQIOV BOQIOZ BOQJOA BOQJOB BOQJOP BOQJOQ BOQKOA BOQKOB BOQKOD BOQKOE BOQSO1 BOQSOE BPTKOA BPTKOB BPTKOC BPTKOF BRUKOD BRUKOF BRUKOG BRUKOI BRUKOO BSLIOI BSLIOL BSLIOO BSLIOV BSLIOZ BSLKOA BSLKOB BSLKOE BXBIOI BXBIOL BXBIOO BXBIOV BXBIOZ BXBJOJ BXBJOK BXBKOA BXBKOC BXBKOD BXBKOE BXBKOF BXBSO1 BXBSOE BXBSOF CABJOA CABJOJ CARKOB CARKOD CBAIO1 CBAIO2 CBAIOI CBAIOL CBAIOO CBAIOV CBAIOZ CBAJOC CBAJOE CBAJOF CBAJOG CBAJOH CBAJOI CBAJOJ CBAJOK CBAJOL CBAJOP CBAJOQ CBAJOU CBAKOA CBAKOB CBAKOC CBAKOD CBAKOE CBAKOF CBAKOG CBAKOH CBAKOI CBAKOJ CBAKOK CBAKOL CBAKOM CBAKON CBAKOO CBALOB CBALOC CBALOD CBALOE CBALOF CBALOG CBALOI CBALOJ CBALOK CBAQOB CBAQOD CBAQOE CBAQOF CBASO1 CBASOB CBASOC CBASOE CBASOF CBASOG CBASOH CBAWOA CBAWOB CBAWOI CBAWOJ CBAXOC CBAXOD CCLKOD CCLKOF CCLSO1 CCLSOG CDDKOA CDDKOB CDDKOC CGFKOA CGFKOG CGFKOI CIMKOA CIMKOB CIMKOD CIMKOE CIMKOG CIMSOE CMJIOO COHIOI COHIOO COHIOV COHIOZ COHJOE COHJOF COHJOP COHJOQ COHKOA COHKOB COHKOD COHKOF COHKOG COHSO1 CPUIOL CPUIOO CPUIOV CPUJOE CPUJOF CPUJOP CPUJOQ CPUKOA CPUKOC CPUKOF CPUQOA CPUSO1 CSLIOI CSLIOO CSLIOV CSLIOZ CSLJOJ CSLJOK CSLJOT CSLKOA CSLKOC CSLKOD CSLKOE CSLKOF CSLKOG CSLKOI CSLKOJ CSLKON CSLQOA CSLSOE CSLSOH CSRIOM CSRIOO CSRIOV CSRKOA CSRKOB CSRKOC CTDKOB CTDKOE CTDKOF CTXKOA CTXKOB CTXKOC CTXKOI CWNIOI CWNIOO CWNIOV CWNIOZ CWNJOE CWNJOP CWNKOA CWNKOB CWNKOC CWNKOD CWNKOE CWNKOF CWNSO1 DJWJOH DJXKOB DJXKOC DJXKOD DJXKOF DJXKOJ DJXKOK DLSKOA DLSKOB DLSKOC DLSKOG DLSKOI DLXKOA DLXKOB DLXKOC DMPKOA DMPKOB DMPKOC DMPKOD DOWKOA DOWKOB DOWKOC DOWKOD DOWKOE DOWKOF DOWKOG DOWKOI DOWKOJ DOWSO1 DSHKOA DSHKOB DSHKOF DUEKOA DUEKOB EGPKOE EGPKOG EGPKOH EHEKOA EHEKOB FBUKOA FBUKOC FDCKOA FDCKOB FLTJOB FLTJOP FLTJOU FLTKOA FLTKOB FLTKOC FMGIOL FMGIOO FMGIOV FMGJON FMGJOP FMGKOA FMGKOB FMGKOC FMGKOE FMGKOF FMGKOG FMGKOI FMGKOK FMGKOL FMGKOM FMGKOO FMGQOA FMGQOB FMGSO1 FMGSOE FMGWOA FMGWOB FMGWOI FMGWOJ FOXIOI FOXIOO FOXIOV FOXIOZ FXEKOA FXEKOB FXEKOF FXEKOG FXJIOL FXJIOO FXJIOV FXJKOA FXJKOD FXJKOF FXJKOG FXLKOA FXLKOB FXLKOF FXPKOA FXPKOB FXPKOC FXPKOE FXUKOA FXUKOB FXUKOC FXUKOD FXUKOE FXUKOF FXUKOH FXUKOI FXUKOJ FXUKOK FXUKOL FXUKOM FXUQOA FXUQOB FXUQOC FXUQOD FXYKOA FXYKOC FXYKOM FXZKOB FXZKOC FXZKOE GEMJOE GEMJOF GEMJOG GEMKOA GEMKOB GEMKOD GEMKOF GMAKOA GMAKOB GMGKOE GMGKOF GMGKON GNCKOA GNCKOB GNCKOC GNCKOE GNCKOF GPTKOB GPTKOC GPTKOD GXLKOA GXLKOC HFRJOE HFRJOG HFRJOH HFRJOT HGGKOA HGGKOD HSOJOE HSOKOA HSOKOB HSOKOC HSXKOA HSXKOB HSXKOC HSXKOD HVNKOA HVNKOB HVNKOC HVNKOD HVSJOE IAAIOM IAAJOM IAGIOI IAGIOL IAGIOO IAGIOV IAGIOZ IAGKOA IAGKOB IAGKOC IAGKOD IAGKOE IAGSOE IEMIOM IEMJOM IEMSOD IEUJOE IEUJOF IGOKOB IGOKOC IGOKOD IGOKOI IHDSO1 IJRSOD ILCIO2 ILCSO1 ILUJOP ILUKOA ILUKOB ILUKOH ILUKOJ ILUKOK IOOIOM IOOSO1 IOZSO1 IPLKOA IPLKOB IPLKOC IPLKOF IPLKOG IPLKOH IPLSOE ISOJOM IVCKOA IVCKOB IVCKOE IVCKOF IVEJOE IVVSO1 IVVSOB IVVSOD IVVSOG IVVSOH IXIIOM IXJIOM IZZJOM JBHJOP JBHJOQ JBHJOT JBHKOA JBHKOB JBHKOC JBHKOD JBHKOE JBHKOF JBHKOK JBHSO1 JHXKOA JHXKOB JHXKOC JHXKOF JHXQOA KARKOA KARKOB KARKOC KARKOF KARKOG KARKOH LLCIOM LLCIOO LLCIOV LLCKOA LLCKOB LLCKOD LLCKOE LLCKOF LLCKOG LLCQOA LLCQOB LLCQOC LLCSO1 LLCSOE LNGKOA LNGKOB LNGKOC LNGKOD LNGKOF MFFJOH MFGJOP MFGJOT MFGKOA MFGKOB MFGKOC MFGKOD MFGSO1 MGRKOB MGRKOC MGRKOD MGXKOJ MGXKOK MGXKON MINJOB MINKOA MINKOB MINKOC MINKOD MINKOF MINKOG MINQOE MLTJOH MMLKOB MMLKOC MMLKOD MMLKOL MMLKOO MMSKOA MMSKOB MMSKOC MMSKOE MNDKOA MNDKOC MNDKOE MNDKOF MNDKOG MNDQOA MPLJOP MPLJOQ MPLKOC MPLKOD MPLKOE MPLSO1 MQGIO1 MQGIOI MQGIOL MQGIOO MQGIOV MQGIOZ MQGJOE MQGJOF MQGJOJ MQGJOK MQGJOP MQGJOQ MQGKOA MQGKOB MQGKOC MQGKOD MQGKOE MQGKOF MQGKOG MQGKOH MQGKOI MQGKOJ MQGKOK MQGKOL MQGKOM MQGKON MQGLOA MQGLOD MQGLOE MQGLOF MQGLOG MQGLOH MQGLOI MQGQOA MQGQOB MQGQOD MQGQOE MQGQOF MQGQOH MQGSO1 MQGSOE MQGSOF MQGSOG MQGSOH MQGWOA MQGWOB MQGWOI MQGWOJ MQGXOC MQGXOD MSBKOA MSBKOB MSBKOC MSBKOD MSBKOF MTSIOI MTSIOL MTSIOO MTSIOV MTSIOZ MTSKOA MTSKOB MTSKOC MTUKOA MTUKOB MTUKOC MVAJOP MVWJOE MYRIOM MYRJOQ MYRJOS MYRKOA MYRKOB MYRKOC MYRKOF MYRSOE MYRSOG NABIO1 NABIO2 NABIOI NABIOL NABIOO NABIOV NABIOZ NABJOC NABJOD NABJOE NABJOF NABJOG NABJOH NABJOJ NABJOK NABJOT NABJOU NABKOA NABKOB NABKOC NABKOD NABKOE NABKOF NABKOG NABKOH NABKOI NABKOK NABKON NABKOO NABLOA NABLOB NABLOC NABLOD NABLOE NABLOF NABQOC NABQOD NABQOE NABQOF NABQOG NABSO1 NABSOB NABSOC NABSOE NABSOF NABSOG NABSOH NABWOA NABWOB NABWOI NABWOJ NABXOC NABXOD NCMIO1 NCMIOI NCMIOM NCMIOO NCMIOV NCMIOZ NCMJOE NCMJOF NCMJOP NCMJOQ NCMKOA NCMKOB NCMKOD NCMKOE NCMKOG NCMKOH NCMKOI NCMKOJ NCMKOK NCMKOL NCMLOA NCMLOB NCMLOE NCMLOL NCMLON NCMQOA NCMQOB NCMSOE NCMWOA NCMWOB NCMWOI NCMWOJ NDXKOB NDXKOC NDXKOE NDXKOH NDXKOI NECKOA NECKOB NECKOD NECQOA NI2KOA NI2KOB NI2KOC NI2KOF NI2KOI NSRJOE NSRJOF NSTKOB NSTKOC NSTKOD NUFKOA NUFKOB NUFKOC NUFQOA NVTKOA NVTKOB NVTKOD NXTKOA OFXKOB OFXKOC OFXKOD OFXKOE ORAKOA ORAKOB ORGIOO ORGIOV ORGJOH ORGJOJ ORGJOP ORGJOT ORGKOA ORGKOB ORGKOD ORGKOE ORGKOF ORGQOA ORGQOB ORGSO1 ORGSO2 ORGSOE ORIIOL ORIIOO ORIIOV ORIJOE ORIJOJ ORIJOK ORIJOT ORIKOA ORIKOB ORIKOC ORIKOD ORIKOE ORIKOF ORIKOG ORISOE OSHIOO OSHIOV OSHJOE OSHJOT OSHKOA OSHKOB OSHKOD OSHKOF OSHQOA OSHQOB OZFJOM OZLIOI OZLIOO OZLIOV OZLIOZ OZLKOA OZLKOB OZLKOC OZLKOD OZLKOG OZLSOE OZLSOF PDNIOI PDNIOO PDNIOV PDNIOZ PDNKOA PDNKOD PDNKOH PDNKOI PDNKOJ PPTKOA PPTKOB PPTKOC PPTKOD PPTKOE PPTKOF PPTQOA PPTQOB PRYKOA PRYKOB PRYKOC PRYKOD PRYKOE PRYQOA PRYQOB PTMKOA PTMKOB QANIOL QANIOO QANIOV QANJOE QANJOP QANJOQ QANKOA QANKOB QANKOC QANKOF QANKOG QANSOE QANSOH QAUKOG QAUKOH QBEIO1 QBEIO2 QBEIOI QBEIOL QBEIOO QBEIOV QBEIOZ QBEJOE QBEJOH QBEJOJ QBEJOQ QBEKOA QBEKOB QBEKOC QBEKOD QBEKOE QBEKOJ QBELOA QBELOB QBELOC QBELOD QBELOF QBELOJ QBELOK QBEQOA QBESO1 QBESOE QBESOF QBESOH QUBKOA QUBKOC QUBKOD RDVSOZ REAKOA REAKOF REAQOA RECKOB REGKOA REGKOB RFGKOA RFGKOB RFGKOC RHCJOP RHCJOT RHCKOB RHCKOD RHCSO1 RHCSOG RIOIO1 RIOIO2 RIOIOI RIOIOL RIOIOM RIOIOO RIOIOV RIOIOZ RIOJOC RIOJOE RIOJOF RIOJOJ RIOJOT RIOKOA RIOKOB RIOKOC RIOKOE RIOKOF RIOKOG RIOKOL RIOKOM RIOKON RIOKOO RIOLOE RIOLOF RIOLOG RIOLOH RIOLOI RIOLOJ RIOQOA RIOQOD RIOQOE RIOQOF RIOSO1 RIOSOE RIOSOF RIOSOG RIOWOA RIOWOB RIOWOI RIOWOJ RIOXOC RIOXOD RMDKOA RMDKOB RMDKOC RMDKOE RMDSO1 RRLKOA RRLKOC RRLKOD RSGKOA RSGKOC RSGKOO S32JOF S32JOT S32KOA S32KOD S32KOF S32KOG S32KOH S32KOI S32QOA SCGKOA SCGKOB SCPKOA SCPKOC SCPKOD SEKKOA SEKKOB SEKKOC SEKKOD SEKQOA SFRKOA SFRKOB SFRKOC SFRKOD SFRKOJ SFRKOL SFRQOA SFYIOL SFYJOM SFYSO1 SFYSOE SFYSOG SFYSOX SGBIOH SGBIOL SGHKOB SGHKOC SGHKOD SGHKOF SGHKOG SGMKOA SGMKOB SGMKOC SGMKOD SGMKOE SGMKOF SGPJOE SGPJOF SGPJOP SGPKOA SGPKOB SGPKOF SHLKOA SHLKOB SHLQOA SHLSO1 SIPKOA SIPKOB SIPKOC SIRJOA SIRKOD SIRKOE SIRKOG SKIJOE SKIJOF SKIJOP SKIKOA SKIKOB SLFIOL SLFSO1 SLFSOX SPFKOB SPFKOD SPFKOE SPFKOF SPFKOL SPFKOM SPFKOO SPFQOA SPFQOB SPFQOC SPKSO1 SPOKOA SPOKOB SPOKOF SRXKOA SRXKOE SRXKOG STOIOI STOIOL STOIOO STOIOV STOIOZ STOJOM STOJON STOJOO STOJOQ STOJOT STOKOA STOKOB STOKOC STOKOD STOKOE STOKOM STOKON STOKOO STOQOA STOSO1 STOSO2 STOSOE STOSOG STOSOH STWIO1 STWIO2 STWIOM STWJOC STWJOD STWJOE STWJOP STWJOQ STWSO1 STWSOA STWSOB STWSOE STWSOF STWSOG STWSOX SULKOA SULKOD SUNIOI SUNIOM SUNIOO SUNIOV SUNIOZ SUNJOE SUNJOF SUNJOG SUNJOH SUNJOJ SUNJOK SUNKOA SUNKOB SUNKOC SUNKOD SUNKOE SUNSO1 SUNSOE SUNSOG SWMJOP SWMJOR SWMJOT SWMJOU SWMKOA SWMKOB SWMKOC SWMKOF SXYJOT SXYKOB SXYKOC SXYKOD SYDIOO SYDIOV SYDJOP SYDJOR SYDJOT SYDKOA SYDKOD SYDKOE SYDSO1 SYDSOE SYDSOG SYISOE SYISOF SYISOX TAHJOE TAHJOF TAHJOP TAHJOQ TAHKOA TAHKOB TAHKOC TAHKOD TAHKOE TAHSO1 TAHSOE TAHSOG TCLJOE TCLJOJ TCLJOK TCLKOB TCLKOD TCLSOE TCLSOH TLSIO1 TLSIO2 TLSIOI TLSIOL TLSIOM TLSIOO TLSIOV TLSIOZ TLSJOC TLSJOD TLSJOE TLSJOF TLSJOG TLSJOH TLSJOI TLSJOJ TLSJOK TLSJOL TLSJOQ TLSJOS TLSKOA TLSKOB TLSKOC TLSKOD TLSKOE TLSKOF TLSKOI TLSKOK TLSKOL TLSLOA TLSLOB TLSLOC TLSLOD TLSLOG TLSLOH TLSLOI TLSQOA TLSSO1 TLSSOB TLSSOC TLSSOE TLSSOF TLSSOG TLSSOH TLSWOA TLSWOB TLSWOI TLSWOJ TNESO1 TOLIOO TOLIOV TPIKOB TPIKOC TPMKOA TPMKOB TRSKOD TSEJOA TSEJOE TSEJOF TSEJOP TSEJOU TSEKOA TSEKOB TSEKOE TSEQOA TTSIOO TTSIOV TTSJOE TTSJOF TTSJOP TTSKOB TTSKOC TTSKOD TTSSO1 TWEKOE TWEKOF UGLKOA UGLKOC UGLKOD VASSO1 VASSOA VASSOB VASSOC VEUSOB VEUSOC VEUSOD VEUSOG VHYSO1 VHYSOA VHYSOB VHYSOC VHYSOG VRTJOE VRTJOT VRTJOU VRTKOA VRTKOB VRTKOD VRTKOE VTSSOB VTSSOC VTSSOG WBCIO1 WBCIO2 WBCIOI WBCIOL WBCIOO WBCIOV WBCIOZ WBCJOC WBCJOE WBCJOF WBCJOH WBCJOJ WBCJOK WBCJOT WBCKOA WBCKOB WBCKOC WBCKOD WBCKOE WBCKOF WBCKOG WBCKOH WBCKOI WBCKOJ WBCKOK WBCKOL WBCLOB WBCLOC WBCLOD WBCLOE WBCLOF WBCLOH WBCQOD WBCQOF WBCQOG WBCQOH WBCQOI WBCQOK WBCQOL WBCSO1 WBCSOB WBCSOC WBCSOE WBCSOF WBCSOG WBCSOH WBCWOA WBCWOB WBCWOI WBCWOJ WBCXOC WBCXOD WDCIOI WDCIOL WDCIOO WDCIOV WDCIOZ WESIO1 WESIO2 WESIOI WESIOL WESIOO WESIOV WESIOZ WESJOE WESJOF WESJOH WESJOI WESJOK WESJOL WESKOB WESKOC WESKOE WESKOG WESKOH WESKOI WESLOA WESLOB WESLOC WESLOD WESLOH WESQOA WESQOB WESSO1 WESSOE WESSOF WESSOG WFDIOL WFDIOV WFDIOZ WFDJOG WFDJOJ WFDJOK WFDKOA WFDKOB WFDKOD WFDKOE WFDSO1 WHCKOA WHCKOB WHCKOC WHCKOF WHCKON WHCQOA WORIOO WORIOV WORKOA WORKOC WORKOD WORKOE WORKOF WORQOA WORQOB WOWIO1 WOWIO2 WOWIOI WOWIOL WOWIOO WOWIOV WOWIOZ WOWJOC WOWJOD WOWJOE WOWJOF WOWJOI WOWJOP WOWJOU WOWKOA WOWKOB WOWKOC WOWKOD WOWKOE WOWKOF WOWKOG WOWSO1 WOWSOB WOWSOE WOWSOF WOWSOG WOWSOH WPLIO1 WPLIO2 WPLIOI WPLIOL WPLIOO WPLIOV WPLIOZ WPLJOC WPLJOH WPLJOI WPLJOJ WPLJOT WPLJOU WPLKOA WPLKOC WPLKOD WPLKOE WPLKOF WPLKOG WPLKOH WPLKOI WPLKOJ WPLKOK WPLLOA WPLLOB WPLLOC WPLLOD WPLLOE WPLQOA WPLQOB WPLQOF WPLQOG WPLSO1 WPLSOE WPLSOF WPLXOC WPLXOD WRTKOA WRTKOB WSAKOA WSAKOB WSAKOC WSAKOD WSAQOA XJOKOA XJOKOB XJOKOC XJOKOD XJOKOF XJOKOG XJOKOH XJOKOI XJOKOJ XJOKOK XJOKON XJOKOO XJOLOA XJOLOB XJOLOC XJOLOD XJOLOE XJOLOF XJOLOG XJOLOH XJOLOM XJOMOA XJOMOB XJOMOC XJOMOD XJOMOE XJOQOA XJOQOB XJOQOC XJOQOD XJOQOE XJOQOF XJOQOG XJOQOH XJOQOI XJOQOJ XJOQOK XJOQOL XJOWOA XJOWOB XJOWOC XJOWOD XJOWOE XJOWOF XJOWOG XJOWOH XJOWOI XJOWOJ XJOXOA XJOXOB XJOXOC XJOXOD XJOXOE XJOXOF XJOXOG XJOXOH YM1JOA YM1JOP YM1JOQ YM1JOT YM1SO1 ZCLKOA ZCLKOB ZCLKOC ZCLKOD ZCLKOE ZCLKOF ZCLKOG ZCLKOI ZGCKOA ZGCKOB ZGCKOC ZGCKOD ZGCKOE ZGCKOF ZGCKOG ZGCKOH ZGCKOK ZHGKOA ZHGKOB ZHGKOC ZHGKOG ZHGKOH ZHGKOI ZHGKOJ ZSIKOA ZSIKOB ZSIKOC ZSIKOD ZSIKOJ AADKOP AADKOQ ABCKOP ABCKOQ AGLKOP AGLKOQ AGLKOR AGOKOQ AGOKOR AGOKOS AGOKOU AGOKOV AIOKOQ AIOKOR AIOKOT AIOKOU ALLKOP ALLKOS ALLKOU ALLKOV ALQKOP ALQKOQ ALQKOR ALQKOS AMCKOP AMCKOQ AMCKOS AMCKOT AMPKOP AMPKOQ AMPKOR AMPKOS AMPKOU AMPKOV AMPLOP AMPLOR AMPLOS AMPLOU AMPLOV ANNKOP ANNKOQ ANNKOR ANNKOS ANZKOQ ANZKOS ANZKOT ANZKOU ANZKOV ANZKOW ANZKOY ANZKOZ ANZLOP ANZLOQ ANZLOR ANZLOS ANZLOT ANZLOU ANZLOW ANZQOR ANZQOS ANZWOP ANZWOQ ANZWOV ANZWOW ANZXOR ANZXOS APAKOR APAKOS ARIKOP ARIKOT ARIKOW ASXKOP ASXKOQ ASXKOS ASXKOT ASXKOU AWCKOP AWCKOR AWCKOT AWCKOV AWCKOX AWCKOY AWEKOP AWEKOQ AWEKOR AWEKOS AZJKOQ AZJKOR AZJKOT AZJKOZ BENKOP BENKOT BENKOU BHPKOP BHPKOQ BHPKOR BHPKOU BHPKOV BHPKOW BHPKOX BHPKOY BHPKOZ BHPLOP BHPLOQ BHPLOR BHPLOS BHPLOT BHPLOU BHPLOX BHPLOZ BHPQOP BHPQOQ BHPQOT BHPQOU BHPQOW BHPWOP BHPWOQ BHPWOS BHPWOT BHPWOU BHPXOR BHPXOS BKNKOV BKNKOW BLDKOP BLDKOQ BLDKOU BOQKOP BOQKOQ BOQKOV BPTKOP BPTKOR BPTKOS BSLKOP BSLKOQ BSLKOS BSLKOT BXBKOP BXBKOQ BXBKOT CARKOP CARKOT CBAKOP CBAKOT CBAKOU CBAKOV CBAKOW CBAKOX CBALOP CBALOR CBALOS CBALOT CBALOU CBALOV CBALOX CBALOZ CBAQOS CBAQOT CBAQOV CBAQOX CBAWOP CBAWOQ CBAWOV CBAWOW CBAXOR CBAXOS CCLKOQ CCLKOR CCLKOS CDDKOQ CDDKOR CDUKOQ CGFKOP CGFKOS CGFKOT CGFKOU CIMKOP CIMKOQ CIMKOS CIMKOT COHKOP COHKOQ COHKOR COHKOT COHKOU CPUKOQ CPUKOS CPUKOU CSLKOP CSLKOQ CSLKOR CSLKOS CSLKOT CSLKOX CSLKOZ CSLQOQ CSRKOP CSRKOQ CTXKOQ CTXKOR CTXKOZ CWNKOP CWNKOQ CWNKOS DJXKOP DJXKOQ DJXKOR DJXKOS DJXKOT DJXKOU DJXKOV DJXKOW DLXKOP DLXKOQ DMPKOP DMPKOQ DMPKOR DMPKOW DOWKOP DOWKOR DOWKOS DOWKOT DUEKOP DUEKOQ EGPKOP EGPKOQ EGPKOR EHEKOP EHEKOQ FBUKOP FBUKOQ FLTKOP FLTKOQ FLTKOS FLTKOT FLTKOU FMGKOP FMGKOQ FMGKOS FMGKOT FMGKOX FMGQOR FMGQOU FMGQOV FMGQOW FMGQOY FMGWOP FMGWOQ FMGWOV FMGWOW FXEKOP FXEKOQ FXEKOR FXEKOS FXEKOT FXJKOQ FXJKOR FXJKOS FXJKOT FXPKOP FXPKOS FXPKOT FXPKOU FXUKOP FXUKOQ FXUKOR FXUKOS FXUKOT FXUKOU FXUKOV FXUKOW FXUKOX FXUKOY FXUMOP FXUQOP FXUQOQ FXUQOR FXUQOS FXUQOT FXUQOU FXUQOV FXUQOW FXUQOX FXUQOY FXUQOZ FXYKOP FXYKOQ FXYKOS FXYKOX FXYKOY FXZKOP FXZKOQ FXZKOR FXZKOS FXZKOT GMAKOP GMAKOQ GMGKOP GMGKOT GPTKOP GPTKOQ GPTKOR GWAKOQ GWAKOR HGGKOR HGGKOS HSXKOP HSXKOQ HSXKOR HSXKOS HVNKOP HVNKOR HVNKOW IAGKOP IAGKOV IAGKOW IGOKOP IGOKOT IGOKOU ILUKOQ ILUKOR ILUKOS ILUKOV ILUKOX IPLKOP IPLKOQ IPLKOR IPLKOS IPLKOT IVCKOR IVCKOS IVCKOT JBHKOP JBHKOT JBHKOU JBHKOV JHXKOQ JHXKOR JHXKOU KARKOP KARKOR KARKOU KARKOV LLCKOQ LLCKOU LLCKOV LLCKOW LNGKOR LNGKOS LYCKOP LYCKOQ LYCKOS LYCKOT LYCKOU LYCKOV MFGKOP MFGKOR MFGKOT MGRKOP MGRKOQ MGRKOT MGXKOQ MGXKOR MGXKOU MGXKOV MINKOP MINKOQ MINKOT MMLKOQ MMLKOU MMLKOV MMSKOP MMSKOQ MNDKOP MNDKOQ MNDKOT MPLKOP MPLKOQ MPLKOR MQGKOP MQGKOQ MQGKOR MQGKOS MQGKOT MQGKOV MQGLOP MQGLOQ MQGLOR MQGLOS MQGLOU MQGLOV MQGLOX MQGQOQ MQGQOV MQGQOX MQGQOY MQGWOP MQGWOQ MQGWOV MQGWOW MQGXOR MQGXOS MSBKOQ MSBKOR MSBKOS MTSKOP MTSKOR MTSKOS MTUKOP MTUKOQ MYRKOP MYRKOR MYRKOS MYRKOT NABKOP NABKOQ NABKOR NABKOS NABKOV NABKOW NABKOX NABLOP NABLOQ NABLOS NABLOT NABLOW NABLOX NABQOP NABQOQ NABQOR NABQOW NABWOP NABWOQ NABWOV NABWOW NABXOR NABXOS NCMKOP NCMKOQ NCMKOR NCMKOS NCMLOP NCMLOQ NCMLOS NCMLOT NCMLOX NCMQOP NCMQOQ NCMQOR NCMQOT NCMWOP NCMWOQ NCMWOV NCMWOW NDXKOP NDXKOQ NDXKOR NDXKOT NECKOP NECKOQ NECKOS NI2KOS NI2KOT NI2KOU NI2KOW NI2KOY NSTKOP NSTKOQ NSTKOT NUFKOP NUFKOQ NVTKOP NVTKOS OFXKOQ OFXKOR ORAKOP ORAKOQ ORGKOP ORGKOR ORGKOT ORGKOU ORIKOS ORIKOT ORIKOU OSHKOQ OSHKOR OSHKOT OZLKOP OZLKOQ OZLKOR OZLKOV PDNKOP PDNKOQ PDNKOR PDNKOS PDNKOZ PPTKOQ PPTKOR PPTKOS PRYKOP PRYKOR PRYKOT PRYKOU PTMKOP PTMKOS QANKOQ QANKOR QANKOS QANKOT QBEKOP QBEKOQ QBEKOR QBEKOS QBEKOT QBEKOX QBELOP QBELOQ QBELOS QBELOT QBELOU QBELOV REAKOP REAKOQ REAKOS REAKOT RECKOP RECKOQ RECKOR RHCKOP RHCKOQ RHCKOR RIOKOP RIOKOQ RIOKOR RIOKOS RIOKOU RIOKOV RIOKOX RIOKOY RIOKOZ RIOLOP RIOLOQ RIOLOR RIOLOS RIOLOT RIOLOW RIOQOP RIOQOQ RIOQOR RIOQOS RIOQOT RIOQOU RIOWOP RIOWOQ RIOWOV RIOWOW RIOXOR RIOXOS RMDKOR RMDKOS RMDKOT RSGKOP RSGKOQ RSGKOS S32KOR S32KOS S32KOT S32KOU S32KOV SCGKOP SCGKOR SCPKOP SCPKOQ SCPKOR SEKKOP SEKKOQ SEKKOR SEKKOS SEKKOV SFRKOP SFRKOQ SFRKOR SFRKOS SFRKOT SFRKOV SGHKOP SGHKOQ SGMKOP SGMKOQ SGMKOS SGMKOT SGPKOP SGPKOR SGPKOS SHLKOP SHLKOQ SIPKOP SIPKOR SIRKOQ SIRKOR SIRKOS SKIKOP SKIKOQ SPFKOP SPFKOQ SPFKOR SPFKOS SPFKOT SPFKOU SPFKOV SPFKOW SPFKOZ SPFQOP SPFQOQ SPFQOS STOKOP STOKOQ STOKOR STOKOS STOKOT STOKOU SULKOP SULKOR SUNKOP SUNKOQ SUNKOV SUNKOW SWMKOP SWMKOQ SWMKOR SWMKOS SXYKOP SXYKOQ SXYKOR SXYKOS SXYKOT SXYKOU SYDKOQ SYDKOR SYDKOS TAHKOP TAHKOQ TAHKOT TCLKOQ TCLKOT TLSKOP TLSKOR TLSKOT TLSKOW TLSKOY TLSKOZ TLSLOP TLSLOQ TLSLOR TLSLOS TLSLOT TLSLOU TLSLOV TLSQOQ TLSQOR TLSWOP TLSWOQ TLSWOV TLSWOW TPIKOP TPIKOQ TRSKOP TRSKOQ TSEKOP TSEKOQ TTSKOQ TTSKOR TWEKOP TWEKOQ UGLKOP UGLKOQ UGLKOR VRTKOP VRTKOQ VRTKOR WBCKOP WBCKOQ WBCKOR WBCKOS WBCKOT WBCKOU WBCKOV WBCKOW WBCKOX WBCKOZ WBCLOP WBCLOQ WBCLOS WBCLOT WBCLOU WBCLOV WBCLOW WBCLOY WBCQOR WBCQOS WBCQOT WBCQOU WBCQOV WBCWOP WBCWOQ WBCWOV WBCWOW WBCXOR WBCXOS WESKOP WESKOQ WESKOR WESKOS WESKOT WESKOU WESKOV WESKOW WESLOP WESLOQ WESLOR WESLOS WESLOT WESLOU WESLOV WFDKOP WFDKOQ WFDKOR WFDKOS WFDKOT WHCKOQ WHCKOR WHCKOS WHCKOT WHCKOU WORKOP WORKOQ WORKOR WOWKOQ WOWKOR WOWKOS WOWKOT WOWKOU WOWKOW WPLKOP WPLKOQ WPLKOR WPLKOS WPLKOT WPLKOU WPLKOY WPLKOZ WPLLOP WPLLOR WPLLOT WPLLOU WPLLOV WPLXOR WPLXOS WRTKOP WRTKOR WSAKOT WSAKOU XJOKOP XJOKOQ XJOKOR XJOKOS XJOKOT XJOKOU XJOKOV XJOKOW XJOKOY XJOKOZ XJOLOP XJOLOQ XJOLOR XJOLOS XJOLOU XJOLOW XJOLOY XJOLOZ XJOMOT XJOMOV XJOMOZ XJOQOP XJOQOQ XJOQOR XJOQOS XJOQOT XJOQOU XJOQOV XJOQOW XJOQOY XJOWOP XJOWOQ XJOWOR XJOWOS XJOWOT XJOWOU XJOWOV XJOWOW XJOWOX XJOWOY XJOXOP XJOXOQ XJOXOR XJOXOS XJOXOT XJOXOU XJOXOV XJOXOW ZCLKOP ZCLKOQ ZCLKOR ZCLKOS ZCLKOT ZCLKOU ZCLKOV ZGCKOP ZGCKOQ ZGCKOT ZGCKOV ZGCKOW ZGCKOX ZHGKOP ZHGKOS ZHGKOU ZHGKOW ZHGKOX ZHGKOY ZSIKOQ ZSIKOR ZSIKOS ZSIKOT ZSIKOU CLY CYO CYODA CND CNDAI CLZ CLZO CLZAM CSS CLQ CLQN CLQXX CLQAA CLQAI CVW CVWXX CVWAI CDG CDGO CDGAA CDGAK CDGAU CDGAZ CDGAO CDGAW CAM CAMPA CAMO CIW CUV CUVAK CLV CLVAI CLVAQ CMI CMIAQ CM9 CGR CGRG CZA CZAAB CZAAI CZAAS CZAAQ CZAAZ CBQ CPL CAX CGW CGWAI CCL CCLBSK COH COHAI COHAK COK COKYY COKAM COKAU COKAW COKAI COKAO CDA CDAAI COF COFAI CGS CGSAU CHK CHKDA CHKAA CKA CKAN CKAAA CKAAB CKAAC CKAAK CKAAM CKAAO CKAAS CL8 CL8DA CL8DB CL8O CL8AP CL8AM CLH CLHAK CKF CKFAI CNGAI CNGAK CNGHA CKL CRL COI COIAA COIAO ZHG ZGC ZSI CEI CBA CBAN CBAR CBAPA CBAPC CBAPD AGLIYA AGLIYB AGLIYE AGLIYF AMCIYA AMCIYB AMCIYE AMCIYF AMPIYA AMPIYB AMPIYE AMPIYF ANZIYA ANZIYB ANZIYC ANZIYE ANZIYF ANZIYG ANZIYH ANZIYZ ASXIYB ASXIYE ASXIYF AZJIYA AZJIYB AZJIYE AZJIYF BENIYA BENIYB BENIYE BENIYF BHPIYA BHPIYB BHPIYE BHPIYF BHPIYG BHPIYH BOQIYA BOQIYB BOQIYE BOQIYF BXBIYA BXBIYB BXBIYE BXBIYF CCLIYA CCLIYB CCLIYE CCLIYF CPUIYA CPUIYB CPUIYE CPUIYF CSLIYA CSLIYB CSLIYE CSLIYF CSLIYG CWNIYE CWNIYF FMGIYA FMGIYB FMGIYE FMGIYF IAGIYA IAGIYB IAGIYE IAGIYF ILUIYA ILUIYB LLCIYA LLCIYB LLCIYE LLCIYF MPLIYE MPLIYF MQGIYA MQGIYB MQGIYC MQGIYE MQGIYF MQGIYG MQGIYH NABIYA NABIYB NABIYC NABIYE NABIYF NABIYG NABIYH NABIYZ NCMIYA NCMIYB NCMIYE NCMIYF ORGIYA ORGIYB ORGIYE ORGIYF QANIYE QANIYF QBEIYA QBEIYB QBEIYE QBEIYF QBEIYG RIOIYA RIOIYB RIOIYE RIOIYF RIOIYG SHLIYE SHLIYF STOIYA STOIYB STOIYE STOIYF STOIYG STWIYA STWIYB STWIYE STWIYF STWIYG STWIYY STWIYZ SUNIYA SUNIYB SUNIYE SUNIYF SYDIYA SYDIYB SYDIYE SYDIYF TAHIYA TAHIYB TAHIYE TAHIYF TCLIYA TCLIYB TCLIYE TCLIYF TLSIYA TLSIYB TLSIYC TLSIYE TLSIYF TLSIYG TLSIYH TLSIYZ TOLIYE TOLIYF WBCIYA WBCIYB WBCIYC WBCIYE WBCIYF WBCIYG WBCIYH WBCIYZ WESIYA WESIYB WESIYE WESIYF WFDIYE WFDIYF WOWIYA WOWIYB WOWIYE WOWIYF WPLIYA WPLIYB WPLIYE WPLIYF CBAXX CBAYY CBAZZ CBAAK CBAHA CBAHW CBAHU CBAHV CBAHX CBAHY CBAHZ COJ COJAA COM COMAA CFFHB CFFHC CMR CMRAF CMRAM CMRAO CMP CPU CPUPA CPUAK CPS CPSO CDB CDBDA CDBAA CDBAK CPD CPDAM CPDAQ CPDAS CNJ CNJAI CXZ CXZDA CXZO CXZAB CQA CZL CZLDA CZLDB CZLO CZLXX CZLAI CZLAK CZLAL CZLAO CGI CMJ CSD CSDO CSDAK CEN CIE CIEO CIEZZ CTN CTNG CTNAI CCC CCCN CCCO CCCAI COT COTAI CVG CVGAA COE COEAI SPC01 CSE COY COYO COYAI COYAO COYAP COYAN CZN CZNAI CZNAK CZNAS CXO CXOAQ CXOAR CXOAS CXOAT CXOAU CXOAK CTD COO COOAQ CGC CGCXX CGCZZ CGCAA CMT CMTO CMTAQ CMTAS CMTAU CMTAY CGM CGMAK CUP CCJ CCJN CCJAK CCJAO CCJAI CCJAM CVT CVTDA CVTXX CVTAG CVTAB CVTAD CVTAL CVTAH CVTAK CVTAF CVE CVEO CYG CYY CYYAI CYYAK CVO CZR CZRAA CGO CGOAI CXX CXXAW CXXAQ CXXAX CXXAY CXXAZ CGN CGNR CGNG CGNAH CGNDA CCP CFP ORB CRQ CRQAM CRQAW CRQAK CRQAQ CRQAS CRQAY CTT CTTAA CTTAB CTTAI CTTAQ CTTAW CTTAY CTTAZ CRX CRXAB CRXAI CRXAK CRXAM CRXAU CRXAY CMW CMWAM CMWAU CMWAY CMWAZ CMWAA CMWAO CFM01 CUX CM8 CM8DA CM8AA CM8AB CM8AC CWN CWNHA CWNHB ZCL CRIHA CUFHA CUHHA CTKHA CTKHB CTUHA CTUHB CTJHA CTHHA CTHHB CSNHA CSNHB CAS CASAS CTE CTEAM CSV CSVXX CSVAR CSVAQ CSVAI CSL CSLAI CSLAK CSR CSZ CLX CDU CDUO CUE CUEDA CQC CQCAA CQCAK CQCAW CQCAY CQCAZ CUL CULAA CULAB FXE FXP FXH FXY FXZ FXS AXU FXU FXB XAD FEJ FEU FUH FUJ CV1 CVC CWH CWHAK PB1 CX1 CYC CYP CYPAM CYPAI CYPAK DCN DCNAJ DCNAK DCNAO DCNAI DKO DKODA DKODB DKOO DKOAA DKOAI DKOAK DKOAM DAU DAUAO DNK DNKAA DNKAB DNKAC DNKAI DNKAS DNKAU DNKAZ DNKAM DTM DTMAK DTMAM DTMAO DTMAQ DTMAS DTMAU DTMAV DTMN DTL DDT DDTAI DDTAJ DDTAK DTR DJS DEG DEGAM DSX DSXDA DSXAM DSXAA DSXAO DCG DCGAK DCGAI DYL DYLAQ DFE DLC DSB DSBAI DMI DMIAI DGH DGHXX DDF DIT DOT DVN DVNAI DVNAW DXS DXSDA DGR DGRAA DGRAY DGRAZ DGRAB ZDI DRX DRXO DRXAJ DRXAI DSH DSHAA DSHAB DDR DDRXX DDRYY DGA DCC DCCDC DCCAQ DCCAI DCCAM DCCAO DCCAS DCCAU DCCAV DXB DXBO DGX DIR DIRAI DIRAO DIRAS DM1 DM1XX DM1AA DM1AB DM1AC DM1AD DM1AE DM1AF DM1AG DAF DAFO DAFAK DAFAM DML DVI DIVXX DVIAU DVIAY DVIN DVIAB DVA DVADA DVANA DVAG DVAZZ DVAAI DVAAK DVAAM DUI DJW DJX DMY DMYDC DMYN DMYR DMYAA DBNHA DME DMEAW DMEAI DMEAY DMP DMPAK DMPAS DNA DNAN DNAAA DNAAB DNAAI DNAAK DBI01 DFM DFMXBB DRM DRMN DRMNA DRMO DRMXX DRMAI DRMAM DVL DVLN DVLXX DVLZZ DVLAI DVLAA DUO DUODC DUODE DUONA DUODD DUOO DUOAA DUOAB DUOAC DOW DLE DLEAI DLEAM DRA DMG DMGAZ DRG DRGAA DRGAQ DRGAS DRGAI DRGAK DRGAM DRGAO DRK DRKOA DRKOB DRKAQ DLS DLSAK DLSAO DLSAQ DAOHA DAOHB DAQHA DAQHB DGO DGODA DTI DUB DUBDA DUBR DUBAC DUBAE DUBAF DUBAH DUBAI DUBAB DUBAJ DUBAK DUBAL DUBAD DUBAG DUE DUEXX DUEYY DUEAI DUEAK DUEAM DKM DKMAA DKMAG DKMAH DKMAI DKMAJ DKMAK DKMAB DKMAC DKMAD DKMAE DKMAF DLX ZYX DWS DYE DYEAI DYEAK DMA DMAN DMANA DMAR DMAO DMAAI EAL ENL ENLOA ENLAI ENLAK EAF EAFDA EAFXX EAFAA EER EERAI EFE EFEAK EFEAL EFEAQ EAS EASAK EBT EBO ECG ECGAB EGP EGPAK EGPAI EAR EARN ECO ECOAJ ECODA EPM EPMAM EPMAO ECX ECXAA ECV EDE EDEO EDEAK EDEAI ETG ENN ENNAA ENNAB ELD ELDDA ELDPA EOS ELM ELMO ELMAAX ELMAA ELMAB ELMAC ELMAK ELMAU ELMAM ELMAS ELMAW ELT ELTAK ELTAW ELTAX ELTAM ELTAQ ELTAS ELTAU EXR EXRO EXRAA EXRAC EXRAD ELK ELKO ELKAI ELKAK ELKAM EAI EAIYY EAIZZ EGI EGIO EGIAA ELX ELR ELRAI ELRAK EYM EYMNA EYMO EYMOA EYMOB EYMAA EYMAC EYMAI EYMAK EMB EHL EHLAI EMR EMRAA EML EMLAA EMLAB EMLAW EMLAY EMG EMGAM ECL EMF ERM ERMAA ERMAI ERX ERXXBB ERXAA EEG EEGN EEGAI EEGAM EGO EGOO EGOOA EGOAB ERL ERLAK EPD EPDAI EMU EMUAO EMUAI EOR EORAI EORAM ENR ENRAO ENRAK ENRAM EVR EVRAI EVRAK ENB ENBAA ENX ENXO EMX EMXAM EAX EAXAI ENE ENEAA ENEAZ ENEAI ENEAM ENEAW ENEAY ENEAQ ENEAS ENEAU EME EOL EOLAK EOLAL EOLAM ERA ERAAI ESL EGY EGYAA EVE EWC EWCAA ERJ ERJO ERJOA EGG EGGAI EGN EGNAI ENH ENC E88 ENA ENAAO ENAAA ENAAB ENAAM ETE ETEAO ENT ENTAS ENTAT ENTAU ENTAV ENU ESI ESIOA ESIOB ERR ERRAA ERRAB EVM EVMAM EGL EGLN EGLAA ENZ ENZDA ENZXBB ENZAA ENZAW ENZAB ENZAC ENZAD EPA EPAAI EPAAA EQU EQX EQXAA EQXAB EQXAQ EQT EQTAI EQY01 EQY02 EQY03 EQY04 EQE EQEAI ERI ERINA ERIOB ERIAQ ERIAS ERIAT ERIN ERIO EPW EPWAM EPWAO EPWAQ ESV ESVAM ESM ESMAB ESMAA EHE EHEAA ESR ESRNA ESRAA ESRAB ESRAC ESRAD ESRAE ESRAF ESRAW ESRAY ESRAZ ESRAK ESRN ETPAGR ETPCMD ETPCOP ETPCRN ETPGAS ETPGRN ETPIND ETPMAG ETPMPD ETPMPM ETPMPT ETPNRG ETPOIL ETPWHT ETP GLD GOLD GOLAI EPX ESK ESKAA ESKAI ESKAK ESKAM ESKAO EUM EBG EGH EUG EMH EMHO EMHAB EMHAC EZL EAP01 EAP02 EAP03 EVN EVNAM EVNAS EVNAK EVNAO EVO EVZ ERD ERDO ERDAO EXM EXG EXGAJ ETS EXE EXEAI EXU EXUDA EXUO EXUAA EXC EXCAA EXCAW EZA FFI FBK FXJ FXJAA FXJAB FAS FCN FCNN FAN FANAA FAR FARAM FRM FRMAM FRMAO FRMAQ FFC FWY FFG FFGO FFGAC FEL FELAA FDCN FDC FDCDA FDCAK FWL FWLAQ FWLAI FWLN FCR FCRAA FCRAM FCRAK FTZ FTZAO FTZAQ FID FIDAA FRI FND FNDAM FNDAI FNDAQ FNDAZ FSE FSEAF FSEAG FSEAH FIE FIEOA FIEO FGF FGFO FGFOA FMBHA FMMHA FMNHA FMAHA FPH FPHAA FPHAB FPHAF FPHAW FPHAC FPHAD FPHAE FPHAS FPHAU FIT FITDA FRY FRYDA FRYAB FRYAC FRYAD FZR FSI FGI FWD FWDAP FWDAO FWDAQ FBU FXL FXLAK FRX FRXAA FRXAB FRXAC FLT FLTAK FMS FMSAR FML FMLDA FMLAQ FET FLK FLKAI FLKAK FLKAM FSF FSFAA FRC FMG FMGAK FOBHA FXR FXRO FXRAA FXRAI FXRAM FXRAQ FXRAS FXRAU FXRAW FXRAY FX2 FX1 FOY FOYDA FOYAC FOYAI FOYAA FLR FRN FNP FNPAK FNPAS FNPAQ FLN FLNXX FLNAI FRE FCG FCGO FCGAA FCGAK FCGAB FNT FNTAI FNTAJ FSA FT1 FUN FUNAK FFT FFTAA FGX FGXDA FGXO FGG FGGO FGGXX FYI FYIN FYIAA GUD GEM GRB GXY GXYAO GXYAQ GXYAK GXYAM GXYAR GXYAI GAP GAPAS GAL GALO GALAI GALAK GLL GLLAI GJT GDF GGX GGXAM GGXAK GGXN GGXO GCY GCYAI GCYAJ GTY GML GMLAI GZL GBX GBXNB GBM GBZ GBZO GBT GBTAK GBTAN GBTAO GBTAI GDI GDIAA GHCN GHC GHCXX GHCAI GHCAK GBI GBIAO GBIAQ GBIAA GMM GMMOB GNE GMD GMDAI GMDAU GMDAY GMDAZ GES GESAK GSS GSSAA GTG GTGAA GTGAC GTGAK GTGAM GTGAO GTGAQ GTGAS GTGAW GTGAY GNX GNXZZ GNXAA GNXAC GNXAD GNXAE GNXAB GTK GMA GMAAA GDY GDYAA GPR GPRAK GPRAM GPRAO GID GIDDA GIDAD GIDAU GIDAC GIDAB GBG GBGAS GIP GIPDA GIPN GLA GLAO GLAOA GLAAK ZGI GLN GLNO GC1 GC1O GC1XX GLE GCS GCSAO GFI GSC GSCOA GSCAM GSCAQ GSCAS GSCAI GSCAO GGH GLH GLHAI GFL GXN GXNCA GXNOB GXNAA GXNAI GBP GBPAI GRF GVF GVFO GLB GBE GBEAO GME GCN GCNAI GCNAJ GCNAK GFY ZAU GUS PMGOLD GD1 GMN GMNAI GMNAO GOR GORAW GORAB GORAC GORAD GORAS GCR GCRDA GCRAA GED GEE GMR GMRAB GMRAC GMRAD GMRAK GMRAY GMRAZ GMRAM GMRAO GMY GMYAI GPH GPHO GPHAI GSE GSEDA GDA GDAAI GDAAK GFF GFFN GFFR GMG GMGAM GMPPA GO1 GOW GPS GPT GMF GNG GNGAS GNGAQ GNC GNCAI GNCAK GGE GGEAA GBA GBAAI GRR GRRAU GEG GEGAA GEGAB GTE GTEAI GTEAK GTEAM GTEAP GNV GNVAA GNVN GNB GXL GXLAI GER GERAK GERAM GGG GGGOA GGGAA GGGAK GPP GPPAK GRS GRV GRVAI GRVAJ GRVAK GRVAL GRG GRGAK GRGAM GRGAO GRGAQ GRGAS GRGAU GRW GOZ GRP GRPDA GRPAA GRY GRYAY GRYAI GRYAS GTR GUF GUFAI GUFAM GUFAK GLF GLFAK GLFAY GMC GMCDA GMCAB GMCAI GMCAA GUL GULAM GULAO GULAQ GULAS GULAI GULAK GWA GWADA GWAAI GWR GWRAI GWRAM GWRAK GWRAO HCX HMX HMXDA HMXR HMXXX HMXAM HMXAN HHM HHMN HHMAI HHMAK HHMAU HHMAY HSX HNR HNRAA HSN HSNAI HAO HAOAK HAR HARAA HARAB HARAM HARAU HARAK HMI HMINB HMIAM HMIAO HVN HVNAI HVNAK HVNAM HTRHA HHY HAS HASAS HASAT HASAU HAV HAVO HAVAK HOG HOGAM HOGAO HAW HAZ HAZN HAZO HAZAI HAZAK HAZAL HAZAM HAZAY HBI HSO HSK HSKN HSKR HSKAY HSKAZ HSKXX HSKYY HSKAA HLX HLO HGG HGI HBSHB HBSHA HRR HRRAD HRRAI HFA HNG FRA HPR HPRDA HPRO HPRAM HPRAK HPRAO HFR HFRAQ HFRAA HFRAB HFRAC HFRAI HFRAM HFRAS HFRAY HFRAZ HFRAU HFRAW HIG HIGAI HEG HEGAI HLS HGO HGODA HGON HGOAT HGOAK HGOAU HIL HILAI HIT HITAI HJB HJBDA HDG HDGAI HCT HCTAA HCTAB HCTAC HOM HOMAI ZHS HZN HZNYY HZNAI HZNAK HZNAU HZNAN HZNAM HOR HCH HCHAA HPI HRL HRLDA HRLAO HUB HUBAV HUBAZ HUBAM HUBAO HUBAQ HUBAS HUBAU HUBAW HGL HGLXE HDX HDXAQ HDXAS HHV HHL HHLAK HUO HTA HTAAI ZHW HYB HYI HYR HYPHB HESHA HCSHB HCSHA ISY IANG IANAI ACC01 IAT IATAA IBB01 IBB02 IBB03 IBB04 IBB05 IBB06 IBB07 IBB08 IBB09 IBB10 IBB11 IBB12 IBB13 IBB14 IB5 IB1 IB8 ICI ICIO ICQ ICQN ICQXX ICT ICTDC ICTO ICTAO ICTAY ICTAZ ICTAB ICTAK ICTAA ICN ICNAI ICS ICSDA ICSAK IDM IDMAI IDMAK IDMAS IDMAU IDMAM IDMAO IDMAQ IDFHA IDFHB IDHHA IDHHB IDHHC IDJHA IDJHB IDJHC IDJHD IDJHE IDT IDTAK IF9 IFS IFSAI IIN IKW ILH ILAHA ILU IMI IMIDA IMIDB IMIO IMIOA IMA IMAAK IMAAO IMD IMDXX IMDYY IMDAA IMF IMFG IMFHA IMC IMCDA IMCDB IMCOA IMCAI IPT IPTN IPTR IPTO IPTAI IPTAK IPTAL IPTAM IPD IPDAW IPDAA IPDAAB IPC IMU IMUAK IMUAL IMUAM IXR IXRO IXRAA IXRAB IXRAO IAB ICG ICGN ICGR IPL IPLAI IOG IOGAK IOGAM IGO IGOAK INF INFZZ IRL IRLAZ IPA IPADA IPADC IDO IDOAS IDOAY IDODB IDC IDCAA IDCAI IDCAZ IDCAO IDCAQ IDZ IDZN IDZR IDZAQ IDZAO IDP IRN IRNAK ICBHA ICBHB ICZ ICZAQ ICZAS ICZAU ICZAY ICZAK ICZAO ICZAI IND INDDA INDDB INDO INDAI INDAU INDAK IDR IFN IFM IFMAI IFMAJ IFZ IFZAI INA INAAI INAAK IIL IILAI IILAY IILAZ IILAK IILAM IILAO IILAQ IILAS IILAU IVA IVAAI IVAAM IIM01 IAG IAGPC IAGAB IAGAA IAGAK INS01 IFXHF IFXHG IFXHH IFXHJ IFXHI IFXHL IFXHD IFXHK IGS IGSAI INL INLAM INLAN IRI IRIAQ IRIAS IRIAU IRIAV IRIAX IRIAY IRIAO IRIAW IC1 ZIC IRC IRCN IRCO ICX ICXAA ICXAB ICXAI ICXAN ICXAP ICXAR ICXAT ICXAV IEQ IOP IMOHA IMOHB IMOHC INNHB INNHC INNHD INHHB INHHC INHHD IMNHC IMNHD IMNHE INBHA INBHB INBHC INBHD IMXHA IMXHB IMXHC IMXHD IMGHA IMGHB IMQHA IMQHB IMQHC IMKHA IMKHB IMKHC IEC IECAA IECAO IAU IAUAI IAUAW IQE IVT IVTPA IAL02 IAL05 IAL08 IAL09 IAL11 IAL12 IAL41 IAL99 IXS IOF IVR IVRO IVRAS IVRAZ IVGOA IVO IVOO IVOXX IVOAI IVOAK IVX IVXAK IVXAN IVXAO IVXAQ IVXAR IVXAI IVXAM IVXAP IVC IFL IFLAI IPB IPBAK IPE IPH IPHAA IPHAB IP8 IP9 IPP IQ3 IQ3AB IQ3AA IQ3AC IQN IRE IREAI IRM IRMAA IRMAI IRD IRDAA IRDAY IBC IBCN IBG IBGAO IBGAQ IBGAR ISU ISUAM ISUAO ISD ISDAA ICU ICUAA ICUDA IAF DJU C25 IHOO ILB IJH IOZ BIF EMK IVV IHVV SP5 IHD I50 IJ6 ILC ISO IJR IGB IST ISI HYG LQD BRF ISH ISHAK ISHAQ IAA IZZ IEU IXJ IOO IXI IBK IVE IEM IHK IJP ISG IKO ITW IRU ISX ISXDA ISXDB ISXO ISXAA ISXAI ISXAB ISXAC ISN ISNAO ISNAW ISNAZ IXP ITD ITDAI IWG IWGDA IWGXX IWGAB JKA JKAO JKAAI JKAAS JKAAK JHX JHXAK JHXAI JAL JALAO JALAK JALAM JHC JHCAA JAT JBH JBHAI JCS JCSAI JRV JRVNA JCB JRL JRLAK JBLO JBL JBLOA JYC JYCAI JP5 JIN JINAM JINAI JPR JPRAM JPRXE JKL JKLDA JKLAA JKLAD JKLAK JKLAM JKLAN JKLAI JKLAB JKLAC JKLAE JKLAF JVG JVGAI KSC KAM KTE KTEDA KTEDC KAA01 KII KAB KABOA KABAI KABAK KABAM KABAO KABAQ KABAS KLR KLRAA KLRAB KLRAC KLRAD KIK KIKN KIKAK KIKAM KGI KGIOA KPO KPODA KPOO KPOOA KPOAA KGM KGMNA KGMAA KPT KPTR KRL KRLAK KRLAQ KRLAM KRLAS KAP01 KAR KARAI KARAQ KARAK KAS KASAO KASAS KASAT KASAQ KAT KATN KATO KMD KMDAK KPC KPCAI KPCAA KPCAB KPCAF KPCAH KPCAJ KPCAK KPCAL KPCAZ KPCAC KPCAD KPCAE KPCAG KBL KBLGA KBLAI KBLAJ KBLAK KEY KEYAI KEYAK KEYAN KEYAM KBC KBCPA KBCAI KFWHS KFWHP KFWHH KFWHK KFWHV KFWHQ KFWHW KFWHY KFWHZ KFWHN KFWHAB KFWHAC KFWHO KFWHR KFWHU KFWHX KFWHAA KGL KGLAA KGLAB KNL KNLN KNLO KNLAK KNLAQ KDR KDRAJ KRA KRAAU KRAAW KDL KDLN KDLAQ KDLAS KIN KINAK KINAM KPL KPLAM KSL KSLZZ KIP01 KKO KKOAI KIS KISDA KISAK KRC KRCO KRCOA KRCAA KRCAK KRCAU KSO KSOAM KFG KCN KCNAI KCNAK KCNAM KCNAO KRM KRMAB KRMAJ KRMAK KRMAY KRMAA KRMN KSN KSNNA KSNO KSNOA KSNOB KSNAA KME KMEAO KMEAQ KMEAR KNM KNMDA KNMAA KNMAK KNMAP KNMAQ KNMAR KNMAS KNMAI KNO KNOZZ KFE KFEO KFEAI KKL KKLAK KKLAU KKLAW KKT KKTAJ KKTAI KNH KOR KORN KORAA KORAB KOPHA KOV KOVAI KOS KTA KTAN KTAO KRS KTL KTLAK KTLAO KGD KGDAK KGDAM KGDAQ KGDAZ KGDAI KGDAO KGDAS KNE KNEO KNEAI KNEAS KPR KPRYY KPROA LSA LSAAI LCR LCROA LCRAK LCRAM LCRAN LCRAO LCRNA LCRO LKE LKO LKOGA LKOAK LMB LMBN LMBAP LMBAQ LDM LMW LMWAA LNY LNYCL LNYN LGR LGRAA LGRAB LGRAC LGRAD LGRAE LTN LTNAI LAM LAMXX LAMAI LAMAQ LAMAU LAMAW LBL LAS LASAI LASAO LAA LAAAA LAAAC LAAAD LRS LRSN LRSO LRSAS LRSAU LRSAX LRSAT LRSAV LCD LCDDA LCDDC LMG LMGAA LSN LBT LBTAI LBTAS LBTAU LBTAY LBTAK LBTAM LBTAO LER LERAL LERAM LERAI LERAK LCY LCYAK LCYAM LCYAU LCYAI LCYAO LCYAW LGD LEG LEGAM LMA01 LMA02 LMA03 LMA04 LMA05 LMA06 LMA07 LCK LCKAA LCKAB LMC LMR LMRAI LLC LRR LRRCD LRRAA LRL LRLAA LFC LFCAA LHC LHCAI LIC LICAI LICAK LML LIN LINO LINAM LAU LIO LIOAM LIOAQ LLO LLOAA LLOAB LSX LSXYY LNSHA LHB LHBAI LTR LTRN LTRO LTRAI LNG LNGAA LNGAP LTX LTXOA LTXAM LTXAQ LTXAI LTXDA LTXDB LIT LITCA LITCB LITAQ LITAA LITAM LITAU LITAW LVT LVTDA LVTXX LVTAM LCT LCTAM LL9 LK1 LSR LSRO LSRAM LCM LCMAI LCMAS LCE LNR LNRDA LNRAQ LGO LOV LOM LOMDA LOMDB LOMO LOMAA LOMAB LOMAC LOMAI LGM LGMAI LSLAK LWP LWPAZ LWPAS LYL LYLAM LYC LYCO LYCXE LYCAW LYCAU LYCAY MTU MTUAM MI8 MLD MLDAK MAH MAHAM MAHAI MRP MQA APS MBLPA MBLAO MBLAQ MBLAM MBLAR MBLHB AGLSMY ALLSMY AMPSMB AMPSMX AMPSMY ANZSMB ANZSMX ANZSMY ASXSMB ASXSMY BHPSMB BHPSMX BHPSMY BOQSMY BSLSMB BSLSMX BSLSMY BXBSMB BXBSMX BXBSMY CBASMB CBASMX CBASMY CSLSMB CWNSMB CWNSMY DUESMB DUESMX FX1WMA GPTSMY HGIIMJ IAGSMB IAGSMX IAGSMY JBHSMB LLCSMY NABSMB NABSMX NABSMY ORGSMB ORISMB ORISMY PPTSMX PPTSMY QANSMX QBESMB QBESMX QBESMY RIOSMB RIOSMX RIOSMY SGBIMF SGBIMG SGPSMB SGPSMY SGTMMH SUNSMB SUNSMX TAHSMB TAHSMX TAHSMY TCLSMB TCLSMX TCLSMY TLSSMX UGLSMB WBCSMB WBCSMX WBCSMY WESSMB WESSMX WESSMY WORSMB WOWSMB WOWSMX WOWSMY WPLSMB WPLSMX WPLSMY ZBHWMC ZRIWMC MQB MFNHA MGM MGI MQG MQGPA MQGAK MQGAM MQGAO MRN MRNAM MRNAU MAQ MAQAA MGE MFG MFGOC MFGAI MFF MFFO MHG MG1 MAU MAUCA MAUAI MAUAK MAUAM MAUAO MAUAQ MNS MNSO MNSAM MNSAK MPE MPEAI MGU MGUAK MGUAI MGL MHZHA MHYHA MAI MAIXBB MKE MKEAI MKEAM MKEAO MKEAQ MKEAW MKEAY MKEAZ MKEAA MKEAB MBC MBCAM MBCAN MBCAK MAR MARAQ MARAB MGY MGYAK MGYAM MGYAQ MGP MGPAB MGPAC MTL MTLDC MTLXX MTLAB MTLAK MTLAE MTLAF MTLAC MTLAD MSR MSRNB MSRAI MDD MHC MHCAA MNM MNMO MNMOB MTR MMC MEY MEYDA MEYAA MEYAM MEYAK MZN MZNN MZNO MZNAA MCX MCXAA MAE MAEDA MAEDC MAEDB MAEO MAEAI MAEAJ MEU MEUO MEUAN MEUAM MEUAS MJP MJPXBB MJPAF MJPAG MJPAH MJPAI MJPAM MJPAJ MJPAK MJPAL MYE MYEAK MCE MCEAA MCEAB MCEAI MAT MATAI MATAM MATAO MATAP MATAK MAD MXR MXRAI MXI MSP MSPAI MSPAK MSPAL MYN MYNAA MYNAI MYNAQ MYNAK MYX MYXAM MYXAO MYXAQ MYXAS MZU MZUAO MBD MBDAK MCS MCSAI MC1 MMS MMSAA MMSAO MCP MCPAJ MWS MMR MMRAK MPZHA MDZHA MBJHA MZBHA MZAHA MBW MPL MPLAA MEB MEBDA MEBXX MEBAC MEBAA MEBAB MLA MVP MGZ MGZAS MGZAU MGZAK MDV MDVAS MDC MDCZZ MDCAA MDCAB MDCAC MDCAD MDCAE MDCAF MDCAG MDCAH MDCAI MDCAJ MDG MML MMLAN MMLAO MLB MLBAA MEO MEOAQ MVT MHI MEZ MEZAI MED MEDAI MLO01 MLO02 MLQ MAS MSB MSBAI MBK MBKAA MBKAO BSK MSTG MCT MCTDA MCTAY MKO MKOAG MLM MLMAK MLMAS MNE MNEOB MNEAA MNEAB MNEAZ MNEOA MLS MLSAK MTA MTAO MTAAK MTAAM MTAAU MTAAY MTAAZ MLX MLXDA MLXAL MTS MTSAK MEI MEICA MEIAK MEIAO MEIAM MEL MELAQ MEQ MNC MNCAC MNCAD MNCAK MNCAT MNCAI MMI MMIN MMIXX MMIAI MPP MTD MGC MGCXX MGCZZ MWR MWRAI MWRAL MWRAM MWRAK MGS MGSAU MGSAA MGSAB MGSAC MGSAD MHM MHMAI MHMAM MHMAZ MHMAA MHMAB MHMAK MHMAO MHMAQ MHMAU MHMAW MHMAY MDI MDIN MDIAS MYT MIG MIGDA MIGAB MIGAD MIGAE MIGAF MIGAG MIGAA MIGAC MOY MOYAI MOYAJ MOYAK MAX MLT MNB MNBAK MNBAM MCR MCRAK MCRAM MCRAO MDX MDXAQ MAK MAKAA MAKAC MAKAD MAKAQ MAKAU MAKAB MAKAW MIZ MIZOA MIZAO MRC MRCAI MDL MDLXE MDLAI MIN MSC MSCDA MSCDB MSCO MSCAI MSCAJ MSCAK MSCHF MPJ MPJNB MPJO MPJOC MPJAI MPJAO MPJAQ MPJAS MPJAU MEP MEPAI MNQ MNQAQ MNQAR MNQAS MRR MRRAI MRRAK MNW MNWXX MNWAI MLI MLIAI MLIAK MBN MBNAA MBNAK MIR MGR MGRAK MRZ PYYAPP PYYCLM PYYDER PYYDIV PYYOTC PYYPTF PYYSET PYYSLN PYYTKO PYYWAR MBT MSV MSVN MSVNB MSVNC MSVR MSVO MSVXX MSVAI MSVAK MTH MTHAM MTHAW MTHAA MTHAB MTHAC MTHAK MTHAO MTHAZ MUA MUAXX MUAAA MVB MVBBSK MVE MVEBSK MVW MVWBSK MVA MVABSK MVR MVRBSK CETF GDX MVS MVSBSK MOAT QUAL MLF MRM MRMAO MRMAI MMJ MMJXX MMJAA MMJAB MMJAE MMJAF MMJAC MMJAD MIH MIHAI MBO MBONB MBOAE MBOAI MBOAK MBOAM MBOAA MBONA MBE MBEAA MBEAJ MBEAO MBEAQ MBEAK MOD MODAI MODAU MODAW MODAX MKB MKBN MKBOA MKBAI MKBAO MPO MPOAI MOL MOLAZ MOLAI MND MNDAI MVF MOX MOXO MOXAA MOXAO MOXAQ MNY MNYO MNYAK MUB MUBAK MUBAM MTI MTIAI MOQ MOQDA MOQAI MZM MZMAB MZMAC MZMAD MZMAK MZMAO MZMAQ MZMAU MZMAW MZMAY MZMAZ MZMAA MZMAI MOO MOON MOOAU MOOAO MOOAQ MOOAS MOOAI MMZ MMZAK MMZAI MMZAM MMZAO MMZAY MRV MRVAA MCO MCOO MCOAM MOC MOT MOTAA MTB MTBDA MTBAM MGX MGXAA MUM MUMOA MUMAA MUMAU MRD MRDAI MRDAJ MRDAK MRDAL MRDAM MRDAN MOV MOVDA MOZ MOZN MOZO MOZOA MOZAA MOZAS MOZAM MRQ MRQO MRQOA MRF MRFOA MRFAO MRFAJ MRFAL MUI MUIAI MUIAK MUE MXUPA MSI MCH MCHAI MGV MGVAA MGVAO MGVAQ MGVAI MGVAU MGVAM MUS MUSDA MUSDD MUSDB MUSDC MUSOA MUSOB MUSAC MUSAF MUSAB MUSAD MUSAE MUSAG MUSAH MUSAI MPX MPXAA MYG MYGO MNF MNFXX MNFAI MNFAJ MYFG MYR MYRXX MYRYY MYRZZ MYRAI MYRAK MYRAM MYQ MYQZZ MYQAA MYQAB MYQAC MYQAD MYQAE MYQAF MYBG MYO MYS MZI MZIDA MZIAI MZIAK NAG NAGAA NAGAB NAGAS NAGAU NAGAY NAGAD NAGAQ NAGAW NAGAZ NCO NCOO NCOAA NAM NAMAI NNO NAN NANAB NANAG NANAI NANAJ NANAA NANAE NANAF NANAT NANAU NAC NACO NCC NCCNB NCCO NCCOA NRR NRRO NRRAK NRRAQ NRRAI ZQQ NDX NAB NABN NABR NABPA NABPB NABPC NABAI NABAM NABAO NABHA NABHB NABHE NABHF NABHD NAFHA NAFHC NAOHB NAOHC NAHHB NAHHA NAJHA NSR NVL NVLXX NVLAA NVLAB NVLAC NVLAD NVLAE NVG NVGAU NML NMLAU NMLAY NMLAZ NMLAK NMLAW NAV NAVAK NVT NC9 NEA NEAAI NWBHB NXR NXRAA NXRAC NMT NMTAA NMTAB NEN NENAY NMS NMSDA NMSAD NMSAH NMSAI NCL NTC NEU NEUAZ NEUAK NEUAY NVI NVIAK NVIAL NAE NAEAK NAEAO NAEAS NAEAY NAEAZ NAEAU NAEAW NGE NGEAO NGEAB NGEAU NGEAA NGEDA NHC NHCAI NHO NHOAO NHOAQ NHOAI NHOAA XNCHA NSE NSEAA NSEAB NSEAC NSEAD NSEAQ NSEAY NSEAZ NTL NTLO NTLAA NZO NZODA NZOAI NCM NCMAI NWF NWFAI NWFAO NHH NWX NCX NWS NWSLV NWSAA NWSAB NWT NWTAO NWZ NWZXX NWZAA NWZAD NWZAM NWZAU NWZAW NWZAX NWZAB NWZAC NME NMEAA NMEAS NMEAU NMEAW NMEAY NMEAZ NXT NXTAS NXTAR NXBHD NXM NXMAK NHF NHFAI NHFAJ NHFAK NHFAO NCK NIO NDO NDODA NKX NI2 NIKKEI NEC NECAI NIU NIUND NKP NKPO NMG NMGG NMGAI NMGAK NMGAM NMGAS NMGAO NMGAQ NOD NODAK NODAI NBL NIBHG NIBHH NIBHJ NIBHF NIBHI NGX NGXAM NGXAQ NGXAS NGXAW NGXAY NGXAI NGXAO NGXAU NFE NFEAI NFEAM NTM NTMAI NTU NTUAI NTUAQ NTUAR NTUAP NMI NST NSTAK NSTAM NSTAO NSTAY NWR NWRAK NWRAO NWRAI NGF NGFXX NWE NWEXX NWEAM NWEAT NWEAQ NOR NORAA NORAB NORAC NORAD NORAE NORAF NORAI NORAG NORAH NORAK NORAL NORAM NORAU NORAW NORAJ NOE NVN NVNDA NRT NRTN NRTAA NRTAI NRTAK NRTAC NWH NSL NSLO NSLAL NSLAM NSLAO NSLAI NSX NSXAU NSXAW NSXAY AFO AFOA AHP AID AOQN AOQNB AOQOZ AOQ ASJPC ASJPD ASJ1CD ASJ3BF ASJ1CE ASJ3BG ASJ3BT ASJ3BZ ASJ3CA ASJ3CB ASJ3CC ASJ3CD ASJ3CE ASJ3CF ASJ3CG ASJ3CH ASJ3CI ASJ3CJ ASJ3CK ASJ3CL ASJ3CM ASJ3CN ASJ3CO ASJ3CP ASJ3CQ ASJ3CR ASJ3CS ASJPA BBA BPI ESCLV FCA FIR FIROC FIROD FMI HBA HBAAI HSE HSEOB IIC IOS IQX MLH MMT MMTPA MMTAK PEQA PEQB PEQOC PFAA PIN PMI PNT QPTXXL RGWB SON SUG TMH WPH ZOD ZODO ZND NCR NCRDA NGY NFNG NUF NUFAI NPX NPXAI NSP NSPAA ZNG SB1 NYO NYOAK NYOXE OKJ OAR OARDA OAROA OARAA OBJ OBJAA OCL OCLAZ OGC OGCAI OGCAO OCP OGH OGHDA ORS ORSAI ORSAK OXX OXXCB OXXAA OXXAP ODN ODNN ODNAK ODNAM ODNAO ODY ODYDA ODYDB ODYO OGL OGLAA OBL OBLAI OBLAK OSH OEX OEXN OEXR OEXO OEXXX OEXYY OEXAA OEXAO OFW OKU OKUDA OKUAA OKUAM OLH OMH OMHAA OMHAS OMHAI OMHAK OMT OMTDA OMTO OMTAA OMTAB OMTAC ONC OSL OSLAI OSLAK OVH OVHAF OVHAG OVHAB OTH OTHAA OTHAD OTHAI OTHAK OTHAM OTHAP OTHAO OML AM2 OIL OILN OPG OPGDA OPGAA OEC OECAA OECAB OGY OGYAC OGYAD ZORDA ZORDB ORR ORRXX ORRAO ORH ORHNA ORHR ORHAI ORI OTI OTIAI OTIAM ORG ORGAI ORGAM ORGAK ORGHA OGX OGXOB OGXAK OGXAY OGXAI OGXAW OGXAZ OGXAU OEQ ORN ORNO ORNAA ORNAB OHE OHEAA ORM OVL OVLAA OVLAQ OVLAI ORE OREXX OREAI OREAQ OREAS OREAU OREAW OREAK OREAO ORA ORAAA ORAAB ORL ORLAI OEG OEGAI ORX ORXAQ ORXAS OCC OCCAA OCCAC OCCAE OCCAB OCCAD OSP OSPAP OSPAO OSPAS OLV OLVAA OLVAC OLVAB OTC OTCAA OEL OELAI OELAQ OUMAI OUMAK OVR OVRAK OX9 OZB OZBAA OZL OZLAC OZLAF OZLAG OZLAI OZLAB OZLAQ OFX OZG OZGO OZGOA OZ9 OZT OZTO PAK PAKDA PAKO PAKAA PAKAB PAKAC PBG PBGAI PEA PEAAI PEH PEHAI PFM PNR PNRNA PNRO PNRAA PNRAN PNRAO PNRAI PSF PSFAI PSQ PSQAA PNW PNWAU PNWAV PMY PMYAI PMYAM PMYAO PMYAQ PMYAS PGH PDY PDN PDNAA PDNAO ZPA PZC PZCNA PPP PPPAI PPPAK PNA PCL PCLAK PSY PSYAI PAN PGI PGIDA PGIN PGIOA PGIAA PGIAI PGIAJ PGIAM PGIAO PPX PPXAK PPXAI PXUPA PPY PPYAI PAR PARAA PARAB PARAC PARAD PARAE PARAF PDM PDMNA PDMO PDMOA PGC PGCN PGCXX PCP PCPAI PNL PNLAA PNLAO PNLAZ PNLAS PNLAU PNLAY PML PMLO PMLOB PMLAU PMLOA PAB PABAK PFL PFLAA PAW PAWXX PAWAQ PAWAK PAY PAYAA PNE PNEDA PNENA PNEDB PNEOA PNEAQ PNEAZ PNEAY PBD PBDO PBDAA PBDAB PBDAC PB9 ZPC PKO PKOAI PEK PEKNA PEKOA PEKAI PEKAJ PEX PEXAI PEXAJ PEXAO PPC PPCG PPCAM PPCAQ PUN PUNAM PEL PELN PELOA PELAA PEN PENDA PENN PENR PENDB PENDC PENOC PENOD PENAI PENAK PENAM PSM PSMAB PSMAI PSMAZ PSMAS PTL PTLDA PTLNA PTLDB PTLOA PNN PNNO PNNAA PEP PEPXX PEPAA PEPAB PIC PICO PPT PPTAI PEC PRU PRUAI PMW01 PTR PTRAN PRL PRLAM PRLAO PSA PSAAQ PLI01 PLI02 PNO PNOO PNOAO PNOAK PAA PAAO PXS PXSAA PXSAAO PXSAAS PXSAB PXSAH PXSAL PXSAN PXSAP PXSAT PXSAAA PXSAAB PXSAAE PXSAAF PXSAAP PXSAC PXSAD PXSAE PXSAF PXSAG PXSAR PXSAS PXSAV PXSAM PHI PRH PRHAQ PNX PNXAA PNXAO PNXAS PXG PXGAI PHK PHKAM PHKAI PHKAO POH POHAI POHAS POZ POZAA POZAW POZAY POZAZ POZAI POZAK PYC PYCNA PYCOA PYCAJ PLS PLSAA PLSAE PLSAB PLSAC PLSAD PLSAF PGY PGYN PGYR PGYO PGYAM PMF01 PMF02 PMF03 PMF04 PMF05 PMF06 HYN01 HYN02 PNC PNCZZ PIO PIOAO PIOAP PIOAS PGS PPN PGM PGMO PGMAK PGMAI PLM01 PAI PAIO PAIXX PTM PLA PLAAW PLAAY PMC PMCAI ZPL PLP PLPDA PLPO PLPAA PLPAB PRM PRMAI PRMAW PRMO PLV PLVOA PLVAK PLVAM PLVAO PLH PLHO PLHAI PLHAJ PAF PAFO PGF PGFN PGFO PGFXX PMP PMPAO PVE PNV PNVAK PEW PIW POS POSAQ POSAZ POSAA POSAM POK POKO POKBN PWN PWNCA PWNXX PWNAM PWW PPK PRF PPS PPSAO PDZ PDZAK PDZAM PDZAO PDZAP PDZAQ PBT PBTAB PBTAD PBTAE PBTAF PBTAG PBTAH PBTAO PBTAQ PBTAR PBTAA PBTAC PBTAW PBTAY PBTAZ PDI PDIAK PCAPA PCAAI PCF PMV PMVAI PEZ PTX PTXDA PTXAB PTXCA PTXAA PTXAC PTXAI PRR PRRO PRRAL PRRAM PRRAN PGO PGOOA PGOAO PGOAP PRY PRYAK PRYHA POP POPAA PRP PFG PFGAU PRT PRTAI PRTAM PRTAQ PRTAR PRTAS PRTAO PAG PAGAI PME PMEAI PMEAK PPG PPGAA PBP PBPAI PBPAK PGL PGLAI PRG PRGAK POBHA POBHB PRA PRAAK PRO PSC PSCN PSCAB PSP PSPAA PSPAI PIQ PIQAF PIQAG PIQAH PIQAI PIQAJ PRW PRWOB PRWOC PRWAB PRWAA PRWAM PRWAO PRWAQ PRWAS PONHA PYM PYMO PYMAA PSZ PSZAA PVA PVAAI PVAAK PVAAO PTB PHA PHG PHGAI PUOHA PUQHA PUUHA PUHHA PUHHB PUCHA PUCHB PUCHC PUCHD PUIHA PUIHB PUBHA PUAHA PUAHB PUDHA PUSHA PUGHA PUGHB PUJHA PUKHA PVD PVDAS PVDAK PVDAM PVDAY PVDAZ PPL PPLXBB PPLXX PPLAA QTG QTGAI QAN QBE QBEAI QBEAJ QMN QMS QRX QRXAO QRXAQ QRXAZ QRXAM QTM QTMAK QUR QURDA QURN QUB QBCHE QBCHF QBL QBLAA QBLAB QBLAI QBLAK QBLAY QBLAZ QBLAU XQLQL XQLQE XQLQQ XQLQN XQLQH XQLQY XQLQS XQLQK XQLQW XQLQM XQLQV XQLQT XQLQX XQLQU XQLQG XQLQI QST QNL QNLAY QNLAK QNLAQ QUE QUEAK QSS QFX QFXAO QFXAI QFXAK QFXAM QFXAQ QFXR QHL QHLAI QHLAK QHLAM QHLAN QIL QILDA QVE QVEO RAD RADAZ RAF RAFDA RAFAB RMR RMRO RMRAK RMRAI RMRAM RMRAQ RMS RMSNB RMSO RMSAB RMSAA RMBHA RMBHB RMBHC RMHHA RMHHB RMHHC RMMHA RMMHB RMMHC RMFHA RMFHB RMFHC RHC RHCPA RND RRS RRSO RRSAI RRSAK RNG01 RPG RPGAM RAW RAWAM RAWAK RYG RYGR RYGRA RYGOB RYGAK AFISZB AGLSZC AGLSZX AIOSZC AIOSZW AIOSZX AMCSZX AMPSZB AMPSZD AMPSZW AMPSZX ANZSZB ANZSZD ANZSZV ANZSZW ANZSZX ARGSZB ASXSZB ASXSZW ASXSZX AZJSZX BENSZB BHPSZB BHPSZC BHPSZU BHPSZW BHPSZX BOQSZB BSLSZB BXBSZB BXBSZX CBASZB CBASZC CBASZD CBASZU CBASZV CBASZW CCLSZW CCLSZX CIMSZC CIMSZW CIMSZX COHSZW CPUSZV CPUSZW CSLSZX CWNSZB CWNSZX DJSIZZ EGPSZX HGIIZQ HHVSZC HVNSZW IAGSZB IAGSZX IHDSZX LLCSZB LLCSZD LLCSZU LLCSZW MGRSZB MGRSZX MQGSZB MQGSZC MQGSZD MQGSZW MQGSZX NABSZB NABSZD NABSZW NABSZX ORGSZX ORISZX OSHSZX OZLSZB OZLSZX PRYSZC PRYSZU QANSZB QBESZB QBESZD QBESZW RIOSZB RIOSZU RIOSZV RIOSZW SFYSZW SFYSZX SHLSZB SHLSZW SHLSZX SKISZX SLFSZB SLFSZW SLFSZX STWSZB STWSZC STWSZU STWSZW STWSZX SUNSZB SUNSZC SUNSZD SUNSZW SUNSZX SYDSZC TAHSZB TAHSZX TCLSZA TCLSZB TCLSZW TLSSZM TLSSZW TLSSZX TLSSZZ TTSSZX WBCSZB WBCSZC WBCSZD WBCSZU WBCSZV WBCSZW WBCSZX WBCSZZ WESSZB WESSZV WESSZW WESSZX WESSZY WFDSZB WFDSZW WORSZC WORSZX WOWSZB WOWSZC WOWSZX WPLSZB WPLSZV WPLSZX ETSAPL ETSBAC ETSBOE ETSBRK ETSCAT ETSCIT ETSCSC ETSCVX ETSDIS ETSGEL ETSHDP ETSIBM ETSINT ETSJNJ ETSJPM ETSKHC ETSMCD ETSMDZ ETSMMM ETSMRK ETSMSF ETSORC ETSPFE ETSPGB ETSWMT ETSXOM INW AGLIRQ AGLSRT AGLSRU AIOSRX AMPDRQ AMPIRQ AMPJRB AMPSRT ANZDRQ ANZIRQ ANZJRA ANZJRB ANZJRE ANZSRT ANZSRV ANZSRW ANZSRX APASRX ASXSRW BENSRX BHPDRQ BHPIRQ BHPSRT BHPSRU BHPSRW BHPSRX BOQJRA BOQSRU BXBIRQ BXBSRV CABSRU CBADRQ CBAIRQ CBAJRC CBASRT CBASRU CBASRV CBASRX CCLSRT CCLSRW CCLSRX CIMSRW CIMSRX COHSRT COHSRW COHSRX CPUSRV CPUSRW CPUSRX CSLDRQ CSLIRQ CSLSRT CWNSRT CWNSRX DOWSRX HVNSRX IHDSRT IHDSRX IHDSRY ILCSRX ILCSRY IOZSRX IPLSRX LLCSRU LLCSRV LLCSRX MQGIRQ MQGSRW MYRSRW NABDRQ NABIRQ NABJRA NABJRB NABJRE NABSRW NABSRX NCMIRQ ORGIRQ ORGSRX ORISRX OSHSRX OZLSRT PPTSRX QANSRU QBEDRQ QBEIRQ QBESRW QBESRX RHCSRX RIODRQ RIOIRQ RIOSRU RIOSRV RIOSRW RIOSRX RMDSRT SFYSRT SFYSRW SFYSRX SGPSRR SHLDRQ SHLIRQ SHLSRT SHLSRW SHLSRX SLFSRU SLFSRW SLFSRY STODRQ STOIRQ STOSRX STWDRQ STWIRQ STWSRT STWSRU STWSRW STWSRX STWSRY SUNDRQ SUNIRQ SUNJRB SUNSRW SWMSRX SYDSRT SYDSRW SYISRT SYISRX TAHSRW TAHSRX TCLSRW TLSDRQ TLSIRK TLSIRQ TLSJRA TLSJRB TLSJRC TLSSRT TLSSRX WBCDRQ WBCIRQ WBCJRA WBCJRC WBCSRU WBCSRV WBCSRX WDCDRQ WDCIRQ WESDRQ WESSRT WESSRV WESSRW WESSRX WFDIRQ WFDSRT WOWDRQ WOWIRQ WOWSRT WOWSRX WPLDRQ WPLIRQ WPLSRT WPLSRV WPLSRX APLIRI ETSGOA ETSGOC RBSRIG RBS RCG RCGAI RCR RCRAQ REA RLE RLEAK RLEAA RLEAM RLEAO RLEAQ RCU RNC RRP RRPAI RRPN REC RECAI RKN RCM RFT RFTAI RFTAO RED REDAR REDAK REDAQ RMP RMPAI RGX RGXDD RGXDE RGXDF RGXO RGXOA RGXAI RGXAK RGXDA RGXDB RGXDC RHI RHIAI RDM RDMAS RDMAU RDMAY RDMAK RDMAM RDMAQ RMX RMXO RMXOA RMXOD RMXAA RMXAI RVR RVRAA RVRAI ROG ROGAK ROGAM ROGDA RCP AEJ RCF RCFAI RCFAM RDF RDFAU RFX RFXAI RDH RDHAQ RDS RDSO RDSAB RDSAU RDSAZ RDSAK RDSAS RDSAY REH RLC RLCNA RLCAB RCT RCTAI RMA RMAAI RMAAC RFN RFNZZ RFNAA RFNAC RFNAF RFNAB RFNAD RFNAE RGP RGPAA RGPAM RER RERAM RERAN RERAO RERAQ RGU RGUAQ RGS RGSAI RGSAQ RGSAK RGSAM RGSAO REX REG RRL RRLAB RRLAC RRLAD RRLAP RRLAQ RRLAA RRLAK RRLAO RNS RNSAA RNSAM RNSAO RNSAK RNU RNUO RNUAI RNUAZ RNUAK RNT RNTDA RNTDB RNTOA RNTAC RNTAF RNTAI RNTAB RNTAD RNTAE RHS RHSDC RHSXX RHSAI RHSAS RHSAU RHSAK RHSAM RHSAO RHSAQ RDG RDGAA RAP RAPDA RAPAB RAPAE RAPAF RAPAG RAPAI RAPAJ RAPAK RAPAL RAPAC RAPAD RAPAH RAPAM RTTHA RMD RMDDA RSG RSGG RSGAS RSGAU RSGAC RSGAD RSGAE RSGAO RSGAQ RHT REZ REZAA RBX RBXAK RES RESAK RESAI RMI RSL RSLO RSLOA RSE RET RFG RFGAK RVA RVAAB RVAAO RVAAA REF REFAS RWD RWDO RWDAK RWDAO RWDAS RWDAM RXH RXHAG RXHAE RXHAJ RXHAK RXHAL RXHAM RXHAC RXHAH RXHAI RXM REY REYAK RFP RNO RNOOA RNOAK RNOAM RNOAO RNOAW RNOAY RNOAS RNOAI RHP RHPDC RHPAB RHPAI RHPDA RIS RIC RICAI RICAK RICAM RICAO RICAS RICAQ RIE RIEAI RIEAS RIEAU RIEAW RIEAZ RVY RVYAA RVYAQ RIM RIMO RIN RIO RIOAI RIOAK ZRI RCY RIV RIVAS RMT RMTAI RMTAK RMTAM RMG RMGDA RMGAM RMGAN RMGAI RNI RNIN RNIR RNIO RNIAA RNIAB RNIAC RNIAD RNIAF RNIAK RNIAO RNIAS RNIAU RNIAW RNIAY RNIAZ RNIAE RNY ROLAK ZRN RIG RXL RXLAA RXLAK RXLAM RXLAO ROY ROYAK RWH RCO RCOAS RCOAY RCOAU RTG RTGO RTGAA RTGAB RRE RREDA RREXX RREAA RBR RBRN RBRAN RBRAM RUB RUBAI RUBAM RUBAO RUBAS RFL RFLAI RUM RUMAZ RTR RTROA RTROB RTROC RTRAA RTRAM RTRAN RTRAO RTRAP RTRAQ RTRAK RUL RULAS RFF RFFDA RHL RHLAI RHLAK RHLAM RSM RCB RGB RARI RARBSK RVL RVLBSK RDV RDVBSK RTA RTAAI RTAAM RTAAA RTAAO RXP RYD RYDO HTVHA ZSP J4A SPF NIF REKHA REKHB REQHA REQHB SAP SAPAI SAPAK SBR SRH SAN SAI SAIAA SAIAB SAIAM SAIAI SAIAK SAIAQ SAIAS SAIAZ SLM SLMAI SACHA SACHB SSN SSNOA SSNAQ SSNAS SSNAU SFR SFRAA SFRAI SFRAU SFRAW SNC SNCN SNCO SMI SMIAI SMIAK STO STOAK STOAM STOAO STOAQ STOAW STOAY STOAZ STOAU STOAS SAR SARAI SARAM SND SNDAI SAV SAVDA SAVAA SAVAB SYA SYAO SYAAA SYAAI SCP SCD SR1 WSF WSFAI SCW SCWAM SCWHD SCWHA SCWHC SCWHB SCG SCAHA SFC SCH11 SCH12 SCH21 SCH22 SCH23 SCH31 SCH41 SCH42 SCH51 SIE SIEAK SIEAI SGZ SGZNB SGZAA SGZAC SGZAD SGZAB SGZAE SGZAM SGZAI SGZAK SDI SFG SFGNA SFGXX SFGAA SLK SLKAI SES SESDA SESNA SESDB SESOB SAJHA SDM SDMAK SEK SEKAI SEG SEGAK SEGAM SEGAN SEGAO SHV SHVAI SEN SENAA SXY SXYAK SXYAM SXYAO SXYAI WSCHA RDAHA RDAHB RDAHC WSHHA WSJHA WSNHA WSOHA RFBHA RFBHB RFBHC RFBHD RFAHA RFAHB HTBHA HTBHB WSQHA WSDHA WSZHA WEKHA WEJHA SRV SSM SVW SVWPA SVWAA SWM SWMAI SWMAK SWL SWLAI SGF SHF01 SHF02 SHF03 SHF04 SHF05 SHF06 SRR SRRAH SRRAW SRRAG SRRAK SHR SFX SFXAW SFXAZ SFXAC SFXAI SFXAK SFXAQ SFXAS SFXAU SHU SHXAU SHJ SHBHA SKV SHP SHPOA SHPAO SHPAI SHH SHHAU SHM SHMAA SBU SBUO SBUAM SBUAO SSL SSLPA SIP SIPAK GLR SIH SIHAO SLX SLXAI SIV SIVAK SCI SCIAM SCIAN SCIAO SLR SLRXX SLRAA SLRAI SVL SVLNA SVLR SVLO SVLAI SVLAM SVLAY UPE SVA SVAAK SVAAI SVAAJ SVAAL SVAAM SVAAO SIO SIOAA SGM SGMAI SGMAK SGT SAO SAOO SAOAI SEH SEHAI SEHAJ SSI SSIAI SSIAK SLE SLEAU SLEAA SLEAS SLEAZ SNV SNVAI SNVAK SNVAM SNVAO SRI SRIO SIR SIRAZ SIRAI SIRAC SIRAD SIRAE SIRAG SIRAQ SIRAU SIRAA SIRAB SIRAK SIRAW SIRAY SCY SCYDA SCYAI SRX SRXAQ SIT SITAI SAM SKE SKEAO SKEAM SKEAI SKT SKTAI SKC SKB SKF SKFDA SKFAA SKFAB SGH SGHAI SGHAJ SGHAK SABHA SABHB SSEHA SPZ SPZAI SNAHB SNAHC SMF01 SMF02 SIQ SMP SMPAI SMA SMAN SMAAA SMAAI SOP SOPO SMX SMXAI SOF ZSB SOI SOIAI SOIAK SOIAM SLA SLAAI SLAAM SOO SOON SOOAA SXS SXSAB SXSAA SXSAC SXSAK SXSAM SXSAQ SXSAS SXSAW SXSAZ SXSAO SXSAI SXSDA SOM SOMAK SHL SHLAK SHLAU SHLAZ SHLAE SHLAY SMG SOL XSGZI XSGZJ SXI SXIAI SXIAK SXIAO SXIAM SXIAQ SXIAS SPB SPBAJ SPBAK SPBAL SPBAM SPBAN SPBAO S32 SAKHA SXX SXXAA SWR SWRAW SAU SAUO SAUAB SAUAR SAUAQ SUH SUHNA SUHO SOC SOCN SOCAA SVM SVMAM SVMAI SVMAN ZSY SKI SKIAI SKIAK SKIAM SKIAO SPK SPKAJ SPKAI OZF OZFBSK STW STWBSK OZR OZRBSK SFY SFYBSK BOND DJRE WEMG WDIV GOVT SPY SLF SLFBSK SSO SSOBSK WXOZ WXHG SYI SYIBSK SFH SFHAK SPX SPXN SDA SDAAA SPH SPI SPIOA SPIAD SPIAB SPIAC SPIAA SPIAI SPIAY SPIAE SFI SFIAA SFIAC SFIAB SPO SPOAA SFL SIX SIXAK SIXAM SIXAO STS STSAA STSAB STSAC SBM SBMAK SGB SGQ SGQOA SGQAO SGQAQ SFN SFNAA SFNAI SMR SMRAC SMRAK SMRAO STL SPL SPLAK SVY SVYN SVYO SVYXX SVYYY SVYAA SVYAC SVYAD SVYAB SDF SDFAI SST SRZ SRZAA SRZAI SCU SCUDA SCUDC SBI SBIAI SBIAK SBIAM SBIAP SBIAQ SAY SAYAS SFZ SFZAI SFZAK SFZAM SFZAS SXE SXEAI SXL SXLAI STI STIAI STIAK STIAM STIAO SGP SKS SKSG SHK SHKAO SHE SHEAA SHEAB SWJ SWJAO SWJAR SWJAQ SRY SRQ SRQAA SRQAB STA STAAA STAAB STAAI SXA SXAO SXAAK SXAAM SXAAO SOR SORAA SER SERAI SERXE SMC SXT SXTAW SXTAY SXTAI SXTAA SXTAB SGO SGOAA SGOAI STX STXAI STXAW SRK SRKAI SRKAK SMN SMNAI SGN SYP SYPAI SZG SGU SGUAA SGUAB SGUAC SGUAD SGUAE SUD SUDAK SUDAO SUDAP SUDAQ SUDAR SUDAS SUDAU SUM SUMAI SUMAM SUMAN SUMAO SNZ SMM SBN SBNAA SBNAB SBNAC SBNAI SUR SURO SURAM SURAO SURAS SURAU SNY SNYAI SNYAK SBB SUN SUNPC SUNPD SUNPE SBKPA SBKPB SBKHB SEA SEAAI SEAAO SDL SDLAQ SDLAZ SDLAI SDLAK SDLAM SDLAN SDG SDGAI SVS SUL SULN SULR SULAQ SPQ SLC SLCAA SNL SRF SRFAA SWE SWEAM SWEAO SWEAA SWEAW SWEAZ SWEAB SWA SWADA SWK SWKAI SYD SYZ SMD SMDAM SMDAO SMDAI SNR SNRAI SNRAY SNRAW SYS SYSAU SYR SYRWW SYRXX SYRYY SYRZZ SYRAQ SYRAR SYRAS SYRAU SYRAV SYRAW SYRAI SYRAK SYRAO SYRAM TAH TAHNA TAHR TAHAM TAHAI TAHHB TAG TAGO TAGAI TAGAK TAGAQ TAGAM TA8 TOV TKG TKGAI TKGAK TKGAM TLG TLGO TLGAO TLGAP TLGAQ TLGAR TLGAI TLGAM TLM TLMXX TLMAI TPD TPDAI TMK TMKDA TMKDB TMKOA TMKAI TMKAK TMKXE TWD TAM TAMAI TAMAK TAN TRL TRLOA TRLAA TAP TAPAM TAPAK TEX TEXO TEXAU TAR TARDA TARAA TARAB TARAO TARAQ TAS TASNA TASO TASOA TASAI TASAK TASAM TMM TGR TGRAI TTS TTSAA TTSAY TTSHA TAW TAWAQ TMP TMPAA TMPAC TMPAG TMPAB TMPAD TMPAE TMPAF TCN TCNAQ TNE TNEAI TPC TPCDA TEO TEOAI TEOAK TLS TLSCA TLSHX TLI TGG TGGNA TGGR TGGXX TEM01 TPP TPPAA TPPAO TEN TENAI TENAK TGZ TGZAI TGZAM TMX TMXAA TZN TZNAS TES TESPA TESO TESAI TESHA TFC TFCAI TFCAK TFCAL TG8 A2M A2MAA A2MAB A2MAC A2MAD CGL CGLAA PGR PGRAA TRS TRSAI YTMAZJ YTMBHP YTMCWN YTMDXS YTMGPT YTMIPL YTMLL1 YTMLLC YTMMGR YTMNVN YTMSCG YTMSG1 YTMSGP YTMTLS YTMWE1 YTMWES YTMWOW TNK TSM TSMAQ TSMAU TSMAV TSMAS TSMAM TSMAO THO THOAM THOAK TMZ TMZAB TMZAW THR THRAM THRAK TGA TOP TOPXX THX THXAK THXAW THXAY TPO TPOAB TPOAD TPOAC TCM TGS TGSAA TGSAB TGSAC TGSAE TGSAM TGSAK TIG TIGYY TIGAB TIGAC TIGAD TIGAE TIGAH TIGAI TIGAJ TIGAL TIGAQ TIGAZ TIGAA TIGAF TIGAG TIK TIKDA TIKDB TIKOB TML TPR TUA TIS TISN TTN TTNAI TTNAK TTNAM TOU TOUN TOUXX TOUAS TOUAY TNG TNGN TNGO TNGAI TNGAK TNGAM TNGAN TOL TOM TOMDA TOMDB TOMO TOMAC TOMAD TOMAE TOMAF TOMAG TOMAO TOMAA TOMAH TOMAJ TOMAK TOMAL TOMAM TND TTW TTWDB TTWO TTWAU TNR TNRDC TNRAA TNRAK TOE TOEXX TOEAA TOEAH TOEAI TOEAQ TOEAS TOEAU TOEAE TOEAF TOEAG TOEAM TOEAO TNJHA TNJHB TRBHA TRPHA TRKHA TRKHB TRKHC TRKHD TOAHE TOAHF TOAHG TOAHC TOAHD TNBHA TNFHA TOZHA TNHHA TRQHA TRQHB TRXHA TRXHB TCH TWR TWRAI TOX TOXAI TPM TPMN TPE TPEAA TME TTC TTCXBB TTCXX TTI TKL TKLN TKLAO TKLAP TKLAQ TSN TSNAQ TSV TSVDA TSVAI TSVAK TSVAO TSI TSIAI TSE TSEAI TSEAM TSEAK TCO TPI TPIAO TPIAI TPAPA TCL TCLAK TCLAI XVGZH XVGZK XVGHC XVGHE XVGZA XVGHG XVGZE XVGZF XVGZZ XVGZB XVGZC XVGHF XVGHD XVGZI XVGHH XVGZD TRG TWE TWEAA TWEAB TYO TEG TEGAK TBR TNP TNPAA TNPAI TON TONAM TONAN TONAO TONAQ TONAR TONAS TRY TRYXX TRYYY TRYAI TRYAK TRYAZ TRM TRMAM TRMAO TRMAU TAU TTA TTAAI TTAAK TTAAM TTAAO TTE TTENA TTEOA TTEAA TTEAB TTEAC TUP TUPAB TGN TGNAU TGNAS TWH FOX TWT TYK TYKOA TYKOB TYKAI TYX TYXN TYXO TYXAA TDX TDXAI TDXAM TZL TZLAQ UND UNDXBB ABCSSO AGLISA AGLISI AGLISZ AGLSSA AGLSSM AGLSSN AGLSSP AGLSSR AGLSSW AIOISI AIOSSA AMCDSQ AMCISI AMCISQ AMCSSA AMCSSM AMCSSN AMCSSO AMCSSP AMPDSN AMPDSQ AMPISA AMPISI AMPISM AMPISN AMPISQ AMPSSA AMPSSM AMPSSN AMPSSP AMPSSR ANZDSN ANZDSQ ANZISA ANZISI ANZISM ANZISN ANZISO ANZISQ ANZISY ANZISZ ANZSSA ANZSSM ANZSSN ANZSSO ANZSSP ANZSSS ANZSST ANZSSW ASXISI ASXSSA ASXSSO ASXSSR AZJISI AZJISO AZJSSA BHPDSN BHPDSQ BHPISA BHPISI BHPISM BHPISN BHPISO BHPISQ BHPISZ BHPSSA BHPSSM BHPSSN BHPSSO BHPSSP BHPSSR BHPSSW BXBDSN BXBDSQ BXBISI BXBISM BXBISN BXBISO BXBISQ BXBSSA BXBSSM BXBSSN BXBSSP BXBSSR CBADSN CBADSQ CBAISA CBAISI CBAISM CBAISN CBAISO CBAISQ CBAISZ CBASSA CBASSM CBASSN CBASSO CBASSP CBASSS CBASST CBASSW CCLISI CCLISN CCLISO CCLSSA CCLSSR CGFSSC CPUISI CPUSSA CPUSSO CSLDSN CSLDSQ CSLISA CSLISI CSLISM CSLISN CSLISO CSLISQ CSLSSA CSLSSM CSLSSN CSLSSO CSLSSP CSLSSR CWNISA CWNISI CWNSSA CWNSSM CWNSSN CWNSSO CWNSSP CWNSSW DXSISI DXSSSA FMGISJ FMGSSC FOXISN FOXISO GMGISI GMGSS3 GMGSSB GPTISI GPTSSA HGGSSO HSOSST IAGDSQ IAGISA IAGISI IAGISQ IAGSSA IAGSSM IAGSSN IAGSSP IAGSSR ILUISI ILUSSA IPLISI IPLSSA IVVISJ JBHSSN JBHSSO JHXISI JHXSSA LLCISI LLCSSA LLCSSR MFGISJ MGRISI MGRSSA MPLISA MPLISI MPLSSA MPLSSQ MQGDSN MQGDSQ MQGISA MQGISI MQGISN MQGISQ MQGISY MQGISZ MQGSSA MQGSSM MQGSSN MQGSSP MQGSSR NABDSN NABDSQ NABISA NABISI NABISM NABISN NABISO NABISQ NABISY NABISZ NABSSA NABSSM NABSSN NABSSO NABSSP NABSSQ NABSSR NABSSS NABSST NABSSW NCMDSN NCMISM NCMISN NCMISO NCMSSA NUFISI NUFSSA ORASSO ORGDSN ORGISA ORGISI ORGISM ORGISN ORGISO ORGISQ ORGISZ ORGSSA ORGSSM ORGSSN ORGSSO ORGSSP ORGSSR ORIISI ORIISO ORISSA ORISSO ORISST OSHISI OSHISZ OSHSSA OSHSSM OSHSSN OSHSSO OSHSSP OSHSSW PRYISI PRYSSA PRYSSN QBEISA QBEISI QBEISM QBEISN QBEISZ QBESSA QBESSM QBESSN QBESSP RHCISI RHCSSA RHCSSM RHCSSN RHCSSP RIODSN RIODSQ RIOISI RIOISM RIOISN RIOISO RIOISQ RIOSSA RIOSSM RIOSSN RIOSSO RIOSSP RIOSSS S32ISJ S32SSC SCGISI SCGSSA SCGSSM SCGSSN SCGSSP SEKSSO SGPISI SGPSSA SHLISA SHLISI SHLSSA SHLSSO STODSN STODSQ STOISJ STOISM STOISN STOISO STOISQ STOISZ STOSSC STWISA STWISI STWSSA STWSSC STWSSD STWSSM STWSSN STWSSP STWSSR SUNDSN SUNDSQ SUNISI SUNISM SUNISN SUNISQ SUNISZ SUNSSA SUNSSM SUNSSN SUNSSP SUNSSW SYDISI SYDSSA SYISSA SYISSB TA8SSR TAHISZ TCLDSQ TCLISI TCLISQ TCLSS3 TCLSS5 TCLSSA TCLSSM TCLSSN TCLSSP TCLSSV TLSDSN TLSDSQ TLSISA TLSISI TLSISM TLSISN TLSISO TLSISQ TLSISZ TLSSSA TLSSSM TLSSSN TLSSSP TLSSSR TLSSSU TLSSSW TTSISI TTSSSA TWEISI TWESSA VEDSSO WBCDSN WBCDSQ WBCISA WBCISI WBCISM WBCISN WBCISO WBCISQ WBCISY WBCISZ WBCSSA WBCSSM WBCSSN WBCSSO WBCSSP WBCSSQ WBCSSS WBCSST WBCSSW WDCISM WDCISN WDCISO WE3ISM WESDS2 WESDSN WESDSQ WESIS2 WESISA WESISI WESISM WESISN WESISO WESISQ WESISZ WESSSA WESSSM WESSSN WESSSO WESSSP WESSST WESSSW WFDDSN WFDISI WFDISM WFDISN WFDISO WFDSSA WFDSSM WFDSSN WFDSSP WORISI WORSSC WORSSR WOWDSN WOWDSQ WOWISA WOWISI WOWISM WOWISN WOWISO WOWISQ WOWISZ WOWSSA WOWSSM WOWSSN WOWSSP WOWSSR WOWSSU WOWSSW WPLDSN WPLISA WPLISI WPLISM WPLISN WPLISO WPLISQ WPLISZ WPLSSA WPLSSM WPLSSN WPLSSO WPLSSP WPLSSR WPLSSS ZBHWSC ZRIWSC XINANF DAB FIP FX1WUA FX2WUA UIA UBP UBA UBABSK UBE UBJ UBU UBW ETF ETFBSK DIV DIVBSK UCL UCW UCWDA UCWDC UCWAA UGL UGLAI UGLAQ UIL UILAG UILAN UILAO UILAP UILAQ UILAF UILAH UILAI UILAJ UILAK UILAL UILAM UUL UULDA UNS UNSAI UNSAK UNSAO UNSAM UOS UOSAA UML UMLAK UPG UPGDA UPGAI UBI UBIAC UBIAD UBIAI UBIAL UBIAO UBIAQ UBIAU UBIAW UBIAA UBIAB UBIAE UBIAF UBIAG UBIAH UBIAJ UBIAK UBIAM UBIAY UBIAZ UNV UNVAA UNVAC UNVAF UNVAG UNVAK UNVAZ UNVAB UEQ UEQNA UEQXX USA USAAC USAAD USAAE USAAO USAAK UBN UBNAA TN1 TN5 USH USHAI URF URFHA USF USG USR USRO UCM UCMXX UCMAM UCMAN UXA UXADA UXAAA UXC UXCAM VXL VXLN VXLR VXLO VXLOA VXLXX VXLAI VXLAP VXLAK VXLAM VMX VMXO VMXAC VMXAQ VMXAA VMXAK VMXAV VMXAW VMXAS VMXAU VMXDC VAN VANDA VANRA VANDB VANO VANAI VANAK VANAL VAU VIS VAR VARO VARAV VARAO VARAU VMG VELCP VELIN VELPA VEC VECAI VED VEDAI VEDAK VRX VRXAM VRXAN VRXAO VMS VMSAO VXR VMC VMCO VMCAO VMCAP VMCAQ VERA VGP VIA VIAAI VIAAM VIAAO VIAAQ VIAAK VIG VIGAA VIC VICDA VICAA VICAK VICAM VICAU VIE VIEAO VII VKA VKAO VKAAA VKAAI VLW VLWAK VLWAM VLWAI VRL VRLAK VMY VMYDA VMYAA VMYAB VMYAC VMYAZ VMYAW VLA VLAAU VLAAV VAH VAHAM VAHAI VRT VRTAI VRTAJ VRTAK VEI VEIAI VGI VTG VSC VIT VITXX VML VMLAA VMLAB VMLAS VMLAU VMLAV VMT VMTDA VMTAO VMTAS VMTAU VMTAK VEU VAF VGB VHY VLC VAP VAS VSO VGE VGS VGAD VTS VET VOC VOCN VOCAA VOCAI VTM VTMAB VIP VGR VGRDA VGRDC VGRAI VGRAK VTX VTXDA VTXO VTXAL WSE WSEDC WSEDA WKT WKTN WAA WAM WAMO WAX WAXN WAXO WGO WGOAK WCB WRG WRGAC WRGAI WRGAK WRGAY WCC WCCAQ WCCAR WCCAO WCCAP WAT WMK WTP WTPAM WAL WALAI WB9 WCP WCPAA WDS WDSAK WEFHA WEFHB WEFHC WEFHD WDE WDEAA WEB WEBAI WBA WBAPA WLL WES WESDD WESN WESAI WE3 WE4 WAF WAFAA WAFAQ WAFAY WAFAZ WAFAO WPI WPIN WWI WWIAA WWIAK WWIAS WWIAY WSA WSAAK WSAAM WDR WDRAM WDRAS WMN WMNAA WFA WFAAK WFD WDC WDCAK WRT WIC WICO WICOA WBC WBCPB WBCPC WBCPD WBCPE WBCPF AGLSWG AGLSWR AGOSWG AIOSWR AMCSWG AMCSWR AMPSWB AMPSWC AMPSWD AMPSWG AMPSWH AMPSWR ANNSWG ANNSWR ANZSWB ANZSWC ANZSWD ANZSWE ANZSWG ANZSWH ANZSWJ ANZSWK ANZSWQ ANZSWR ANZSWS ASXSWB ASXSWG ASXSWL ASXSWR ASXSWS AZJSWR BBGSWB BENSWR BENSWS BHPSWB BHPSWC BHPSWE BHPSWF BHPSWG BHPSWH BHPSWJ BHPSWR BHPSWS BLDSWR BOQSWR BOQSWS BSLSWB BSLSWG BSLSWH BSLSWI BSLSWR BXBSWB BXBSWC BXBSWG BXBSWL BXBSWR CBAIWF CBASWB CBASWC CBASWD CBASWE CBASWG CBASWJ CBASWK CBASWQ CBASWR CBASWS CCLSWB CCLSWG CCLSWR COHSWG COHSWR CPUSWB CPUSWG CPUSWR CSLSWB CSLSWG CSLSWH CSLSWK CSLSWR CWNSWB CWNSWG CWNSWL CWNSWR DUESWR FMGSWG FMGSWR GMGSWG GMGSWR GPTSWG GPTSWR HSOSWL HSOSWR IAGSWB IAGSWG IAGSWH IAGSWR ILCSWG ILCSWH ILCSWI ILCSWR ILCSWS IOFSWG IOFSWR IOZSWG IOZSWH IOZSWR IPLSWG IPLSWR LLCSWB LLCSWG LLCSWR MGRSWG MGRSWR MPLIWC MPLIWD MPLIWE MPLSWL MPLSWP MPLSWQ MPLSWR MQGSWB MQGSWG MQGSWH MQGSWL MQGSWR MTSSWD NABSWB NABSWC NABSWD NABSWG NABSWJ NABSWK NABSWQ NABSWR NABSWS NCMSWG NCMSWK NCMSWL NCMSWR ORGSWB ORGSWG ORGSWH ORGSWR ORGSWS ORISWB ORISWG ORISWR OSHSWR OZLSWB OZLSWG OZLSWL OZLSWR PBGSWB QANSWB QANSWG QANSWH QANSWR QBESWB QBESWC QBESWD QBESWG QBESWH QBESWJ QBESWR QBESWS QOZSWL QOZSWR RHCSWG RHCSWL RHCSWR RIOSWB RIOSWC RIOSWD RIOSWG RIOSWH RIOSWJ RIOSWR RIOSWS S32SWR SGPSWR SHLSWC SHLSWG SHLSWL SHLSWR STOSWB STOSWG STOSWR STWSWB STWSWC STWSWD STWSWG STWSWH STWSWI STWSWR STWSWS SUNSWB SUNSWC SUNSWD SUNSWG SUNSWK SUNSWR SYDSWG SYDSWR SYISWJ SYISWL SYISWR TAHSWB TAHSWD TAHSWL TAHSWR TAHSWS TCLSWB TCLSWG TCLSWR TENSWB TLSIWF TLSSWD TLSSWG TLSSWJ TLSSWK TLSSWQ TLSSWR TLSSWS UGLSWB UGLSWG UGLSWR WBCSWB WBCSWD WESSWB WESSWC WESSWG WESSWK WESSWR WESSWS WFDSWL WFDSWR WORSWB WORSWG WORSWR WOWSWB WOWSWC WOWSWD WOWSWG WOWSWJ WOWSWL WOWSWR WOWSWS WPLSWB WPLSWC WPLSWD WPLSWG WPLSWH WPLSWJ WPLSWR WPLSWS WBCYY WBCZZ WBCAA WBCAB WBCHA WBCHB WBCHAP WBCHAQ WBCHAS WBCHAT WBCHAU WBCHAV WBCHAY WBCHAL WBCHAW WBCHAX WBCHAZ WBCHBA WBCHBB WBCHBC WBCHBF WBCHBE WBCHAM WBCHBI WBCHBJ WBCHBD WBCHBG WBCHBH WBCHBK WCTPA WCTAI WCL ZWT WCN WCNOA WCNAB WCNAA WEC WECAA WRM WRMAI WRMN WHF WHFPA WHFPB WHC WHCAQ WHCAI WHN WHNDA WHNNA WHNDB WHNO WHNOA WHNAI WNH WNHO WNHAA WNHAB WNHAC WNHAD WNHAF WNHAO WNHAM WNHAE WNHAG WAC WACN WACAM WACAO WACAQ WACAR WACAS WHE WHEDA WHEAA WHEAAZ WHEAM WIG WIGAA WIGAQ WEL WELAB WELAG WELAC WELAH WELAD WELAE WELAF WELAI WELAJ WELAK WVL WIN WINAA WFE WM1 WM1BSK WMB WLF WLFAA WLFAB WLFAI WLFAX WLFAY WOF WOFO WOFOA WOFAI WOFAM WOFAO WSG WSGDA WLC WLCNA WLCNB WLCR WLCRA WLCAM WLCAI WLCN WLCAK WLCAQ WLCAS WMC WPL WOW WOWAK WOWAM WOWHC WRR WRRAO WTR WTRAB WNS WNSAM WNSAI WOR WORAI WORAK WORAM WORAO WPG WPGAI XAM XAMAA XAMAB XAMAK XAMAY XAMAM XRO XROAK XROAI XXL XPD XRF XST XSTAI XSTAK XSTAM ZXT XTD XTDDA XTDAF XTDAG XTDAH XTDAI XTDAJ XTE XTEDA XTEAA XTV XTVDA XTVO XTVAB XTVAK XTVAL XTVAM XTVAN XTVAD XTVAE XTVAF XTVAG XTVAH XTVAP XTVAC YAL YALN YCNPA YHL YHLAI YBR YBRAA YBRAI YRR YRRAQ YRRAK YRRAL YM1 YNB YNBDA YNBAB YNBAH YNBAC YNBAD YNBAE YNBAF YNBAG YOW YOWO YOWAM YPB YPBDA YPBO YPBAB YPBAC ZNZ ZNZAI ZNZAK ZNZAM ZAM ZAMAI ZRL ZRLNA ZRLAU ZGM ZNC ZNCAB ZNCAI ZTA ZTADA ZTADB ZTADC ZTAOA ZTAOB ZTAAQ ZTAAS ZTAAU ZTAAV ZTAAW ZTAAY ZER ZERO ZEU ZEUAM 8ZH ZGL ZGLAV ZGLAK ZGLAO ZGLAQ ZGLAS ZGLAU ZIM ZMG ZIP ZIPDA ZIPO ZIPAC ZIPAE ZIPAD ZYL ZYLAM ZYLAS python-stdnum-1.2/tests/test_pl_regon.doctest0000644000000000000000000000417012601744732021550 0ustar rootroot00000000000000test_pl_regon.doctest - more detailed doctests for the stdnum.pl.regon module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.pl.regon module. It tries to validate a number of numbers that have been found online. >>> from stdnum.pl import regon >>> from stdnum.exceptions import * These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 000144992 ... 000262289 ... 000569734 ... 001123710 ... 001130740 ... 001130762 ... 001130785 ... 004611261 ... 010925233 ... 011370116 ... 015615046 ... 015831301 ... 017282442 ... 021425170 ... 021493503 ... 061245300 ... 080121017 ... 101286521 ... 101624716 ... 101702037 ... 120444729 ... 120812966 ... 122903064 ... 122989806 ... 140006787 ... 140124720 ... 140567178 ... 140906290 ... 141215688 ... 147244188 ... 160178314 ... 180405830 ... 180562050 ... 190248215 ... 190384415 ... 191305139 ... 192976380 ... 200197338 ... 220218697 ... 221997249 ... 241675487 ... 271747631 ... 276273209 ... 280002520 ... 292449593 ... 300613124 ... 302406613 ... 357126121 ... 360935507 ... 362392991 ... 362501144 ... 362509447 ... 362509460 ... 362509476 ... 362523660 ... 370418951 ... 370452988 ... 432740426 ... 570007868 ... 570135170 ... 570271370 ... 570860528 ... 572134252 ... 630679076 ... 632154969 ... 634389910 ... 670141210 ... 810033277 ... 812663628 ... ... ''' >>> [x for x in numbers.splitlines() if x and not regon.is_valid(x)] [] python-stdnum-1.2/tests/test_ch_uid.doctest0000644000000000000000000000777312606424566021217 0ustar rootroot00000000000000test_ch_uid.doctest - more detailed doctests for the stdnum.ch.uid module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.ch.uid module. >>> from stdnum.ch import uid >>> from stdnum.exceptions import * Some more detailed tests. >>> uid.validate('ZZZ-107.787.577') Traceback (most recent call last): ... InvalidComponent: ... >>> uid.validate('CHE-10A.787.577') Traceback (most recent call last): ... InvalidFormat: ... These have been found online and should all be valid numbers. >>> numbers = ''' ... ... CHE 113.042.942. ... CHE-101.415.551 ... CHE-105.067.880 ... CHE-105.616.108 ... CHE-105.838.471 ... CHE-106.222.918 ... CHE-108.902.220 ... CHE-112.786.448 ... CHE-113.606.230 ... CHE-113.606.253 ... CHE-113.614.519 ... CHE-113.617.417 ... CHE-113.638.690 ... CHE-113.690.319 ... CHE-113.706.877 ... CHE-113.840.903 ... CHE-114.165.895 ... CHE-114.332.288 ... CHE-114.365.477 ... CHE-114.557.166 ... CHE-114.587.210 ... CHE-114.764.713 ... CHE-114.921.562 ... CHE-115.117.491 ... CHE-115.188.717 ... CHE-115.257.146 ... CHE-115.401.147 ... CHE-115.681.283 ... CHE-115.702.784 ... CHE-115.901.131 ... CHE-116.018.087 ... CHE-116.022.172 ... CHE-116.024.389 ... CHE-116.066.413 ... CHE-116.066.436 ... CHE-116.066.459 ... CHE-116.066.465 ... CHE-116.066.471 ... CHE-116.066.488 ... CHE-116.068.168 ... CHE-116.068.180 ... CHE-116.068.257 ... CHE-116.068.369 ... CHE-116.068.375 ... CHE-116.068.398 ... CHE-116.068.435 ... CHE-116.068.470 ... CHE-116.068.524 ... CHE-116.068.582 ... CHE-131.608.474 ... CHE-132.071.565 ... CHE-133.192.355 ... CHE-145.202.776 ... CHE-146.680.598 ... CHE-154.748.703 ... CHE-154.936.162 ... CHE-157.957.462 ... CHE-164.589.300 ... CHE-165.355.615 ... CHE-170.094.053 ... CHE-172.763.936 ... CHE-187.271.257 ... CHE-188.858.471 ... CHE-190.214.202 ... CHE-193.052.812 ... CHE-199.027.184 ... CHE-199.213.611 ... CHE-200.143.304 ... CHE-200.474.557 ... CHE-201.091.609 ... CHE-208.913.684 ... CHE-211.403.691 ... CHE-221.032.573 ... CHE-221.432.665 ... CHE-222.251.936 ... CHE-222.259.895 ... CHE-226.253.064 ... CHE-226.598.037 ... CHE-247.670.953 ... CHE-254.168.819 ... CHE-255.108.719 ... CHE-255.286.924 ... CHE-261.860.174 ... CHE-263.297.189 ... CHE-264.708.255 ... CHE-265.476.805 ... CHE-268.880.226 ... CHE-276.015.555 ... CHE-276.258.224 ... CHE-279.426.498 ... CHE-288.910.965 ... CHE-304.459.014 ... CHE-313.282.453 ... CHE-316.510.171 ... CHE-317.089.412 ... CHE-319.639.393 ... CHE-320.640.339 ... CHE-322.193.357 ... CHE-325.352.422 ... CHE-327.285.558 ... CHE-335.670.007 ... CHE-360.001.499 ... CHE-363.192.993 ... CHE-367.908.992 ... CHE-378.338.277 ... CHE-379.051.878 ... CHE-383.713.530 ... CHE-392.445.860 ... CHE-397.984.845 ... CHE-400.352.783 ... CHE-402.703.876 ... CHE-403.244.345 ... CHE-404.107.716 ... CHE-405.509.388 ... CHE-415.481.515 ... CHE-420.485.329 ... CHE-422.892.792 ... CHE-424.195.422 ... CHE-430.271.592 ... CHE-433.064.977 ... CHE-443.047.638 ... CHE-444.796.174 ... CHE-444.901.873 ... CHE-445.737.990 ... CHE-446.609.550 ... CHE-447.518.447 ... CHE-447.564.660 ... CHE-449.312.098 ... CHE-450.220.178 ... CHE-460.147.005 ... CHE-467.023.568 ... CHE-468.593.911 ... CHE-475.427.548 ... CHE-478.406.525 ... CHE-488.502.886 ... CHE-488.972.766 ... CHE-489.713.641 ... ... ''' >>> [x for x in numbers.splitlines() if x and not uid.is_valid(x)] [] python-stdnum-1.2/tests/test_ar_cuit.doctest0000644000000000000000000001045612601744732021375 0ustar rootroot00000000000000test_ar_cuit.doctest - more detailed doctests for the stdnum.ac.cuit module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.ac.cuit module. It tries to validate a number of numbers that have been found online. >>> from stdnum.ar import cuit >>> from stdnum.exceptions import * These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 20040356437 ... 20047433747 ... 20050573452 ... 20054613009 ... 20058481425 ... 20058723410 ... 20058879089 ... 20073562954 ... 20073659486 ... 20076084735 ... 20077530127 ... 20081042404 ... 20086295106 ... 20086607043 ... 20101376630 ... 20102289855 ... 20103055475 ... 20105567643 ... 20108146304 ... 20108524244 ... 20108909170 ... 20110831243 ... 20112806440 ... 20113951517 ... 20120774019 ... 20121388570 ... 20125491783 ... 20128032801 ... 20129599058 ... 20131707992 ... 20132002755 ... 20136310136 ... 20143455905 ... 20144779674 ... 20145053294 ... 20146234306 ... 20171104042 ... 20171823960 ... 20182886530 ... 20184230446 ... 20187687137 ... 20202569456 ... 20203954795 ... 20204393363 ... 20205752766 ... 20209954088 ... 20213601785 ... 20220030165 ... 20223730907 ... 20224293578 ... 20225121169 ... 20227716011 ... 20237525613 ... 20238697752 ... 20245079541 ... 20248651793 ... 20250926155 ... 20255761367 ... 20259636117 ... 20261576393 ... 20262358977 ... 20271280344 ... 20272201588 ... 20275121364 ... 20282423910 ... 20283621759 ... 20285115664 ... 20287747722 ... 20290072981 ... 20293386162 ... 20298479932 ... 20300953655 ... 20305216950 ... 20314469616 ... 20314970951 ... 20319011987 ... 20320639361 ... 20321768165 ... 20323118249 ... 20324215809 ... 20324381709 ... 20324794043 ... 20328504708 ... 20344135763 ... 20344379131 ... 20347620204 ... 20354205271 ... 20355854974 ... 20360612679 ... 20373308359 ... 20922078182 ... 20922312401 ... 20929597916 ... 23042708194 ... 23045174999 ... 23081181489 ... 23102532279 ... 23161822434 ... 23175636404 ... 23214238519 ... 23233647969 ... 23244989004 ... 23270774199 ... 23278857069 ... 23279103009 ... 23314669649 ... 23324786244 ... 23334052729 ... 23338909764 ... 23355601684 ... 23935319099 ... 24276145513 ... 27018259899 ... 27023396861 ... 27032487705 ... 27056528240 ... 27057490638 ... 27060695488 ... 27063049366 ... 27066515678 ... 27066595485 ... 27098767849 ... 27107931738 ... 27114547382 ... 27121262059 ... 27122342420 ... 27127539923 ... 27130430142 ... 27134454569 ... 27172336472 ... 27173495094 ... 27175432812 ... 27177192010 ... 27177721994 ... 27179361642 ... 27180795672 ... 27185685298 ... 27201493841 ... 27205913209 ... 27215060417 ... 27216654523 ... 27216824178 ... 27221319619 ... 27232710921 ... 27234685568 ... 27243584871 ... 27245896609 ... 27247110831 ... 27248949770 ... 27250076679 ... 27259106430 ... 27259522078 ... 27261420215 ... 27262935081 ... 27267742249 ... 27273160103 ... 27276663084 ... 27278570601 ... 27279026271 ... 27281657025 ... 27283110546 ... 27284491675 ... 27284753505 ... 27288128389 ... 27296108591 ... 27303521211 ... 27304599451 ... 27310947828 ... 27312481389 ... 27314396036 ... 27316481677 ... 27335804088 ... 27354548165 ... 27366029902 ... 27366146259 ... 27372855350 ... 27373316690 ... 27937240444 ... 27938621395 ... 27940212664 ... 27949019387 ... 30653311857 ... 30670349760 ... 30691769336 ... 30700596210 ... 30710422636 ... 30710916574 ... 30711016046 ... 30711067074 ... 30711271003 ... 30711683166 ... 30712071199 ... 30712417419 ... 30714322296 ... 30714468088 ... 30714789062 ... 33534828379 ... 33708972679 ... 33712308589 ... 33714423709 ... ... ''' >>> [x for x in numbers.splitlines() if x and not cuit.is_valid(x)] [] python-stdnum-1.2/tests/test_bg_vat.doctest0000644000000000000000000000317312154625043021203 0ustar rootroot00000000000000test_bg_vat.doctest - more detailed doctests for stdnum.bg.vat module Copyright (C) 2012, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.bg.vat module. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.bg import vat Normal values that should just work. >>> vat.validate('103873594') # 9-digit legal entity '103873594' >>> vat.validate('131272009') # legal entity with fallback checksum '131272009' >>> vat.validate('7501020018') # physical person '7501020018' >>> vat.validate('8001010008') # physical person '8001010008' >>> vat.validate('8032056031') # physical person '8032056031' >>> vat.validate('7111042925') # foreigners '7111042925' >>> vat.validate('7153849522') # others '7153849522' Invalid checksum: >>> vat.validate('175074751') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... python-stdnum-1.2/tests/test_eu_vat.doctest0000644000000000000000000003671512606424566021245 0ustar rootroot00000000000000test_eu_vat.doctest - more detailed doctests for the stdnum.eu.vat module Copyright (C) 2012-2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.eu.vat module. It tries to validate a number of VAT numbers that have been found online. >>> from stdnum.eu import vat >>> from stdnum.exceptions import * These have been found online and should all be valid numbers. >>> numbers = ''' ... ... ATU 142 43 102 ... ATU 15159209 ... ATU 28560205 ... ATU 34172105 ... ATU 40698107 ... ATU 46276408 ... ATU 49362201 ... ATU 54299806 ... ATU 54300000 ... ATU 56377717 ... ATU 57194903 ... ATU 64487479 ... ATU 64762368 ... ATU 64938009 ... ATU 65020906 ... ATU 65033803 ... ATU 65034704 ... ATU 65480455 ... ATU13585627 ... ATU46080404 ... ATU61195628 ... ... BE (0)468.561.072 ... BE 0202.239.951 ... BE 0220.764.971 ... BE 0248.015.142 ... BE 0402 918 402 ... BE 0407.139.583 ... BE 0408 299 922 ... BE 0441.928.931 ... BE 0450 118 996 ... BE 0462423150 ... BE 0474 621 394 ... BE 0795 013 186 ... BE 0897290877 ... BE 444.503.092 ... BE 456.973.433 ... BE 464 401 356 ... BE0428759497 ... BE413562567 ... BE697449992 ... ... BG 103873594 ... BG 124 551 319 ... BG 130 358 310 ... BG 131 272 009 ... BG 131202360 ... BG 147137471 ... BG 175074752 ... BG 175186242 ... BG 200182590 ... BG 200950556 ... BG130544585 ... BG175074752 ... BG7111042925 ... BG7523169263 ... BG7542011030 ... BG8032056031 ... Bg 200442771 ... ... CY 10246672X ... CY 10263870R ... CY 10274231F ... CY 10285193Z ... CY- 10277198H ... CY-10008489 A ... CY-10189098G ... CY-10258074Y ... CY-10259033P ... CY00632993 F ... ... CZ 25123891 ... CZ 25577581 ... CZ 26852357 ... CZ 61467839 ... CZ 640229/4448 ... CZ 640903926 ... CZ 6956220612 ... CZ 736028/5163 ... CZ 8058012314 ... CZ26780259 ... CZ48207926 ... CZ49620819 ... CZ6306150004 ... ... DE - 113866163 ... DE - 231969187 ... DE - 265265318 ... DE - 267297673 ... DE 118619592 ... DE 125014955 ... DE 129304291 ... DE 168347747 ... DE 181 207 708 ... DE 195131068 ... DE 204 760 908 ... DE 213 806 597 ... DE 221.304.969 ... DE 246 595 415 ... DE 811 363 057 ... DE 811125440 ... DE 811305931 ... DE 813 11 38 75 ... DE 813 184868 ... DE119263782 ... DE129390950 ... DE136308783 ... DE812847601 ... ... DK 10 50 32 80 ... DK 11 97 56 58 ... DK 12 14 48 22 ... DK 13 20 24 35 ... DK 13 31 04 59 ... DK 16 89 50 16 ... DK 25 18 63 11 ... DK 25 76 63 69 ... DK 25 86 35 26 ... DK 2566 2202 ... DK 26 09 77 89 ... DK 26 57 61 64 ... DK 28 01 76 34 ... DK 28107773 ... DK 29523215 ... DK 30 06 09 46 ... DK 32 27 15 02 ... DK 32329853 ... DK 65 07 04 13 ... DK 90 30 16 59 ... DK-20 04 52 72 ... DK-20 64 64 46 ... DK-27630308 ... DK-27926592 ... DK-28840926 ... DK-31882095 ... DK-33053266 ... DK10150817 ... DK10290813 ... DK26210895 ... DK36149213 ... DK: 21599336 ... ... EE 100 931 558 ... EE 100523487 ... EE 100572933 ... EE 100578209 ... EE 100594102 ... EE 100594403 ... EE 100832107 ... EE 100834066 ... EE 101031389 ... EE 101286639 ... EE 101288941 ... EE101256753 ... ... ES - Q0818001J ... ES 54362315K ... ES A-28184661 ... ES A-60631835 ... ES A-60997582 ... ES A08370314 ... ES A17028366 ... ES B-58378431 ... ES B64240914 ... ES B64717838 ... ES B79110482 ... ES B80975063 ... ES F13005293 ... ES J99216582 ... ES Q-2818015-F ... ES R9600075G ... ES U99216426 ... ES U99216632 ... ES V99218067 ... ES W4003922D ... ES X-5253868-R ... ES X5277343Q ... ES Y5277343F ... ES Z5277343K ... ES- A84409408 ... ES-A08074908 ... ES-B 60432291 ... ES-B18889204 ... ES-B55015432 ... ES-B64995111 ... ES-B96902531 ... ES-x-2482300w ... ESA78109592 ... Es-a58951310 ... ... EL 039868210 ... EL 044824428 ... EL 072130053 ... EL 082499478 ... EL 094012834 ... EL 094064321 ... EL 094068633 ... EL 094237076 ... EL 094263543 ... EL 095217179 ... EL 095304080 ... EL 099548630 ... EL 94051189 ... EL 998386804 ... EL 998408192 ... EL 998722134 ... EL 999038150 ... EL 999107669 ... EL 999533911 ... EL 999698730 ... EL 999715835 ... EL-082857563 ... EL094501040 ... EL098099809 ... EL: 094279805 ... El 800 179 925 ... ... FI 02459042 ... FI 0982651-1 ... FI 10320534 ... FI 18949388 ... FI 20194885 ... FI 20774740 ... FI 2094606-3 ... FI 24416318 ... FI- 01968312 ... FI- 22291259 ... FI-214 95 540 ... FI-22291240 ... FI-24163066 ... FI18261444 ... ... FR 04409414364 ... FR 09434086930 ... FR 114 248 728 36 ... FR 13 393 892 815 ... FR 163 041 877 01 ... FR 18 349 685 099 ... FR 19 552 008 443 ... FR 19552143273 ... FR 20 329 450 738 ... FR 21 448 834 911 ... FR 2143 2146 546 ... FR 22 326 565 603 ... FR 22 379 160 070 ... FR 26 495 205 213 ... FR 28337893168 ... FR 355 92065536 ... FR 36 380 610 451 ... FR 36502095094 ... FR 38 353427495 ... FR 41-343848552 ... FR 53418304010 ... FR 60391548955 ... FR 61 954 506 077 ... FR 63 334 214 293 ... FR 65 444 243 075 ... FR 68 378 838 692 ... FR 70492082151 ... FR 72 483 995 197 ... FR 734 836 491 66 ... FR 736 220 50 318 ... FR 74 397 888 330 ... FR 77 055 501 902 ... FR 77 384 627 170 ... FR 78528824428 ... FR 79 410 964 837 ... FR 83 404 833 048 ... FR 84 323 140 392 ... FR 86 394 303 796 ... FR 86 542 103 569 ... FR 88775649726 ... FR 94016950842 ... FR K 7399859412 ... FR01712030113 ... FR64333266765 ... FR82542065479 ... FR83404833048 ... FR86451397608 ... FR95483929956 ... Fr 40 303 265 045 ... Fr 96 631 620 572 ... fr 71383076817 ... ... GB 002 4257 28 ... GB 003232345 ... GB 100 1950 75 ... GB 100190874 ... GB 102675046 ... GB 232177091 ... GB 242338087388 ... GB 311 405 025 ... GB 362 5866 29 ... GB 417 2280 71 ... GB 436 0630 72 ... GB 495 2781 05 ... GB 507 5768 25 ... GB 521 6763 52 ... GB 586 367 295 ... GB 591 9373 01 ... GB 605 8678 15 ... GB 662 8564 06 ... GB 698 550 577 ... GB 733 4428 41 ... GB 770 381 235 ... GB 784 9117 89 ... GB 808 6365 12 ... GB 812 8333 44 ... GB 818243334 ... GB 823 531 352 ... GB 829 9594 59 ... GB 845788960 ... GB 879 7056 62 ... GB 881 3758 91 ... GB 913 3041 68 ... GB 933210951 ... GB 975 8664 50 ... GB 977 4872 51 ... GB 980780684 ... GB 997 7094 44 ... GB260311213 ... GB653599494 ... GB974053902 ... ... HU -12509403 ... HU 10672101 ... HU 10766172 ... HU 11444923 ... HU 12723650 ... HU 12840937 ... HU 13851909 ... HU 18206373 ... HU 23157653 ... HU 64241281 ... HU-10402434 ... HU-12892312 ... HU-14528114 ... HU11377304 ... HU12078503 ... HU13852467 ... ... IE 0005306C ... IE 4550159S ... IE 4693875V ... IE 4731823J ... IE 632 3420 C ... IE 6324720T ... IE 6339273F ... IE 635 430 5C ... IE 6388047V ... IE 6397893P ... IE 6433435F ... IE 6436390B ... IE 6791517I ... IE 8223200u ... IE 9502346O ... IE 9574173P ... IE 9679477V ... IE 9719156S ... IE 9741812E ... IE 9742129V ... IE-9696131F ... IE6433435IH ... IE6433435OA ... IE6599001W ... IE8D79739I ... IE9Y71814N ... ... IT - 01404480202 ... IT 0 0 6 1 8 2 8 0 4 9 9 ... IT 00 595 000 217 ... IT 00118439991 ... IT 00193180932 ... IT 00520800319 ... IT 00571320076 ... IT 00687120980 ... IT 01189820689 ... IT 01413270396 ... IT 01465210449 ... IT 01501180333 ... IT 01606120226 ... IT 01687870137 ... IT 01720020344 ... IT 01822890388 ... IT 02100550264 ... IT 02109480976 ... IT 02153481201 ... IT 02359210354 ... IT 02408660211 ... IT 02829410980 ... IT 03274440241 ... IT 03367280363 ... IT 04894530635 ... IT 05366960010 ... IT 05460820961 ... IT 05617370969 ... IT 06075960010 ... IT 06729900966 ... IT 06863340961 ... IT 09596821000 ... IT 12920760159 ... IT-01626160210 ... IT-03700020104 ... IT-03827740402 ... IT-09159800011 ... IT00743110157 ... IT02087050155 ... IT: 02331250163 ... ... LT 100001354118 ... LT 100001509912 ... LT 100001799517 ... LT 100001890913 ... LT 100001906711 ... LT 100001919017 ... LT 100002645517 ... LT 100002922012 ... LT 100003619917 ... LT 100005066013 ... LT 100005929611 ... LT 119511515 ... LT 235449811 ... LT 250266219 ... LT 258596610 ... LT 354991917 ... LT 616414610 ... LT 757118413 ... LT-100000979812 ... LT100001251914 ... LT100002894215 ... LT100004801610 ... LT290068995116 ... ... LU 10059929 ... LU 10590281 ... LU 109 676 28 ... LU 11082217 ... LU 13178262 ... LU 150 274 42 ... LU 1871 0830 ... LU 19184853 ... LU 19406747 ... LU 19979983 ... LU 20981643 ... LU 21989666 ... LU 22 22 12 68 ... LU 22690342 ... LU 22991225 ... LU.248.70.640 ... LU: 20993674 ... LU: 2294 4200 ... Lu 19980500 ... ... LV 4000 3521 600 ... LV 40003189718 ... LV 40003282138 ... LV 40003449366 ... LV 40003655379 ... LV 40003718068 ... LV 40003754957 ... LV 40003777428 ... LV 40003939038 ... LV 40008000102 ... LV 40103077610 ... LV 40103157009 ... LV 40103179665 ... LV 40103264016 ... LV 43603009384 ... LV 44103040262 ... LV 5000 399 3021 ... LV 50003087101 ... LV 90000528023 ... LV-40003241337 ... LV-40003467376 ... LV-42103016370 ... LV-42103048183 ... ... MT 1039-6417 ... MT 1167-9112 ... MT 1465 8213 ... MT 1613-4207 ... MT 17025737 ... MT 18740407 ... MT 1894 0705 ... MT 1966 1023 ... MT 19784818 ... MT 2029 1423 ... MT 20630321 ... ... NL 001241 643 B01 ... NL 009122746 B01 ... NL 806753742B01 ... NL 820605876B01 ... NL 8225.69.759 b01 ... NL-812421267 B01 ... NL-8197.38.116.B.01 ... NL.0094.10.806.B.01 ... NL.8143.26.584.B.01 ... NL.8186.43.778.B.01 ... NL001309675B01 ... NL001545668B01 ... NL003376734B77 ... NL00449544B01 ... NL006375054B01 ... NL006866049B01 ... NL007394913B01 ... NL009093503B01 ... NL019077312B01 ... NL066593931B01 ... NL068357370B01 ... NL117621729B01 ... NL167647672B01 ... NL4495445B01 ... NL68357370B01 ... NL802003217B01 ... NL808373894B01 ... NL811705262B01 ... NL813411786B01 ... ... PL 5211355116 ... PL 5211754253 ... PL 5220205853 ... PL 5342152448 ... PL 5423074698 ... PL 584-030-44-72 ... PL 5840154038 ... PL 5840304472 ... PL 5860224115 ... PL 6330005110 ... PL 645-000-67-50 ... PL 6651344956 ... PL 6661913137 ... PL 6772320831 ... PL 6792831859 ... PL 6831810615 ... PL 6842599822 ... PL 687-16-26-585 ... PL 7010098470 ... PL 7271676569 ... PL 764-23-05-489 ... PL 764-23-05-495 ... PL 764-23-05-503 ... PL 764-23-05-526 ... PL 764-23-05-549 ... PL 764-23-05-555 ... PL 764-23-05-578 ... PL 767-000-06-78 ... PL 767-13-25-342 ... PL 767-14-25-718 ... PL 767-14-47-329 ... PL 768-000-24-66 ... PL 7711598811 ... PL 777 26 68 285 ... PL 7780104605 ... PL 7881154591 ... PL 7961373674 ... PL 8393173893 ... PL 851-020-66-96 ... PL 867-16-19-297 ... PL 8722342429 ... PL 8771130532 ... PL 8971772896 ... PL 8992708633 ... PL 9241826918 ... PL 9452174677 ... PL 9462485048 ... PL 9542705026 ... PL 9562197426 ... PL-7532365958 ... PL-951-157-77-68 ... PL5261025421 ... PL6772135826 ... ... PT 500 019 720 ... PT 500135.495 ... PT 501 507 930 ... PT 501 519 246 ... PT 501 964 843 ... PT 502448911 ... PT 502971142 ... PT 504141066 ... PT 506 030 636 ... PT 506835669 ... PT 507 223 730 ... PT 507 757 505 ... PT 507 859 146 ... PT 507297687 ... PT 508 081 327 ... PT 509 250 505 ... PT 509284930 ... PT-505 856 468 ... PT503038083 ... ... RO 11358544 ... RO 13837330 ... RO 14840784 ... RO 1630615123457 ... RO 16621241 ... RO 17832344 ... RO 1822964 ... RO 18341035 ... RO 185 472 90 ... RO 18779508 ... RO 20950021 ... RO 21356044 ... RO 21996566 ... RO 241 30 20 ... RO 24736200 ... RO 3087444 ... RO 4003786 ... RO 4019740 ... RO 4257679 ... RO 573768 ... RO 6010151 ... RO 6322498 ... RO 6655328 ... RO-23867797 ... RO-27849238 ... RO16241790 ... Ro 15071875 ... ... SE 202 100-5000 01 ... SE 390 806 051 401 ... SE 55 62 00-0777 01 ... SE 55 67 59 32 48 01 ... SE 556.383.740.901 ... SE 556058115801 ... SE 556126249301 ... SE 556433592401 ... SE 556700 3552 01 ... SE 556708202801 ... SE 556728341001 ... SE 556848115301 ... SE 720 522 241 201 ... SE-502053602401 ... SE-556 644 662 001 ... SE-556 792 355 101 ... SE-5562245190-01 ... SE-556271210801 ... SE-556666-4438-01 ... SE556043606401 ... Se 556250398601 ... ... SI 26808498 ... SI 29664373 ... SI 3609 7152 ... SI 48673820 ... SI 50223054 ... SI 56633360 ... SI 56951442 ... SI 68297530 ... SI 70310815 ... SI 73567906 ... SI 85390518 ... SI 92351069 ... SI-83815201 ... SI-89036999 ... ... SK 1078449064 ... SK 202 274 96 19 ... SK 2020 237 945 ... SK 2020257679 ... SK 2021 6858 20 ... SK 2021853504 ... SK 2021998528 ... SK 2022193459 ... SK2022193459 ... ... ''' >>> [x for x in numbers.splitlines() if x and not vat.is_valid(x)] [] The following numbers are wrong in one way or another. First we need a function to be able to determine the kind of error. >>> def caught(number, exception): ... try: ... vat.validate(number) ... return False ... except exception: ... return True ... These numbers should be mostly valid except that they have been mangled so their check digit is wrong. >>> numbers = ''' ... ... ATU 143 43 102 ... ATU 15169209 ... ATU46080904 ... ATU61191628 ... ... BE 0406.139.583 ... BE 0793 013 186 ... BE 456.973.432 ... BE697449982 ... ... BG 1037735942 ... BG 131 172 009 ... BG 147147471 ... BG 200940556 ... ... CY 10246672F ... CY-10009489 A ... CY-10257074Y ... CY00632893 F ... ... CZ 25557481 ... CZ 48207726 ... CZ 640913926 ... CZ 8058018314 ... ... DE 125014855 ... DE 246 495 415 ... DE 813 91 38 75 ... DE - 266297673 ... ... DK 11 96 56 58 ... DK 2565 2202 ... DK-27996592 ... DK10159817 ... ... EE 100 941 558 ... EE 100525487 ... EE 101586639 ... EE101256754 ... ... ES 54362415K ... ES K-2814015-F ... ES-x-2322300w ... Es-a48951310 ... ... EL 094013834 ... EL 094068733 ... EL094501140 ... EL: 094269805 ... ... FR 04409414264 ... FR 21 326 565 603 ... FR K 7399859312 ... FR L 7399859412 ... ... IE 4731823H ... IE 632 3421 C ... IE 5339273F ... IE8D79729I ... ... LV 40003189715 ... LV 90000528022 ... LV-10103241337 ... LV-42103048181 ... ... SK 1078449164 ... SK 302 274 96 19 ... SK 2030 237 945 ... SK 2020457679 ... ... ''' >>> [x for x in numbers.splitlines() if x and not caught(x, InvalidChecksum)] [] These numbers should be mostly valid except that they have some formatting flaws. >>> numbers = ''' ... ... AT1 142 43 102 ... ATU 1515B209 ... ... BE 02A2.239.951 ... BE 0220,764.971 ... ... BG 10X8735941 ... ... CY-102590Z3P ... ... DE 246X595 415 ... DE 011125440 ... ... IE 4550C59S ... IE 069385V8 ... ... NL 001241643801 ... NL 009122746B00 ... NL B06753742B01 ... NL 82X569759b01 ... ... SK A078449064 ... SK 012 274 96 19 ... SK 2010 237 945 ... ... ''' >>> [x for x in numbers.splitlines() if x and not caught(x, InvalidFormat)] [] These numbers should be mostly valid except that they have some component that contains an invalid or unknown value. >>> numbers = ''' ... ... CY-12259033P ... ... CZ 95123891 ... ... IT 00687129980 ... ... LT 100001354 ... LT 100001509922 ... ... QQ 124567 ... ... ''' >>> [x for x in numbers.splitlines() if x and not caught(x, InvalidComponent)] [] >>> vat.compact('QQ 124567') Traceback (most recent call last): ... InvalidComponent: ... These numbers should be mostly valid except that they have the wrong length. >>> numbers = ''' ... ... ATU 151592092 ... ... CY-1225903322 ... ... ES B-583784312 ... ... NL006866304B021 ... ... SE 55643359201 ... SE 5567003255201 ... ... ''' >>> [x for x in numbers.splitlines() if x and not caught(x, InvalidLength)] [] python-stdnum-1.2/tests/test_fi_hetu.doctest0000644000000000000000000000435712154625043021371 0ustar rootroot00000000000000test_fi_hetu.doctest - more detailed doctests for stdnum.fi.hetu module Copyright (C) 2011 Jussi Judin Copyright (C) 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.fi.hetu. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.fi import hetu >>> from stdnum.exceptions import * Normal values that should just work. >>> hetu.validate('131052-308T') '131052-308T' >>> hetu.validate('131052+308T') '131052+308T' >>> hetu.validate('131052A308T') '131052A308T' >>> hetu.validate('131052a308t') '131052A308T' Invalid checksum: >>> hetu.validate('131052-308U') Traceback (most recent call last): ... InvalidChecksum: ... Invalid century indicator: >>> hetu.validate('131052/308T') Traceback (most recent call last): ... InvalidFormat: ... >>> hetu.validate('131052T308T') Traceback (most recent call last): ... InvalidFormat: ... Invalid birth date: >>> hetu.validate('310252-308Y') Traceback (most recent call last): ... InvalidComponent: ... >>> hetu.validate('130052-308R') Traceback (most recent call last): ... InvalidComponent: ... Leaving out the first zero is wrong: >>> hetu.validate('10101-0101') Traceback (most recent call last): ... InvalidFormat: ... Invalid individual number: (for historical reasons individual IDs start from 002) >>> hetu.validate('131052-000V') Traceback (most recent call last): ... InvalidComponent: ... compact() and format() don't do much special: >>> hetu.compact('131052a308t') '131052A308T' python-stdnum-1.2/tests/test_ec_ruc.doctest0000644000000000000000000001667112601744732021214 0ustar rootroot00000000000000test_ec_ruc.doctest - more detailed doctests for stdnum.ec.ruc module Copyright (C) 2014 Jonathan Finlay Copyright (C) 2014-2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.ec.ruc. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.ec import ruc >>> from stdnum.exceptions import * Normal natural RUC values (third digit less than 6) that should just work. >>> numbers = ''' ... 0101016905001 ... 0602910945001 ... 0910005917001 ... 0926687856001 ... 1001152287001 ... 1102755442001 ... 1104552037001 ... 1311919078001 ... 1700672486001 ... 1702264233001 ... 1704159860001 ... 1710034065001 ... 1710585264001 ... 1710589373001 ... 1713238234001 ... 1714307103001 ... 1721788659001 ... 1803557964001 ... ''' >>> [x for x in numbers.splitlines() if x and not ruc.is_valid(x)] [] Normal public RUC values (third digit is 6) that should just work. >>> numbers = ''' ... 0160000510001 ... 0160001910001 ... 0160002210001 ... 0160037780001 ... 0260000250001 ... 0260000330001 ... 0260000760001 ... 0260001060001 ... 0260001140001 ... 0360000230001 ... 0360000580001 ... 0360001040001 ... 0360016230001 ... 0360023950001 ... 0460000130001 ... 0460000210001 ... 0460000560001 ... 0460000640001 ... 0460000720001 ... 0460001020001 ... 0460014860001 ... 0460020670001 ... 0460022020001 ... 0460022100001 ... 0460022370001 ... 0460023930001 ... 0460024310001 ... 0460024660001 ... 0460024740001 ... 0460026010001 ... 0460027250001 ... 0560000380001 ... 0560000540001 ... 0560000700001 ... 0660000280001 ... 0660000520001 ... 0660000600001 ... 0660000790001 ... 0660000870001 ... 0660000950001 ... 0660001090001 ... 0660001680001 ... 0660820400001 ... 0660828140001 ... 0660831360001 ... 0760000180001 ... 0760000260001 ... 0760000340001 ... 0760000850001 ... 0760000930001 ... 0760001070001 ... 0760001150001 ... 0760001230001 ... 0760001310001 ... 0760001900001 ... 0760033270001 ... 0860000160001 ... 0860000240001 ... 0860013300001 ... 0860014460001 ... 0860017480001 ... 0860019260001 ... 0860019500001 ... 0860032440001 ... 0960000490001 ... 0960000730001 ... 0960001700001 ... 0960005290001 ... 0960006420001 ... 0968529830001 ... 0968566440001 ... 1060000180001 ... 1060000260001 ... 1060000340001 ... 1060000420001 ... 1060000500001 ... 1060000690001 ... 1060000770001 ... 1060008080001 ... 1060014480001 ... 1060016930001 ... 1060018040001 ... 1060019520001 ... 1060021420001 ... 1060024600001 ... 1160000670001 ... 1160000750001 ... 1160001130001 ... 1160001480001 ... 1160008140001 ... 1160028840001 ... 1160037400001 ... 1160039880001 ... 1160836120001 ... 1260000140001 ... 1260000220001 ... 1260000300001 ... 1260000490001 ... 1260000730001 ... 1260001700001 ... 1260001890001 ... 1260002000001 ... 1260002190001 ... 1260006340001 ... 1260006770001 ... 1260033820001 ... 1360000200001 ... 1360000390001 ... 1360000470001 ... 1360000630001 ... 1360000710001 ... 1360001520001 ... 1360001600001 ... 1360001790001 ... 1360001870001 ... 1360002840001 ... 1360003300001 ... 1360014850001 ... 1360024570001 ... 1360029100001 ... 1360047940001 ... 1360052350001 ... 1360052430001 ... 1360055100001 ... 1360059280001 ... 1460000290001 ... 1460000370001 ... 1560000780001 ... 1560001160001 ... 1560001240001 ... 1660000680001 ... 1660011020001 ... 1660012930001 ... 1760000150001 ... 1760001040001 ... 1760001550001 ... 1760003920001 ... 1760004060001 ... 1760004650001 ... 1760009880001 ... 1760013560001 ... 1768007390001 ... 1768022510001 ... 1768034600001 ... 1768045130001 ... 1768048820001 ... 1768085430001 ... 1768102970001 ... 1768119510001 ... 1768123380001 ... 1768133340001 ... 1768152130001 ... 1768153450001 ... 1768155660001 ... 1860000130001 ... 1860000210001 ... 1860000480001 ... 1860000720001 ... 1860000800001 ... 1860000990001 ... 1860001020001 ... 1860001100001 ... 1865011360001 ... 1960001190001 ... 2060000150001 ... 2060000230001 ... 2160000480001 ... 2160011760001 ... ''' >>> [x for x in numbers.splitlines() if x and not ruc.is_valid(x)] [] Normal juridical RUC values (third digit is 9) that should just work. >>> numbers = ''' ... 0190115798001 ... 0190155722001 ... 0290001269001 ... 0290003288001 ... 0390027923001 ... 0490001883001 ... 0490002669001 ... 0590041920001 ... 0590052000001 ... 0690045389001 ... 0790015002001 ... 0790024656001 ... 0990138850001 ... 0990247536001 ... 0990459444001 ... 0991189432001 ... 0991208291001 ... 0991445854001 ... 0992397535001 ... 0992563834001 ... 1090033456001 ... 1090109487001 ... 1190015110001 ... 1190068389001 ... 1390001920001 ... 1390007791001 ... 1390013678001 ... 1390089410001 ... 1390091474001 ... 1690012606001 ... 1790011674001 ... 1790023508001 ... 1790045668001 ... 1790085783001 ... 1790093204001 ... 1790325083001 ... 1790451801001 ... 1790501469001 ... 1790517454001 ... 1790567699001 ... 1790834670001 ... 1791240448001 ... 1791280156001 ... 1791280172001 ... 1791708040001 ... 1791714350001 ... 1791891465001 ... 1791942167001 ... 1792060346001 ... 1792079411001 ... 1792141869001 ... 1792147638001 ... 1792373255001 ... 1890001323001 ... 1890003628001 ... 1890037646001 ... ''' >>> [x for x in numbers.splitlines() if x and not ruc.is_valid(x)] [] Values that are invalid in one way or another: >>> ruc.validate('179206034601') # too short Traceback (most recent call last): ... InvalidLength: ... >>> ruc.validate('17920603A6001') # contains a character Traceback (most recent call last): ... InvalidFormat: ... >>> ruc.validate('0170000610001') # third digit invalid Traceback (most recent call last): ... InvalidComponent: ... >>> ruc.validate('1763154690001') # invalid check digit in natural RUC Traceback (most recent call last): ... InvalidChecksum: ... >>> ruc.validate('0160000610001') # invalid check digit in public RUC Traceback (most recent call last): ... InvalidChecksum: ... >>> ruc.validate('0190115799001') # invalid check digit in juridical RUC Traceback (most recent call last): ... InvalidChecksum: ... >>> ruc.validate('8810034069001') # invalid province code in natural RUC Traceback (most recent call last): ... InvalidComponent: ... >>> ruc.validate('8868152120001') # invalid province code in public RUC Traceback (most recent call last): ... InvalidComponent: ... >>> ruc.validate('8892397539001') # invalid province code in juridical RUC Traceback (most recent call last): ... InvalidComponent: ... >>> ruc.validate('0926687856000') # invalid establishment in natural RUC Traceback (most recent call last): ... InvalidComponent: ... >>> ruc.validate('1760001550000') # invalid establishment in public RUC Traceback (most recent call last): ... InvalidComponent: ... >>> ruc.validate('0992397535000') # invalid establishment in juridical RUC Traceback (most recent call last): ... InvalidComponent: ... python-stdnum-1.2/tests/test_do_rnc.doctest0000644000000000000000000000616212601744732021212 0ustar rootroot00000000000000test_do_rnc.doctest - more detailed doctests for stdnum.do.rnc module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.do.rnc module. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.do import rnc Some basic tests for invalid numbers: >>> rnc.validate('12345678') Traceback (most recent call last): ... InvalidLength: ... >>> rnc.validate('1234567890') Traceback (most recent call last): ... InvalidLength: ... >>> rnc.validate('123456789012') Traceback (most recent call last): ... InvalidLength: ... >>> rnc.validate('acvbnmkjh') Traceback (most recent call last): ... InvalidFormat: ... >>> rnc.validate('122011226') '122011226' >>> rnc.validate('112031226') Traceback (most recent call last): ... InvalidChecksum: ... >>> rnc.validate('101637587') '101637587' These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 501050302 ... 501249532 ... 501275452 ... 501402772 ... 501406832 ... 501423982 ... 501430482 ... 501456252 ... 501464492 ... 501470042 ... 501494502 ... 501494812 ... 501496882 ... 501670912 ... 501690832 ... 501896112 ... 501925082 ... 501934782 ... 502004222 ... 502500262 ... 502571062 ... 502599382 ... 502601972 ... 502612532 ... 502614012 ... 502614802 ... 502858272 ... 502860692 ... 502866062 ... 502867182 ... 502871732 ... 502872372 ... 502873972 ... 502876882 ... 502879652 ... 502880022 ... 502880162 ... 502887132 ... 502889232 ... 502890842 ... 502894112 ... 503972922 ... 503995752 ... 504065782 ... 505030302 ... 505038532 ... 505063502 ... 505072412 ... 505613472 ... 505613502 ... 505613782 ... 505621912 ... 505622552 ... 507032262 ... 507883262 ... 511104382 ... 511106822 ... 512924072 ... 514026622 ... 514035672 ... 515121792 ... 515123442 ... 519505672 ... 522004242 ... 523006132 ... 523012132 ... 523013422 ... 523014062 ... 523015212 ... 523017622 ... 523021182 ... 523022162 ... 523022952 ... 523023592 ... 524001842 ... 524001982 ... 524007352 ... 524010892 ... 525001772 ... 525001802 ... 530001932 ... 531009502 ... 531030722 ... 531032342 ... 531035562 ... 531039622 ... 531042232 ... 531043182 ... 531054192 ... 531056152 ... 531073022 ... 531081602 ... 531085012 ... 531091322 ... 531096782 ... 531132312 ... 531136032 ... 531136962 ... 531137012 ... 531137152 ... ... ''' >>> [x for x in numbers.splitlines() if x and not rnc.is_valid(x)] [] python-stdnum-1.2/tests/test_it_codicefiscale.doctest0000644000000000000000000000731112606424414023211 0ustar rootroot00000000000000test_it_codicefiscale.doctest - tests for the stdnum.it.codicefiscale module Copyright (C) 2009-2013 Emanuele Rocca Copyright (C) 2014 Augusto Destrero Copyright (C) 2014 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.it.codicefiscale module. It tries to validate a number of tax codes that have been found online. >>> from stdnum.it import codicefiscale >>> from stdnum.exceptions import * Some valid numbers >>> numbers = ''' ... MRTNTN23M02D969P ... RCCMNL83S18D969H ... MRSMSR81D60Z611H ... CNTCHR83T41D969D ... FOXDRA26C24H872Y ... MAILCU91A25F839D ... RSSMRA45C12F205C ... RSSMRA45C12F20RX ... RSSMRA45C12F2L5N ... RSSMRA45C12F2LRI ... RSSMRAQRCMNFNLRG ... ''' >>> [x for x in numbers.splitlines() if x and not codicefiscale.is_valid(x)] [] These should be invalid: >>> codicefiscale.validate('CSTNGL22I10D086I') # the first 'I' shouldn't be there Traceback (most recent call last): ... InvalidFormat: ... >>> codicefiscale.validate('FOXDRA26C24H872A') Traceback (most recent call last): ... InvalidChecksum: ... >>> codicefiscale.validate('CNTCHR83T32D969H') # invalid date Traceback (most recent call last): ... InvalidComponent: ... Test getting the birth date. >>> codicefiscale.get_birth_date('MRTNTN23M02D969P') datetime.date(1923, 8, 2) >>> codicefiscale.get_birth_date('RCCMNL83S18D969H') datetime.date(1983, 11, 18) >>> codicefiscale.get_birth_date('MRSMSR81D60Z611H') datetime.date(1981, 4, 20) >>> codicefiscale.get_birth_date('CNTCHR83T41D969D') datetime.date(1983, 12, 1) >>> codicefiscale.get_birth_date('FOXDRA26C24H872Y') datetime.date(1926, 3, 24) >>> codicefiscale.get_birth_date('MAILCU91A25F839D') datetime.date(1991, 1, 25) >>> codicefiscale.get_birth_date('RSSMRA45C12F205C') datetime.date(1945, 3, 12) >>> codicefiscale.get_birth_date('RSSMRA45C12F20RX') datetime.date(1945, 3, 12) >>> codicefiscale.get_birth_date('RSSMRA45C12F2L5N') datetime.date(1945, 3, 12) >>> codicefiscale.get_birth_date('RSSMRA45C12F2LRI') datetime.date(1945, 3, 12) >>> codicefiscale.get_birth_date('RSSMRAQRCMNFNLRG') datetime.date(1945, 3, 12) >>> codicefiscale.get_birth_date('MRTNTN23M02D969P') datetime.date(1923, 8, 2) Test getting the gender. >>> codicefiscale.get_gender('MRTNTN23M02D969P') 'M' >>> codicefiscale.get_gender('RCCMNL83S18D969H') 'M' >>> codicefiscale.get_gender('RCDLSN84S16D969Z') 'M' >>> codicefiscale.get_gender('MRSMSR81D60Z611H') 'F' >>> codicefiscale.get_gender('CNTCHR83T41D969D') 'F' >>> codicefiscale.get_gender('FOXDRA26C24H872Y') 'M' >>> codicefiscale.get_gender('MAILCU91A25F839D') 'M' Test calculating the check digit. >>> codicefiscale.calc_check_digit('MRTNTN23M02D969') 'P' >>> codicefiscale.calc_check_digit('MRSMSR81D60Z611') 'H' >>> codicefiscale.calc_check_digit('RCDLSN84S16D969') 'Z' >>> codicefiscale.calc_check_digit('CNTCHR83T41D969') 'D' >>> codicefiscale.calc_check_digit('BNCSFN85T58G702') 'W' >>> codicefiscale.calc_check_digit('RCCMNL83S18D969') 'H' >>> codicefiscale.calc_check_digit('FOXDRA26C24H872') 'Y' >>> codicefiscale.calc_check_digit('MAILCU91A25F839') 'D' python-stdnum-1.2/tests/test_co_nit.doctest0000644000000000000000000001324212606424566021223 0ustar rootroot00000000000000test_co_nit.doctest - more detailed doctests for the stdnum.co.nit module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.co.nit module. >>> from stdnum.co import nit >>> from stdnum.exceptions import * Some more detailed checks. Some of these were previously in the module docstring. >>> nit.validate('213.123.432-1') '2131234321' >>> nit.validate('2131234351') '2131234351' >>> nit.validate('2131234351') '2131234351' >>> nit.validate('2131234') Traceback (most recent call last): ... InvalidLength: ... >>> nit.validate('213123435A') Traceback (most recent call last): ... InvalidFormat: ... >>> nit.validate('2131234350') Traceback (most recent call last): ... InvalidChecksum: ... Extra checks for format function to see that it works with all kinds of lengths. >>> nit.format('123.456.789-0') '123.456.789-0' >>> nit.format('12.345.678.912-0') '12.345.678.912-0' >>> nit.format('1.234.567-0') '1.234.567-0' These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 1118534248-0 ... 15.252.525-0 ... 17.343.020-1 ... 35324530-0 ... 37547837-0 ... 375478370 ... 51.922.998-7 ... 52.238.803-1 ... 6.386.949-2 ... 79.308.960-7 ... 79.896.529.6 ... 79626331-8 ... 79627373-1 ... 796273731 ... 800.003.122-6 ... 800.020.672-7 ... 800.026.452-0 ... 800.043.909-6 ... 800.100.532-8 ... 800.184.048-4 ... 800.219.488-4 ... 800.231.969-4 ... 800.242.106-2 ... 800.249.704-9 ... 800088702-2 ... 800112806-2 ... 800130907-4 ... 800140949-6 ... 800216278-0 ... 800224808-8 ... 800224827-8 ... 800226098 - 4 ... 800227940-6 ... 800228175 - 2 ... 800229739-0 ... 800231967-1 ... 800231969-4 ... 800240882-0 ... 800242272-7 ... 800250119-1 ... 800251440-6 ... 800253055-2 ... 800256161 - 9 ... 804001273-5 ... 805.014.583-3 ... 805000427-1 ... 805001157-2 ... 805021984-2 ... 811.014.798-1 ... 811019263-6 ... 812.007.765-3 ... 819.006.966-8 ... 830.015.428-5 ... 830.025.281-2 ... 830.035.734-1 ... 830.036-334-1 ... 830.042.619-1 ... 830.056.202-3 ... 830.061.111-1 ... 830.096.401-3 ... 830.136.779-4 ... 830003564-7 ... 830005997 - 1 ... 830005997-1 ... 830006404-0 ... 830008686-1 ... 830009783-0 ... 830074184-5 ... 830096513-1 ... 830097607-8 ... 830113831-0 ... 830125132-2 ... 830130800-4 ... 844.003.225-6 ... 844.003.392-8 ... 860 001 986-1 ... 860.001.986-1 ... 860.002.134-8 ... 860.002.184-6 ... 860.006.606-0 ... 860.007.331-5 ... 860.007.336-1 ... 860.013.433-2 ... 860.013.570-3 ... 860.013.798-5 ... 860.020.309-6 ... 860.033.941-8 ... 860.045.904-7 ... 860.051.784-4 ... 860.065.795-6 ... 860.066.942-7 ... 860.400.538-7 ... 860.400.602-0 ... 860.402.717-8 ... 860.511.071-6 ... 860.516.636-1 ... 860.527.857-8 ... 860001986-1 ... 8600019861 ... 860002183 - 9 ... 860002183-9 ... 860002503 - 2 ... 860002503-2 ... 860002527-9 ... 860002528 - 6 ... 860002964-4 ... 860006606-0 ... 860007331-5 ... 8600073361 ... 860007379-8 ... 860009174-4 ... 860011153 - 6 ... 860011153-6 ... 860013433-2 ... 860013816 - 1 ... 860013816-1 ... 860022137-5 ... 860027404 - 1 ... 860027404-1 ... 860028415 - 5 ... 860066942-7 ... 860503617 - 3 ... 860512237-6 ... 890 981 268 -— 4 ... 890 981 268 — 4 ... 890.000.062-6 ... 890.000.381-0 ... 890.101.994-9 ... 890.102.002-2 ... 890.102.044-1 ... 890.106.291-2 ... 890.201.213-4 ... 890.201.578-7 ... 890.270.275-5 ... 890.303.093-5 ... 890.304.033-8 ... 890.399.025-6 ... 890.480.023-7 ... 890.480.110-1 ... 890.500.516-3 ... 890.500.675-6 ... 890.680.023-5 ... 890.700.148-4 ... 890.700.679-3 ... 890.806.490-5 ... 890.900.840-1 ... 890.900.841-9 ... 890.907.106-5 ... 890000062-6 ... 890000381-0 ... 890102044-1 ... 890303093-5 ... 890480110-1 ... 890680023-5 ... 890704737-0 ... 890900840-1 ... 890900842-6 ... 8909009431 ... 890904996-1 ... 891.080.005-1 ... 891.180.008-2 ... 891.190.047-2 ... 891.190.346-1 ... 891.200.208-6 ... 891.200.337-8 ... 891.380.056-4 ... 891.400.726-8 ... 891.411.166-0 ... 891.480.000-1 ... 891.480.035-9 ... 891.500.182-0 ... 891.600.091-8 ... 891.780.093-3 ... 891.800.213-8 ... 891.856.077-3 ... 891.900.280-0 ... 891.900.452-0 ... 891280008-1 ... 891380003-4 ... 891480000-1 ... 891500182-0 ... 891900280-0 ... 891900452-0 ... 892.115.006-5 ... 892.200.015-5 ... 892.399.989-8 ... 892.400.320-5 ... 899.999.035-7 ... 899999001-7 ... 899999010-3 ... 899999026-0 ... 899999034-1 ... 899999054-7 ... 899999239-2 ... 899999734-7 ... 900 206 480 - 2 ... 900 206 480-2 ... 900 206 483-4 ... 900,206,480-2 ... 900,206,483-4 ... 900.006.334-7 ... 900.018.436-1 ... 900.086.865-8 ... 900.141.702-1 ... 900.187.401-8 ... 900.206,483-4 ... 900.206.480-2 ... 900.206.483-4 ... 900.274.326-6 ... 900.311.121-2 ... 900.320.056-1 ... 900.323.466—1 ... 900.343.302-6 ... 900.433.479-7 ... 900.465.924-0 ... 900.499.432-5 ... 900074992-3 ... 900112778-7 ... 900156264-2 ... 900206480-2 ... 900206483-4 ... 900219251-9 ... 900227140-3 ... 9002271403 ... 900264507-1 ... 900299795-5 ... 900336004-7 ... 900356846-7 ... 900462447-5 ... 900812264-7 ... ... ''' >>> [x for x in numbers.splitlines() if x and not nit.is_valid(x)] [] python-stdnum-1.2/tests/test_cl_rut.doctest0000644000000000000000000001005212601744732021227 0ustar rootroot00000000000000test_cl_rut.doctest - more detailed tests for stdnum.cl.rut Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.cl.rut module. >>> from stdnum.cl import rut >>> from stdnum.exceptions import * This is a selection of numbers (which should be valid) found at https://palena.sii.cl/cvc/dte/ee_empresas_emisoras.html >>> numbers = ''' ... ... 10075381-2 ... 10219183-8 ... 10273665-6 ... 10319569-1 ... 10402061-5 ... 10516143-3 ... 10548375-9 ... 10626628-K ... 10726809-K ... 10830138-4 ... 10860841-2 ... 11472349-5 ... 11482004-0 ... 11605334-9 ... 11840208-1 ... 11975507-7 ... 12150075-2 ... 12362626-5 ... 12392004-K ... 12415074-4 ... 12423920-6 ... 12574946-1 ... 12584568-1 ... 12645789-8 ... 12723467-1 ... 12790819-2 ... 13021498-3 ... 13073522-3 ... 13095834-6 ... 13097057-5 ... 13309437-7 ... 13490667-7 ... 13531984-8 ... 13646691-7 ... 13674023-7 ... 13743324-9 ... 13831173-2 ... 13908671-6 ... 13940679-6 ... 13966594-5 ... 13972493-3 ... 14232760-0 ... 14391166-7 ... 14676291-3 ... 14684927-K ... 14693665-2 ... 15187234-4 ... 15261623-6 ... 15264124-9 ... 15450326-9 ... 15930050-1 ... 16045507-1 ... 16607084-8 ... 3528355-2 ... 4769973-8 ... 52000543-9 ... 52003746-2 ... 5314394-6 ... 53311164-5 ... 5666126-3 ... 5759700-3 ... 5843733-6 ... 6188994-9 ... 6447064-7 ... 65700550-9 ... 6592333-5 ... 7092881-7 ... 7116223-0 ... 7341194-7 ... 7362723-0 ... 73968300-9 ... 76001215-7 ... 76001925-9 ... 76005843-2 ... 76007743-7 ... 76008294-5 ... 76009811-6 ... 76011739-0 ... 76012844-9 ... 76014309-K ... 76015107-6 ... 76015662-0 ... 76016096-2 ... 76019921-4 ... 76026514-4 ... 76026754-6 ... 76029043-2 ... 76033711-0 ... 76035895-9 ... 76042275-4 ... 76043207-5 ... 76043478-7 ... 76044777-3 ... 76048222-6 ... 76049323-6 ... 76051527-2 ... 76063318-6 ... 76069188-7 ... 76069621-8 ... 76073759-3 ... 76077253-4 ... 76080924-1 ... 76083398-3 ... 76094260-K ... 76164130-1 ... 76200530-1 ... 76200720-7 ... 76324600-0 ... 76327980-4 ... 76375410-3 ... 76377670-0 ... 76453840-4 ... 76461120-9 ... 76525260-1 ... 76527180-0 ... 76563850-K ... 76565840-3 ... 76624810-1 ... 76650270-9 ... 76653690-5 ... 76654270-0 ... 76670180-9 ... 76688170-K ... 76699320-6 ... 76724000-7 ... 76757480-0 ... 76758840-2 ... 76760580-3 ... 76792810-6 ... 76827950-0 ... 76884020-2 ... 76898760-2 ... 76953260-9 ... 76968400-K ... 77060220-3 ... 77183530-9 ... 77248650-2 ... 77308020-8 ... 77380420-6 ... 77413050-0 ... 77416300-K ... 7741928-4 ... 77451560-7 ... 77753800-4 ... 77827630-5 ... 77948290-1 ... 77962630-K ... 77986680-7 ... 78006840-K ... 78030800-1 ... 78072520-6 ... 78207580-2 ... 78281650-0 ... 78298460-8 ... 78432780-9 ... 78469000-8 ... 78477650-6 ... 78558880-0 ... 78780430-6 ... 78827280-4 ... 78861790-9 ... 78874150-2 ... 79586380-K ... 8005083-6 ... 83156400-8 ... 8352320-4 ... 8378799-6 ... 8379191-8 ... 8649219-9 ... 88830500-9 ... 90753000-0 ... 91520000-1 ... 92648000-6 ... 9290661-2 ... 9334748-K ... 93698000-7 ... 9475529-8 ... 9485538-1 ... 9506985-1 ... 9522447-4 ... 9580657-0 ... 96626570-1 ... 96632300-0 ... 96711760-9 ... 96721090-0 ... 96779280-2 ... 96813830-8 ... 96837220-3 ... 96919970-K ... 96930440-6 ... 96953410-K ... 96967100-K ... 9890042-K ... 9896013-9 ... 99147000-K ... 99512950-7 ... 99540200-9 ... 99561530-4 ... 99568510-8 ... 99595090-1 ... ... ''' >>> [x for x in numbers.splitlines() if x and not rut.is_valid(x)] [] python-stdnum-1.2/tests/test_is_kennitala.doctest0000644000000000000000000000247712601744732022414 0ustar rootroot00000000000000test_is_kennitala.doctest - more detailed doctests stdnum.is_.kennitala Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.is_.kennitala module. >>> from stdnum.is_ import kennitala >>> from stdnum.exceptions import * These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 020884-2749 ... 2607565169 ... 4406032540 ... 450401-3150 ... 480408-0550 ... 4905891209 ... 5609091440 ... 580169-1559 ... 580607-0710 ... 641005-1340 ... 670901-2110 ... 670906-0190 ... 7003090610 ... ... ''' >>> [x for x in numbers.splitlines() if x and not kennitala.is_valid(x)] [] python-stdnum-1.2/tests/test_isin.doctest0000644000000000000000000001447112606424756020720 0ustar rootroot00000000000000test_isin.doctest - more detailed doctests for the stdnum.isin module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.isin module. It tries to validate a number of numbers that have been found online. >>> from stdnum import isin >>> from stdnum.exceptions import * The number should start with a valid ISO 3166-1 alpha-2 country code: >>> isin.validate('ZZ0378331005') Traceback (most recent call last): ... InvalidComponent: ... These have been found online and should all be valid numbers. >>> numbers = ''' ... ... AU000000AAI6 ... AU000000AAT3 ... AU000000CDD7 ... AU000000HYR2 ... AU000000IIN2 ... AU000000PMI9 ... AU000000QMN7 ... AU000000TAG0 ... AU000000TAN6 ... AU000000YRR1 ... AU00000GPHO9 ... AU00000HAVO0 ... AU00000IMFG2 ... AU00000LSRO2 ... AU00000MEUO4 ... AU00000MFFO2 ... AU00000NMGG0 ... AU00000TGGR6 ... AU00000TISN6 ... AU00000TYXN3 ... AU00000WXHG6 ... AU0000ARUAM8 ... AU0000AVIAL7 ... AU0000AYCAA7 ... AU0000BRKDC2 ... AU0000BWPAK0 ... AU0000CIMAK4 ... AU0000COOAQ5 ... AU0000CXMAK3 ... AU0000DM1AE9 ... AU0000DM1XX1 ... AU0000DNAAK7 ... AU0000ENRAK9 ... AU0000FXJAB1 ... AU0000INDAK0 ... AU0000JALAO0 ... AU0000JKLAN1 ... AU0000LCYAM9 ... AU0000MSCAK3 ... AU0000NANAI0 ... AU0000PGIAO0 ... AU0000RGSAO5 ... AU0000SHKAO8 ... AU0000SIRAW4 ... AU0000SWLAI7 ... AU0000TSMAQ4 ... AU0000UPGDA8 ... AU0000VICAK5 ... AU0000VMXDC4 ... AU0000WBCAB7 ... AU0000WBCPF6 ... AU0000WBCZZ3 ... AU0000YNBAE4 ... AU000AMPJOF0 ... AU000ANZSRX4 ... AU000ARGJOM4 ... AU000CBALOX0 ... AU000CBALOZ5 ... AU000DJXKOB1 ... AU000ETFBSK6 ... AU000ETPCOP1 ... AU000ETPNRG0 ... AU000FMGWOP0 ... AU000GEMJOG9 ... AU000HFRJOT6 ... AU000MMSKOA8 ... AU000ORIKOC0 ... AU000PRYKOU6 ... AU000QANSWH6 ... AU000SFRKOJ2 ... AU000SGPKOF2 ... AU000SHLSSA4 ... AU000SYDIOO7 ... AU000SYISRX9 ... AU000TLSSSN2 ... AU000WBCLOQ8 ... AU000WESSWC6 ... AU000WFDDSN2 ... AU000WORSSR3 ... AU000WPLIOZ6 ... AU000XINABL9 ... AU000XINAHO0 ... AU000XINAKD7 ... AU000XINANQ3 ... AU000XINAV76 ... AU300PUMC025 ... AU60WHT00394 ... BMG4209T1009 ... BMG9834K1505 ... CA4656761042 ... CH0004171952 ... CH0010543905 ... CH0011105639 ... CH0011443832 ... CH0019112892 ... CH0028465273 ... CH0031152017 ... CH0032973528 ... CH0032979764 ... CH0032979871 ... CH0033337277 ... CH0037485627 ... CH0037485734 ... CH0042345089 ... CH0049815712 ... CH0100461042 ... CH0237135386 ... CH0276194575 ... CH0276213797 ... CH0278112146 ... CH0284369565 ... CH0288210914 ... CH0292642904 ... CH0293194293 ... CNE100000114 ... CNE100001M79 ... CWN8141V6954 ... CWN8144F3826 ... DE0005994388 ... DE0005997316 ... DE0007200412 ... DE0007681454 ... DE0007681975 ... DE0007932220 ... DE000A0DMV42 ... DE000A0DMV83 ... DE000A0G9FM3 ... DE000A0Z2946 ... DE000A0Z29G3 ... DE000A0Z3WV9 ... DE000A0Z3Z46 ... DE000A1EW8B3 ... DK0002006113 ... DK0002021690 ... DK0004903424 ... DK0004903770 ... DK0004909033 ... DK0005602439 ... DK0006321633 ... DK0006707070 ... DK0006900741 ... DK0007300339 ... DK0007702054 ... DK0007703458 ... DK0008100290 ... DK0008703150 ... DK0009255002 ... DK0009281511 ... DK0009351900 ... DK0009360141 ... DK0009362519 ... DK0009363087 ... DK0009705063 ... DK0009770471 ... DK0009771529 ... DK0030074216 ... DK0030269220 ... FR0010655753 ... GB0002405495 ... GB0003375820 ... GB0005058408 ... GB0031192486 ... GB0032211095 ... GB00B0599712 ... GB00B0599P95 ... GB00B05CVL88 ... GB00B05DCP29 ... GB00B05DGB62 ... GB00B05DNW68 ... GB00B05DSX21 ... GB00B05F5F96 ... GB00B05F5Q02 ... GB00B05FQ671 ... GB00B05FVH32 ... GB00B05G0029 ... GB00B05G4005 ... GB00B05G5K71 ... GB00B05G9160 ... GB00B0SD8170 ... GB00B0SDJ810 ... GB00B0SDL857 ... GB00B0VMNC71 ... GB00B11DNW78 ... GB00B1893G22 ... GB00B1CQNL45 ... GB00B1CQTJ43 ... GB00B1CQVM10 ... GB00B1KW2C82 ... GB00B2NL0X68 ... GB00B2PVJ269 ... GB00B2PVKX41 ... GB00B2PY1T61 ... GB00B2PY4209 ... GB00B2RBNV18 ... GB00B3BR9475 ... GB00B3CFYP64 ... GB00B3CFZV99 ... GB00B3CG0P10 ... GB00B3CG1L47 ... GB00B3LBXL47 ... GB00B3LFND86 ... GB00B3NVXT01 ... GB00B3Q2HT84 ... GB00B4V4XS73 ... GB00B4ZQ7X29 ... GB00B51RP987 ... GB00B5VJC047 ... GB00B6RRK619 ... GB00B6VQMK23 ... GB00B6VW1G93 ... GB00B6ZXH376 ... GB00B7LDLC53 ... GB00B7MT2J68 ... GB00B80KHR13 ... GB00B8113P38 ... GB00B8B4R053 ... GB00B8J3Q414 ... GB00BJ36MF67 ... GB00BK1PTB77 ... GB00BRKXHJ51 ... GB00BV0MBK93 ... GB00BVVT7780 ... GB00BYZ3J264 ... HK0000096617 ... HK0000179686 ... HK0000227162 ... HK0000230331 ... HK0000244647 ... HK0000245925 ... HK0000246709 ... HK0000248267 ... HK0000248515 ... HK0000249794 ... HK0000250578 ... HK0000253002 ... HK0000258720 ... HK0000262441 ... HK0000263449 ... HK0000265345 ... HK0000267077 ... IE0004906560 ... IE00B4WPHX27 ... IE00BLSNMW37 ... IE00BRHZ0398 ... INE019A07282 ... INE115A07ED1 ... INE115A07GL9 ... INE321N07046 ... INE476M07081 ... INE476M07123 ... INE523E07BF9 ... INE523E07BT0 ... INE549F08434 ... INE651J07036 ... INE691I07AO9 ... INE823G07193 ... INE827N07109 ... INF209K01MJ3 ... JE00B1RJLF86 ... JE00B24DML30 ... JE00B2NFV571 ... KYG198891072 ... KYG4643G1029 ... KYG4708D1016 ... KYG607441022 ... KYG811511131 ... KYG886121097 ... LU0455009182 ... LU0460389678 ... LU0683010093 ... LU0688203917 ... LU0859479155 ... LU1048317298 ... NL0010524690 ... NL0010865176 ... NL0010882288 ... NL0010948949 ... NL0011221981 ... NL0011278445 ... NL0011327101 ... NL0011337290 ... US101137AA59 ... US12591DAC56 ... US17322R1059 ... US26067A1108 ... US26070W1099 ... US36962GXS82 ... US78387GAK94 ... US867363AF06 ... XC0006883695 ... XS0110106365 ... XS0137672381 ... XS0162732951 ... XS0324245116 ... XS0409318309 ... XS0458685913 ... XS0691593114 ... XS0758793342 ... XS0841191991 ... XS0861774635 ... ... ''' >>> [x for x in numbers.splitlines() if x and not isin.is_valid(x)] [] python-stdnum-1.2/tests/test_iso7064.doctest0000644000000000000000000000377612154625043021065 0ustar rootroot00000000000000test_doctest - more detailed doctests for the stdnum.iso7064 package Copyright (C) 2010, 2011, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.iso7064 package. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.iso7064 import mod_11_10, mod_11_2, mod_37_2, mod_37_36, mod_97_10 These are normal variations of Mod 11, 10 that should just work. >>> mod_11_10.validate('12323') '12323' >>> mod_11_10.validate('546794') '546794' >>> mod_11_10.calc_check_digit('0794') '5' >>> mod_11_10.validate('07945') '07945' >>> mod_11_10.calc_check_digit('00200667308') '5' >>> mod_11_10.validate('002006673085') '002006673085' >>> mod_11_10.validate('002006673084') Traceback (most recent call last): ... InvalidChecksum: ... >>> mod_11_10.calc_check_digit('00200667309') '3' >>> mod_11_10.calc_check_digit('00200667310') '8' >>> mod_11_10.calc_check_digit('00200667311') '6' >>> mod_11_10.calc_check_digit('00200667312') '4' These normal tests of Mod 11, 2 should just work. >>> mod_11_2.calc_check_digit('0794') '0' >>> mod_11_2.validate('07940') '07940' >>> mod_11_2.calc_check_digit('079') 'X' >>> mod_11_2.validate('079X') '079X' These normal tests of Mod 37, 2 should just work >>> mod_37_2.calc_check_digit('G123498654321') 'H' python-stdnum-1.2/tests/test_mx_rfc.doctest0000644000000000000000000002375412606424566021237 0ustar rootroot00000000000000test_mx_rfc.doctest - more detailed doctests for the stdnum.mx.rfc module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.mx.rfc module. >>> from stdnum.mx import rfc >>> from stdnum.exceptions import * The six digits are supposed to form a valid date. >>> rfc.validate('ABCD 123456') Traceback (most recent call last): ... InvalidComponent: ... The last three digits are in a special alphabet and should only contain 1-9A-V, 1-9A-Z and 0-9A for the last digits. >>> rfc.validate('AABN 821103 8Ñ2') Traceback (most recent call last): ... InvalidFormat: ... The first four digits of a personal number should not be one of the blacklisted words. >>> rfc.validate('CACA 580710 NF7') Traceback (most recent call last): ... InvalidComponent: ... Only personal numbers are allowed to be missing the "homoclave" (check digits) part. >>> rfc.validate('AKJ970902') Traceback (most recent call last): ... InvalidLength: ... A large number of numbers that are in use appear to have invalid check digits. This has been found in about 1.5% of all numbers found. For this reason, by default, validation of check digits has been disabled and can be enabled explicitly. >>> rfc.validate('SIN 931116 9P8') 'SIN9311169P8' >>> rfc.validate('SIN 931116 9P8', validate_check_digits=True) Traceback (most recent call last): ... InvalidChecksum: ... >>> rfc.validate('CCM 650122 I06') 'CCM650122I06' >>> rfc.validate('CCM 650122 I06', validate_check_digits=True) Traceback (most recent call last): ... InvalidComponent: ... Some extra formatting checks: >>> rfc.format('VSM140430NQA') 'VSM 140430 NQA' >>> rfc.format('ZUT A770215LK0') 'ZUTA 770215 LK0' These have been found online and should all be valid numbers. Note that these numbers all have valid check digits (also see the list below). >>> numbers = ''' ... ... &&&030828PX7 ... &JE040614N51 ... AA&0607148I0 ... AAA390128530 ... AAAA791128D63 ... AAAL730401TE0 ... AACA700913KZ0 ... AACC421231BH1 ... AADS251231CG0 ... AALC680929LH8 ... AAM090224BC2 ... AARR621113SN7 ... ABA130601BD3 ... ABH0507252D9 ... ACA120116TX5 ... ACO071219F51 ... AEAJ390701E82 ... AEL7407151YA ... AEM100930B11 ... AHO120203E8A ... ALD950921G27 ... ALE8401268K8 ... AMA990219PF8 ... AME040430UM8 ... AME110909530 ... AMM020222UT3 ... ANI0112176N8 ... AON0210014T5 ... AOX040831A59 ... AP&0305026J9 ... APA371201PQ7 ... AQU920317P4A ... ARO020221DQ4 ... ASE9112306M9 ... ATB081212MN5 ... AUD000704II1 ... AUHF891016KE4 ... AWI1206064H1 ... AYP110530D73 ... B&D9605298Y3 ... BADY7101185W6 ... BEE070927MH0 ... BER090921FJ6 ... BIHC5111253I7 ... BLN130425JU7 ... BMI880419PR5 ... BNE110914EY0 ... BSP0603203U3 ... BUGA701115I43 ... CAR910506BW8 ... CBC900829152 ... CCS8512024CA ... CDE110928FR0 ... CEG970917HY3 ... CEI111208UJ8 ... CET790711B43 ... CEX910718C75 ... CFE010608HC8 ... CGB000229SW0 ... CIG120628NQ1 ... CIN831107B41 ... CIT900525168 ... CLO070618EY6 ... CLO110607257 ... CLO850611371 ... CMA7708263Y7 ... CMA970306DZ8 ... CME990423373 ... CMI0507204U8 ... CMO101104D21 ... CNR100325T71 ... COI090127UY5 ... COML8103203QA ... COP891005HV6 ... CPR0611212K8 ... CSB021029689 ... CSI050527PE4 ... CSI900816E23 ... CSM130516IT5 ... CSU000912EH0 ... CTE870318ANA ... CTR0501281A7 ... CTS840406DB5 ... CTV080213S16 ... CUAF680927LM6 ... CVI961129D88 ... DAM121219GU4 ... DCA050617BJ7 ... DCF080331IP7 ... DCP1008179J4 ... DHO100211PP9 ... DIN130417NB8 ... DIP0405273R5 ... DIR070208V76 ... DIS9611059T1 ... DIV050625LE1 ... DMM120201G43 ... DMS121114BV6 ... DPU070904692 ... DVS120703FD1 ... ECM080228KF1 ... EDI000229CA3 ... EEM9110114W4 ... EGA060426LW6 ... EIA870112MW6 ... EIE080701SL6 ... EIM861215GH7 ... EIP971118EE0 ... EITM9103155L7 ... EMA001219M72 ... EME950412SS8 ... ENI731210FS2 ... ENP100804LU4 ... EPL031009LA3 ... EPM990712PX9 ... EPR920313DS8 ... ESI920217GY0 ... EUDC730505US6 ... EYA810212AB7 ... EYO121214DD5 ... FAM000229SB8 ... FCM0512093V7 ... FCR930924UP5 ... FDI060505DD8 ... FERL530506LL2 ... FLO9205187K8 ... FME780808PH2 ... FMP110620626 ... FPC960606SS7 ... FQU040210VB6 ... GABA930110DY7 ... GAD8509039E9 ... GAF091006GL7 ... GAGS8602119P9 ... GAI670926SX4 ... GBE910314CY9 ... GBM110523N11 ... GCT0205243T8 ... GEC091113R94 ... GEN060113JT9 ... GGS1306077E2 ... GIAI6703203N6 ... GIN130711BX1 ... GIN9806308G0 ... GLA1001272R3 ... GMA050607UA0 ... GMI920724CP5 ... GMO030628DI0 ... GMX0912018E6 ... GOAJ7101257MA ... GOBM630601RQ6 ... GOVB6202103B1 ... GTL101217DPA ... GUI990521N70 ... GURK651124IZ6 ... GYA010601HZ2 ... HAKC800506G89 ... HEA080829QE4 ... HEM881018M63 ... HIAD7004306I3 ... HIM950519AS3 ... HST051115KD6 ... HUM131108DJ7 ... IAG960627I24 ... ICR131219UR2 ... ICV111124GA3 ... ICW020809NG4 ... IEO861107K41 ... IET040122JP4 ... IET1402203U2 ... IJC090327V63 ... ILM130517SJ6 ... IME060217HN7 ... IPA090810Q33 ... ISD9609109M3 ... ITE040705LM7 ... ITM040310AX8 ... ITM7002044W3 ... ITM891121LZ9 ... ITO090804L92 ... IUS9207088R5 ... JET0811207A7 ... JINA4912084Z8 ... JJO021128CS9 ... JOFF550129TD7 ... KCO990630SQ4 ... KUC120227CP8 ... LBN120207CE8 ... LEAJ570610M32 ... LED070424K80 ... LIVR600908A58 ... LMX120112CH1 ... LRE050221F14 ... LTR101108SK5 ... LTS000117Q95 ... LUT0504217B1 ... MAC0501069H5 ... MAC050302QU4 ... MAE100225TF0 ... MALR850723RK4 ... MAOA800509SH5 ... MAPA600915DB4 ... MAR960628QU0 ... MAV890913NY0 ... MBU060512RE7 ... MCA851223JI9 ... MCP100710IH6 ... MCS830224156 ... MDM011001DD7 ... MECJ730513KC7 ... MELF7605095R6 ... MIR9812154E0 ... MIT110829255 ... MKE040510HW9 ... MLM020809894 ... MME120612IJ5 ... MME820427S6A ... MME9710313Z4 ... MOCC891114BA9 ... MOD9904275G7 ... MRG900406M6A ... MSI041208CR0 ... MSU121003LR3 ... MTR091125TJ8 ... MUÑ110218LJ6 ... MXS030318BP0 ... NAJ120705J5A ... NARF561006LT9 ... NFI000511G42 ... NIC120302LE4 ... NOCJ750806BJA ... OHA0204186H2 ... OIL080603P74 ... OIN970513LM7 ... OOM060208MC5 ... ORO040505KH3 ... ORS0011148U8 ... OVS041008711 ... PAP041025A11 ... PBC910219RI2 ... PCS091030DZA ... PDI630218N32 ... PEL910625UQ4 ... PGT110128I84 ... PII040123JR9 ... PIN8709103A4 ... PIT1207186S3 ... PLA020617B95 ... PME8308184S4 ... PMI0110161Q4 ... PPM970110676 ... PPT991115IR3 ... PRA071201A18 ... PRA850314FE5 ... PRO060904RR8 ... QVI850529SP8 ... RABT551122827 ... RAO821016K97 ... RCV060828NE3 ... RDI841003QJ4 ... REG070627EF9 ... REI120227C54 ... RIGL6608198W7 ... RME960329V67 ... ROZS700918HL9 ... RRE010202L83 ... RUAA751115C42 ... RUAJ8104018GA ... RZS9003238P5 ... SAGE661012E96 ... SALM760305JP4 ... SAVA810110EN5 ... SBR811009760 ... SCE000520HU0 ... SCI090109TZ2 ... SCO050124QL2 ... SDA8902091QA ... SEP051121DU8 ... SES0601271U0 ... SGY100210UL2 ... SIA0803073Z2 ... SIM080104CM6 ... SIN9904064B4 ... SME011012Q43 ... SME020208GXA ... SME060406U67 ... SME111212CA4 ... SOP0410217V5 ... SOP940502FF5 ... SOR9403107MA ... SOTG740115G1A ... SPL910701FD9 ... STP110106D88 ... TCS0104276P5 ... TEC0306066L6 ... TEE060928R87 ... TME930929DE1 ... TQI090928UR4 ... TSP931104UI0 ... UAI010212HW5 ... UEE110902V5A ... UFA1010116X3 ... VBF951020KT3 ... VCA0903116M7 ... VCO960628NZ0 ... VEFC6503094Q6 ... VEO100223D10 ... VMI820313C9A ... VMU930407NFA ... VSM040108TS6 ... VSO090204AF1 ... XCO111215IM0 ... YAT000229588 ... ZEJ060728K11 ... ZENP8101128Y0 ... ZGU920526T43 ... ZZE040708QJ9 ... ... ''' >>> [x for x in numbers.splitlines() if x and not rfc.is_valid(x, validate_check_digits=True)] [] The following numbers were also found online, and while they appear to be in use and referencing existing persons or organisations, the check digit does not validate. >>> numbers = ''' ... ... AAC0903183F6 ... AAMM450222AJ1 ... ALC920108P18 ... AMC020204AB7 ... AOM920820BEA ... ASA971202EB5 ... ASE0804046M8 ... AÑE9902224Z4 ... BABC300126Q66 ... BAÑ930616R66 ... BER060923LW4 ... BFI981221MG0 ... BLM890223FH1 ... BOJR890112DB9 ... BOR071120HE7 ... CAMG590407QSA ... CAMR620930HG5 ... CAVB360920196 ... CCB080911PV3 ... CCL020604CX0 ... CDO070410V77 ... CLA091217733 ... CLM9407017W4 ... CME030507A29 ... CME9809141L6 ... CME990816951 ... CMS071226LN2 ... COCA8007229UA ... CPC080624C48 ... CTA071106464 ... CUP820427ID9 ... DBE051005PT3 ... DEKR6305193Q2 ... DES8707223AA ... DJT031205MG4 ... DRA950811S25 ... EDG000413BF2 ... EME1006143T6 ... EQU810430193 ... FAE8509042W7 ... FIS0008226ZA ... FISL7809158A0 ... FME9305279N0 ... FSA080813655 ... FSI900505I74 ... GIR940318DF0 ... GJO891005N53 ... GMA080728MJ0 ... GME9606038V6 ... GOC841221BK0 ... GWS860313JA3 ... HHO900507844 ... HME020215QTA ... ICO990503PG4 ... IDE930601FJ4 ... IME0610197B2 ... ISM0403025G3 ... KAK030512QD7 ... KMN041126K5A ... KZY041011E20 ... LME9405237U7 ... LMI0811119C5 ... LOCB6410225K0 ... LOMM8110052J4 ... MAEE620525S14 ... MALC721019EV6 ... MDI931014D37 ... MFA840320DX0 ... MGR070820G78 ... MOJO6101239H7 ... MPT000824LH7 ... MSA850111TE1 ... NIÑ7409256U1 ... NSN000704SY3 ... NYL850506BJ8 ... OIC060523UW1 ... OMD100907CJ4 ... OPP010927SA5 ... OTM090818KS6 ... PAC8608084O8 ... PEJE480914ES9 ... PERL640914HY9 ... PPA100118E37 ... PTS091204M83 ... ROCS550714PC0 ... SIG060311PN2 ... SIT060329RA7 ... SME100414QY9 ... SME9502015F6 ... SMP060331P74 ... SMR011108KB9 ... SOMF730101689 ... SSB9512118M1 ... STM000215AG9 ... TFS011012M18 ... TLO020509RK3 ... TME940420LV5 ... TORE4007065V7 ... TPM06111759A ... TPT0202135S1 ... TPT890516JP5 ... VAME720111AA4 ... WME000218GK3 ... YLO031113IP4 ... YME9610251W6 ... ... ''' >>> [x for x in numbers.splitlines() if x and not rfc.is_valid(x)] [] python-stdnum-1.2/tests/test_br_cnpj.doctest0000644000000000000000000000335012605730775021365 0ustar rootroot00000000000000test_br_cnpj.doctest - more detailed doctests for the stdnum.br.cnpj module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.br.cnpj module. It tries to validate a number of numbers that have been found online. >>> from stdnum.br import cnpj >>> from stdnum.exceptions import * These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 07.195.358/0001-66 ... 08.807.432/0001-10 ... 11.015.248/0001-42 ... 11.017.153/0001-68 ... 11.017.153/0002-49 ... 11.017.153/0003-20 ... 11.017.153/0005-91 ... 11.980.459/0001-15 ... 14.847.283/0001-16 ... 14.847.283/0002-05 ... 14.847.283/0003-88 ... 14.847.283/0004-69 ... 14.847.283/0005-40 ... 16.727.230.0001-97 ... 18.090.575/0001-08 ... 18.090.575/0002-99 ... 18.090.575/0003-70 ... 18.090.575/0004-50 ... 18.090.575/0005-31 ... 22.610.961/0001-50 ... 44.407.989/0001-28 ... 47.080.619/0001-17 ... 53.612.734/0001-98 ... 61882613000194 ... 69.435.154/0001-02 ... ... ''' >>> [x for x in numbers.splitlines() if x and not cnpj.is_valid(x)] [] python-stdnum-1.2/tests/numdb-test.dat0000644000000000000000000000024512606424756020076 0ustar rootroot00000000000000# this is a comment line 0-8 prop1="foo" 100-999 prop2="bar" 200,300-399 prop3="baz" 6 prop1="boo" 90-99 prop1="booz" 00-89 prop2="foo" 900-999 prop2="fooz" python-stdnum-1.2/tests/test_iso6346.doctest0000644000000000000000000000331112601744732021054 0ustar rootroot00000000000000test_doctest - more detailed doctests for the stdnum.iso6346 package Copyright (C) 2014 Openlabs Technologies & Consulting (P) Limited 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 This file contains more detailed doctests for the stdnum.iso7064 package. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import iso6346 Test with valid numbers: >>> iso6346.validate('CSQU3054383') 'CSQU3054383' >>> iso6346.is_valid('CSQU3054383') True >>> iso6346.validate('csqu3054383') 'CSQU3054383' >>> iso6346.is_valid('csQU3054383') True >>> iso6346.validate('tcnu7200794') 'TCNU7200794' >>> iso6346.validate('tolu4734787') 'TOLU4734787' Test with invalid numbers: >>> iso6346.validate('CSQU3054384') Traceback (most recent call last): ... InvalidChecksum: ... >>> iso6346.validate('CSQU305438') Traceback (most recent call last): ... InvalidLength: ... >>> iso6346.is_valid('CSQU3054384') False >>> iso6346.validate('CSQU3054Z83') Traceback (most recent call last): ... InvalidFormat: ... python-stdnum-1.2/tests/test_gb_sedol.doctest0000644000000000000000000000757712606424756021545 0ustar rootroot00000000000000test_sedol.doctest - more detailed doctests for the stdnum.gb.sedol module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.gb.sedol module. It tries to validate a number of numbers that have been found online. >>> from stdnum.gb import sedol >>> from stdnum.exceptions import * Old-style number are fully numeric, new-style numbers start with a letter. >>> sedol.validate('0017505') '0017505' >>> sedol.validate('B07MXC1') 'B07MXC1' >>> sedol.validate('107MXC1') Traceback (most recent call last): ... InvalidFormat: ... No vowels are allowed: >>> sedol.validate('BO7MXC9') Traceback (most recent call last): ... InvalidFormat: ... These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 0016308 ... 0059585 ... 0286941 ... 0371847 ... 0885865 ... 0937636 ... 2181334 ... 2342034 ... 2458113 ... 3111084 ... 3143838 ... 3395349 ... 4178419 ... 4913223 ... 5533976 ... 7142091 ... B012BV2 ... B059874 ... B05CW04 ... B05D467 ... B05D6X8 ... B05D724 ... B05D746 ... B05D7C4 ... B05D7G8 ... B05D9N9 ... B05DCY1 ... B05DKZ8 ... B05DS21 ... B05DSL0 ... B05F6M3 ... B05F7R5 ... B05F7Z3 ... B05FC47 ... B05FFN7 ... B05FFX7 ... B05FHZ3 ... B05FJ02 ... B05FKV0 ... B05FKX2 ... B05FPZ9 ... B05FRQ4 ... B05FXV1 ... B05FZQ0 ... B05FZS2 ... B05G198 ... B05G637 ... B05G7J0 ... B068074 ... B0M6373 ... B0R46X9 ... B0SDR09 ... B0VMH70 ... B0VMJM9 ... B0VMPT8 ... B0XWNB4 ... B0YVBC7 ... B10LNL1 ... B11S1X9 ... B1893V7 ... B18S7B2 ... B1CD9S4 ... B1CDK14 ... B1CQNK3 ... B1CQRH8 ... B1CQRN4 ... B1CQV98 ... B1CQWZ1 ... B1CQY00 ... B1CR0L6 ... B1CR0S3 ... B1KTQX8 ... B1KYVC7 ... B1KYVZ0 ... B1RMWL0 ... B1VCNQ8 ... B1XG8T6 ... B243G00 ... B29LZ80 ... B2N6X76 ... B2PRS50 ... B2PRWF8 ... B2PRWJ2 ... B2PS0H9 ... B2PV5Y0 ... B2PVGZ8 ... B2PVHM2 ... B2PVMB6 ... B2PVP84 ... B2PVRV1 ... B2PY1R4 ... B2PY390 ... B2PY3H8 ... B2PY572 ... B2PY5J4 ... B2Q1N90 ... B2QXZK1 ... B2RKQW0 ... B39DW15 ... B3CFXY8 ... B3CFYB2 ... B3CG1T2 ... B3F8162 ... B3KF8V2 ... B3LFLQ7 ... B3LT1Q9 ... B3LXSJ3 ... B3M3MB2 ... B3M5D48 ... B3M7ZH1 ... B3MPTK6 ... B3MVRM2 ... B3NSQZ8 ... B3NVM93 ... B3P2YG5 ... B3P9Y44 ... B3PHCS8 ... B3PL150 ... B3PQ1W2 ... B3Q3L88 ... B3SC0P3 ... B3VM3R3 ... B3VVG60 ... B3XK5J1 ... B42TM62 ... B45BZT9 ... B4JT339 ... B4MJF52 ... B4PRH35 ... B50HQ74 ... B52LK94 ... B545JR5 ... B5497R3 ... B54V1Z5 ... B599TV6 ... B59TPT6 ... B5BKK36 ... B5BKMR4 ... B5P8YX4 ... B5T42N4 ... B5V3ZY1 ... B5VR9Q3 ... B61BDZ9 ... B626RZ1 ... B6496D9 ... B64JSM2 ... B652H90 ... B657SR0 ... B66G553 ... B6734R8 ... B676F30 ... B67NKZ8 ... B6QDDF0 ... B76V7N7 ... B78DL95 ... B7K2811 ... B7RRJJ4 ... B7RRKB3 ... B7WNMF4 ... B7XCP73 ... B80QGD8 ... B83MH18 ... B8C0D37 ... B8KQFS6 ... B8N44W4 ... B8N45L0 ... B8N46J5 ... B8V9FZ1 ... B9BRCL7 ... B9DQ900 ... BB97138 ... BBGBF31 ... BC7GZX2 ... BCRY644 ... BCW3NW3 ... BCZSZF2 ... BGJZZG8 ... BK1PTB7 ... BKXH0G3 ... BRWQVY5 ... BSBNC63 ... BTF8JJ3 ... BTL1K93 ... BVC3VM2 ... BVXCDJ9 ... BVXLP67 ... BW38RQ9 ... BWWD0R7 ... BWXBQ27 ... BWXTNQ4 ... BX7RKZ9 ... BX7RPQ5 ... BYN8P69 ... BYT3LB5 ... BYTLC94 ... BYW6P64 ... BYXJKZ6 ... BYXX1Y4 ... BZ0S6X3 ... BZ21T08 ... ... ''' >>> [x for x in numbers.splitlines() if x and not sedol.is_valid(x)] [] python-stdnum-1.2/tests/test_al_nipt.doctest0000644000000000000000000000644512601744732021400 0ustar rootroot00000000000000test_al_nitp.doctest - more detailed doctests stdnum.al.nipt Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.al.nipt module. >>> from stdnum.al import nipt >>> from stdnum.exceptions import * These have been found online and should all be valid numbers. There is also a validation service at http://www.qkr.gov.al/nrc/kerko_per_subjekt.aspx >>> numbers = ''' ... ... J 64103842 S ... J 69102564 M ... J 78311939 N ... J 8291 6498 D ... J 91402501 L ... J 98624806 P ... J61807017B ... J61826022R ... J61911008C ... J61922018S ... J61923008Q ... J62903175S ... J62903393F ... J62903470T ... J62903491S ... J64103682L ... J66702410U ... J67902618M ... J69405530G ... J71824003C ... J72603171B ... J73706808B ... J73721043Q ... J74517201G ... J77411245Q ... J81314004P ... J81402004E ... J81508002V ... J81804001C ... J86526614T ... J91305001Q ... J91808007H ... J92006014W ... J92917219S ... J93910409N ... K 01725001F ... K 02727202 O ... K 11715005 L ... K 22013001U ... K 37507987 N ... K 41316001 V ... K 41424801 U ... K 47905861 R ... K 63005203 O ... K 67204202 P ... K 91426008 U ... K11515001T ... K11715005L ... K12113002H ... K14019001H ... K21405003G ... K21622001M ... K22218003V ... K26330201T ... K31404025J ... K31525146H ... K31526056N ... K31823059I ... K31929010K ... K32203501H ... K32801430W ... K33714725W ... K34712418N ... K36308746I ... K36520204A ... K42725403f ... K46621201I ... K51428013Q ... K51518058O ... K59418208E ... K61710508W ... K71903001A ... K72410014H ... K81427030E ... K81428502L ... K81618039O ... K84508002F ... K87101202A ... K91725009J ... K92402023O ... L 21721005U ... L 22614402 H ... L01307052Q ... L01510016S ... L01622006F ... L01909501I ... L02003503P ... L02023501H ... L02226012N ... L02602801H ... L03321203G ... L06426702Q ... L06524402O ... L06901403L ... L06923204C ... L07305201K ... L08711201I ... L09110504G ... L11325024K ... L11625013E ... L11810502T ... L11815018A ... L12003021H ... L12009010A ... L12624002J ... L13020404N ... L14118803B ... L14703202P ... L21310054D ... L21408015A ... L21429502L ... L21508023Q ... L21923507N ... L22201021E ... L22203019C ... L22804207O ... L22825801P ... L22902002B ... L24006002V ... L24018612J ... L26311004G ... L29616001A ... L31511019E ... L31911504A ... L32210507A ... L32319014A ... L32522401O ... L33117002J ... L33318001M ... L41309075A ... L41320026E ... L41410025S ... L42008005H ... L42115015G ... L42206027K ... L42307007E ... L42710403A ... L42720201A ... L44119601E ... L46812703Q ... L47014204F ... L48117101S ... ... ''' >>> [x for x in numbers.splitlines() if x and not nipt.is_valid(x)] [] python-stdnum-1.2/tests/test_ch_vat.doctest0000644000000000000000000000356512606424566021223 0ustar rootroot00000000000000test_ch_vat.doctest - more detailed doctests for the stdnum.ch.vat module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.ch.vat module. >>> from stdnum.ch import vat >>> from stdnum.exceptions import * Some more detailed tests. >>> vat.validate('CHE-107.787.577 ZZZ') Traceback (most recent call last): ... InvalidComponent: ... >>> vat.validate('ZZZ-107.787.577 MWST') Traceback (most recent call last): ... InvalidComponent: ... These have been found online and should all be valid numbers. >>> numbers = ''' ... ... CHE-1 76.814.97 5 MWST ... CHE-100.155.212 MWST ... CHE-105.048.256 MWST ... CHE-105.838.471 MWST ... CHE-105.969.179 MWST ... CHE-106.222.918 MWST ... CHE-107.787.577 IVA ... CHE-108.113.335 MwST ... CHE-108.446.096 MWST ... CHE-108.703.181 MWST ... CHE-109.578.122 MWST ... CHE-110.576.236 IVA ... CHE-110.576.236 TVA ... CHE-112.142.015 TVA ... CHE-112.487.804 MWST ... CHE-113.330.424 MWST ... CHE-115.606.778 MWST ... CHE-116.046.681 TPV ... CHE-116.274.213 MWST ... CHE-116.320.362 MWST ... CHE-164.589.300 MWST ... CHE-400.352.783 MWST ... ... ''' >>> [x for x in numbers.splitlines() if x and not vat.is_valid(x)] [] python-stdnum-1.2/tests/test_isbn.doctest0000644000000000000000000000554012603553555020703 0ustar rootroot00000000000000test_isbn.doctest - more detailed doctests for stdnum.isbn module Copyright (C) 2010, 2011, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.isbn module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import isbn Tests for mangling and incorect check digits. >>> isbn.validate('08515x-629-2') # added X in the middle Traceback (most recent call last): ... InvalidFormat: ... >>> isbn.validate('85152-629-1') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> isbn.validate('978-902453827X') # ISBN13 with X check digit Traceback (most recent call last): ... InvalidFormat: ... >>> isbn.validate('978-902453827') # invalid length Traceback (most recent call last): ... InvalidLength: ... See if ISBN10 to 13 conversion works. >>> isbn.to_isbn13('978-9024538270') # ISBN13 should stay ISBN13 '978-9024538270' >>> isbn.to_isbn13('1 85798218 5') '978 1 85798218 3' >>> isbn.to_isbn13('1857982185') '9781857982183' >>> isbn.to_isbn13('1-85798-218-5') '978-1-85798-218-3' >>> isbn.validate(isbn.to_isbn13('1 85798218 5')) '9781857982183' >>> isbn.compact('1 85798218 5', convert=True) '9781857982183' >>> isbn.validate('1 85798218 5', convert=True) '9781857982183' See if ISBN13 to 10 conversion works. >>> isbn.to_isbn10('1-85798-218-5') # ISBN10 should stay ISBN10 '1-85798-218-5' >>> isbn.to_isbn10('978 1 85798218 3') '1 85798218 5' >>> isbn.to_isbn10('9781857982183') '1857982185' >>> isbn.to_isbn10('978-1-85798-218-3') '1-85798-218-5' >>> isbn.to_isbn10('979-20-1234567-8') # incorrect check digit Traceback (most recent call last): ... InvalidFormat: ... >>> isbn.to_isbn10('9791843123391') Traceback (most recent call last): ... InvalidFormat: ... Regrouping tests. >>> isbn.split('9024538270') # normal ISBN10 ('', '90', '245', '3827', '0') >>> isbn.split('9999678270') # ISBN10, unknown publisher in group ('', '99996', '', '7827', '0') >>> isbn.split('979-20-1234567-8') ('979', '', '', '201234567', '8') >>> isbn.split('5413170121522') # valid checkdigit, unknown prefix ('', '', '', '541317012152', '2') python-stdnum-1.2/tests/test_do_cedula.doctest0000644000000000000000000000633712601744732021671 0ustar rootroot00000000000000test_do_cedula.doctest - more detailed doctests for stdnum.do.cedula module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.do.cedula module. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.do import cedula Some basic tests for invalid numbers: >>> cedula.validate('1234567890') Traceback (most recent call last): ... InvalidLength: ... >>> cedula.validate('123456789111') Traceback (most recent call last): ... InvalidLength: ... >>> cedula.validate('abcasdqwerz') Traceback (most recent call last): ... InvalidFormat: ... >>> cedula.validate('00114272360') '00114272360' >>> cedula.validate('00114272368') Traceback (most recent call last): ... InvalidChecksum: ... >>> cedula.validate('00105606543') '00105606543' >>> cedula.validate('00113918205') '00113918205' >>> cedula.validate('00113918204') Traceback (most recent call last): ... InvalidChecksum: ... >>> cedula.validate('00113918213') '00113918213' >>> cedula.validate('0011391820x') Traceback (most recent call last): ... InvalidFormat: ... >>> cedula.validate('x0113918205') Traceback (most recent call last): ... InvalidFormat: ... >>> cedula.validate('00113x18205') Traceback (most recent call last): ... InvalidFormat: ... Some numbers have an invalid check digit but were issued nonetheless. The following numbers should all be valid cedulas. >>> numbers = ''' ... ... 00000058035 ... 00000155482 ... 00100288929 ... 00100709215 ... 00100759932 ... 00101552784 ... 00101659661 ... 00101961125 ... 00103754365 ... 00105606543 ... 00108796883 ... 00113918205 ... 00113918213 ... 00114272360 ... 00114532330 ... 00117582001 ... 00121581800 ... 00161884001 ... 00162906003 ... 00163540003 ... 00166533003 ... 00200123640 ... 00200409772 ... 00207327056 ... 00208430205 ... 00222017001 ... 00274652001 ... 00289931003 ... 00300169535 ... 00301200901 ... 00356533003 ... 00516077003 ... 00524571001 ... 00633126023 ... 00686904003 ... 00757398001 ... 00800106971 ... 00848583056 ... 01100620962 ... 01200004166 ... 01200008613 ... 01600026316 ... 02300023225 ... 02600036132 ... 02800021761 ... 02800029588 ... 03103749672 ... 03800032522 ... 04600198229 ... 04700027064 ... 05400038776 ... 05500003079 ... 05500006796 ... 05500022399 ... 05500023407 ... 07600000691 ... 09421581768 ... 10061805811 ... 12019831001 ... 22321581834 ... 22400022111 ... 40200401324 ... 90001200901 ... ... ''' >>> [x for x in numbers.splitlines() if x and not cedula.is_valid(x)] [] python-stdnum-1.2/tests/test_imei.doctest0000644000000000000000000000425712154625043020670 0ustar rootroot00000000000000test_imei.doctest - more detailed doctests for stdnum.imei module Copyright (C) 2010, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.imei module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import imei Should be valid numbers: >>> imei.validate('49-015420-323751') '49015420323751' >>> imei.validate('35-209900-176148-1') '352099001761481' >>> imei.validate('35-209900-176148-23') '3520990017614823' >>> imei.validate('350077-52-323751-3') '350077523237513' >>> imei.validate('354178036859789') '354178036859789' These are normal variations that should just work. Getting the type: >>> imei.imei_type('35686800-004141-20') 'IMEISV' >>> imei.imei_type('35-417803-685978-9') 'IMEI' >>> imei.imei_type('35-417803-685978-2') is None # invalid check digit True >>> imei.imei_type('3568680000414120') 'IMEISV' The format() function can add the check digit if needed. It should leave alone existing check digits (even invalid ones) and only add them to the 14 digit format. >>> imei.format('354178036859789') '35-417803-685978-9' >>> imei.format('35417803685978') '35-417803-685978' >>> imei.format('354178036859786', add_check_digit=True) '35-417803-685978-6' >>> imei.format('35417803685978', add_check_digit=True) '35-417803-685978-9' >>> imei.format('35686800-004141', add_check_digit=True) '35-686800-004141-8' >>> imei.format('35686800-004141-20', add_check_digit=True) '35-686800-004141-20' python-stdnum-1.2/tests/test_cusip.doctest0000644000000000000000000001027212606424756021074 0ustar rootroot00000000000000test_cusip.doctest - more detailed doctests for the stdnum.cusip module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.cusip module. It tries to validate a number of numbers that have been found online. >>> from stdnum import cusip >>> from stdnum.exceptions import * Number should not use O (captial o) or I (capital 1) to avoid confusion with 0 and 1: >>> cusip.validate('0O141T575') Traceback (most recent call last): ... InvalidFormat: ... >>> cusip.validate('257I32103') Traceback (most recent call last): ... InvalidFormat: ... These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 00078H125 ... 00080Y348 ... 00141H409 ... 00141M572 ... 00141T577 ... 00141V267 ... 00142F832 ... 00142K500 ... 00170J862 ... 00170K109 ... 00170M873 ... 00758M261 ... 024524746 ... 024932808 ... 024934408 ... 025081704 ... 025081860 ... 02631C817 ... 068278704 ... 068278878 ... 06828M405 ... 101156602 ... 119804102 ... 12628J600 ... 140543828 ... 192476109 ... 19765J830 ... 19765N401 ... 19765Y852 ... 207267105 ... 23336W809 ... 23337G134 ... 23337R502 ... 23338F713 ... 245908660 ... 245917505 ... 24610B859 ... 25155T528 ... 25156A668 ... 25157M778 ... 25159K309 ... 25159L745 ... 25264S403 ... 254939424 ... 257132100 ... 258618701 ... 261967103 ... 261967822 ... 261986566 ... 265458513 ... 265458570 ... 269858817 ... 277902565 ... 277905436 ... 29372R208 ... 313923302 ... 314172743 ... 315792598 ... 315805325 ... 315807651 ... 315911875 ... 315920579 ... 316069103 ... 31607A208 ... 316146257 ... 316175850 ... 31638R204 ... 316390277 ... 316390335 ... 316390640 ... 316390681 ... 320600109 ... 320604606 ... 320917107 ... 353496854 ... 353535107 ... 354128704 ... 354723769 ... 36158T506 ... 409902624 ... 416649507 ... 416649606 ... 425888104 ... 42588P825 ... 42588P882 ... 44929K630 ... 461418691 ... 465898682 ... 469785109 ... 471023531 ... 47803M663 ... 4812A4427 ... 4812C0548 ... 52106N335 ... 52106N442 ... 52106N632 ... 52106N657 ... 543912604 ... 543913305 ... 552984601 ... 552986309 ... 552986853 ... 557492428 ... 56063J849 ... 56063U851 ... 56166Y438 ... 561709692 ... 561717661 ... 57056B ZW1 ... 575719109 ... 592905756 ... 61744J499 ... 640917209 ... 640917407 ... 64122M506 ... 643642200 ... 647108414 ... 648018828 ... 650914203 ... 66537Y165 ... 67065R408 ... 67065R812 ... 670678762 ... 670690767 ... 670700608 ... 670725738 ... 670729599 ... 670729730 ... 680029667 ... 68583W507 ... 704329101 ... 70472Q302 ... 70472Q880 ... 72200Q232 ... 72201F383 ... 72201F458 ... 72201M800 ... 72201T664 ... 72201U430 ... 741481105 ... 741486104 ... 74149P390 ... 74149P648 ... 74149P689 ... 74149P820 ... 742935521 ... 742935547 ... 74316P207 ... 743185373 ... 743185464 ... 74318Q864 ... 74683L508 ... 749255121 ... 74972H200 ... 74972H283 ... 74972H390 ... 74972H598 ... 74972K666 ... 76628T496 ... 77956H302 ... 783554470 ... 783554728 ... 784924458 ... 803431105 ... 803431410 ... 829334101 ... 82980D400 ... 884116872 ... 890085327 ... 890085871 ... 89354D874 ... 904504560 ... 904504586 ... 912810EQ7 ... 912828C24 ... 912828EG1 ... 912828HA1 ... 912828KD1 ... 912828UA6 ... 920461209 ... 92646A252 ... 92913K645 ... 92913K884 ... 92913L775 ... 92913R822 ... 92914A661 ... 93208V106 ... 936793306 ... 936793504 ... 94975P686 ... 94984B108 ... 94984B538 ... 949915177 ... 949915557 ... 957904584 ... 969251719 ... 969251834 ... 984281204 ... Y0488F100 ... Y27257149 ... Y44425117 ... ... ''' >>> [x for x in numbers.splitlines() if x and not cusip.is_valid(x)] [] python-stdnum-1.2/tests/test_ee_ik.doctest0000644000000000000000000000555212601744732021024 0ustar rootroot00000000000000test_ee_ik.doctest - test for estonian personal id Copyright (C) 2015 Tomas Karasek Copyright (C) 2015 Arthur de Jong 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 >>> from stdnum.ee import ik >>> import stdnum.exceptions >>> ik.validate('36805280109') '36805280109' >>> ik.is_valid('36805280109') True >>> ik.calc_check_digit('36805280109') '9' >>> ik.validate('06805280106') # invalid first digit Traceback (most recent call last): ... InvalidComponent: ... >>> ik.validate('36805280108') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> ik.validate('368052801099') Traceback (most recent call last): ... InvalidLength: ... >>> ik.get_birth_date('36805280109') datetime.date(1968, 5, 28) >>> ik.get_birth_date('16805280107') datetime.date(1868, 5, 28) >>> ik.get_birth_date('51205280105') datetime.date(2012, 5, 28) >>> ik.get_birth_date('81205280108') datetime.date(2112, 5, 28) >>> ik.get_birth_date('06805280106') # invalid first digit Traceback (most recent call last): ... InvalidComponent: ... >>> ik.get_birth_date('38102290106') # non-existing date Traceback (most recent call last): ... InvalidComponent: ... >>> ik.get_gender('36805280109') 'M' >>> ik.get_gender('46805280103') 'F' >>> ik.get_gender('98102290101') # invalid first digit Traceback (most recent call last): ... InvalidComponent: ... >>> numbers = """ ... 36205030034 ... 36606130166 ... 38002090113 ... 36703010079 ... 36412140053 ... 37105250048 ... 35806110178 ... 38411280151 ... 38004160054 ... 37406220030 ... 37207010076 ... 46104090101 ... 47306160017 ... 35712020095 ... 35512240278 ... 37111070056 ... 36003050128 ... 34508136020 ... 37112300117 ... 37205120111 ... 36708120106 ... 36204130100 ... 36805280109 ... 36404240119 ... 37609300174 ... 38407170099 ... 35903140121 ... 36912050058 ... 36706060097 ... 37909180161 ... 37210220129 ... 35803140053 ... 37709190107 ... 36306200109 ... 36208130099 ... 37611280079 ... 35806190146 ... 44909210102 ... 37104020141 ... 35907150159 ... 36412100145 ... 49105080018 ... 37406110083 ... 36304020091 ... 37106220087 ... 34706045216 ... 37503240119 ... 38310150127 ... 46708270050 ... """ >>> [x for x in numbers.splitlines() if x and not ik.is_valid(x)] [] python-stdnum-1.2/tests/test_de_wkn.doctest0000644000000000000000000000645212606425160021213 0ustar rootroot00000000000000test_de_wkn.doctest - more detailed doctests for the stdnum.de.wkn module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.de.wkn module. It tries to validate a number of numbers that have been found online. >>> from stdnum.de import wkn >>> from stdnum.exceptions import * These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 934056 ... A0Q2A9 ... 978273 ... 989756 ... A0D85Q ... A0MUD3 ... A0F67A ... 622925 ... A0ESSP ... A0M82M ... 200435 ... 895705 ... A0MMMK ... 989226 ... 977858 ... A0DNG5 ... A0LGM2 ... 701932 ... A0H0UT ... 989127 ... A0JM7H ... 516810 ... 977023 ... 971043 ... 865742 ... A0MYFQ ... A1EWXW ... 591961 ... 980276 ... A0RNQ5 ... A0BMA4 ... 531713 ... A0F6EB ... A0MUHB ... 975694 ... A1J0ZD ... A0M11P ... A0MNX5 ... A0F5T6 ... A0MR7J ... 974839 ... 972001 ... A0M16T ... 592895 ... 977974 ... A0HGWD ... A0LHCL ... 691298 ... DBX0HY ... 986732 ... 974956 ... 973275 ... ETFL29 ... 857534 ... A0MVL0 ... A0CBA2 ... A0NGX0 ... A0M92M ... A0MSAG ... A0NFHK ... A0Q35X ... 513010 ... 921418 ... 531435 ... A0BL1D ... A0MKA9 ... 976169 ... 779374 ... 847519 ... A0HG5F ... 986868 ... 847347 ... 971929 ... A0DJ6U ... 847910 ... A0JMLN ... 701276 ... 580515 ... 986881 ... A0M2BY ... A0M93X ... 989427 ... A0LE9R ... 848390 ... 980457 ... DWS0UR ... 977187 ... 850667 ... 930920 ... 987906 ... A0MY8N ... 970047 ... A0M1NX ... 933368 ... DBX0F1 ... 848186 ... A0J3GM ... DBX0HC ... A0Q09X ... 988890 ... 589684 ... A0KE7P ... A0EAD3 ... DBX1F1 ... A1JJTG ... A0EQ91 ... A0KD2Q ... 971117 ... 973210 ... A0F6WG ... A0MLJK ... A0M46B ... A0HNPN ... 848066 ... A0LGQN ... DBX0G7 ... LYX0AB ... A0LGWU ... A0RDGC ... 848639 ... 589006 ... A0LEEE ... 552538 ... 977025 ... 531416 ... A0DJ49 ... A0REJL ... A0YE2R ... 251119 ... 693287 ... A0MJP7 ... 577345 ... 973228 ... 866953 ... A0MWAL ... 113596 ... 847426 ... 722538 ... DK0EBQ ... 603005 ... A1H6H7 ... 593396 ... 987972 ... 541779 ... 750437 ... 588798 ... A0Q60E ... A0NC6Z ... A0LGCU ... 532018 ... 257575 ... 629236 ... A1J0BH ... 515231 ... 851143 ... LYX0MG ... 801536 ... 888323 ... 976956 ... 853836 ... 723890 ... A0BL78 ... 971915 ... A0YCYF ... A0J3WX ... 847661 ... A0X970 ... 976375 ... A0J3W3 ... 989844 ... A0B5LC ... 620440 ... LYX0CB ... 795322 ... 848534 ... 677496 ... 727516 ... 973806 ... 971872 ... 859123 ... 970578 ... 675179 ... 976999 ... A0HF4G ... 871970 ... 978945 ... 691660 ... A0DPBF ... 930424 ... 978047 ... 847665 ... 971534 ... A0BMAJ ... A0NC87 ... A1JJP8 ... A0M2EB ... A0EQYQ ... 263233 ... ... ''' >>> [x for x in numbers.splitlines() if x and not wkn.is_valid(x)] [] python-stdnum-1.2/tests/test_meid.doctest0000644000000000000000000001330512517406462020662 0ustar rootroot00000000000000test_meid.doctest - more detailed doctests for stdnum.meid module Copyright (C) 2010, 2011, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.meid module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import meid IMEI numbers without the software version (but optionally with a check digit) should be valid numbers: >>> meid.validate('49-015420-323751') '49015420323751' >>> meid.validate('35-209900-176148-1') '35209900176148' >>> meid.validate('35-209900-176148-2') Traceback (most recent call last): ... InvalidChecksum: ... MEIDs can be represented as HEX strings (with and without check digit): >>> meid.validate('AF 01 23 45 0A BC DE') 'AF0123450ABCDE' >>> meid.validate('AF 01 23 45 0A BC DE C') 'AF0123450ABCDE' >>> meid.validate('AF 01 23 45 0A BC DE D') Traceback (most recent call last): ... InvalidChecksum: ... Also, MEIDs can be represented in decimal format (with and without check digit): >>> meid.validate('29360 87365 0070 3710') 'AF0123450ABCDE' >>> meid.validate('29360 87365 0070 3710 0') 'AF0123450ABCDE' >>> meid.validate('29360 87365 0070 3710 1') Traceback (most recent call last): ... InvalidChecksum: ... The validate() method should be fairly robust against invalid junk passed: >>> meid.validate('29360 ABCDE 0070 3710') Traceback (most recent call last): ... InvalidFormat: ... >>> meid.validate('GF 01 23 45 0A BC DE') Traceback (most recent call last): ... InvalidFormat: ... Decimal format MEIDs with manufacturer code exceeding 32-bits should fail. >>> meid.validate('99999 99999 0070 3710 4') Traceback (most recent call last): ... InvalidComponent: ... Decimal format MEIDs with serial number exceeding 24-bits should fail. >>> meid.validate('29360 87365 9999 9999 4') Traceback (most recent call last): ... InvalidComponent: ... The compact method should convert to HEX if needed and can optionally leave the check digit intact. >>> meid.compact('49-015420-323751') '49015420323751' >>> meid.compact('35-209900-176148-2') '35209900176148' >>> meid.compact('35-209900-176148-2', strip_check_digit=False) '352099001761482' >>> meid.compact('af 01 23 45 0a bc de') 'AF0123450ABCDE' >>> meid.compact('AF 01 23 45 0A BC DE C') 'AF0123450ABCDE' >>> meid.compact('AF 01 23 45 0A BC DE C', strip_check_digit=False) 'AF0123450ABCDEC' >>> meid.compact('29360 87365 0070 3710') 'AF0123450ABCDE' >>> meid.compact('29360 87365 0070 3710 0') 'AF0123450ABCDE' >>> meid.compact('29360 87365 0070 3710 0', strip_check_digit=False) 'AF0123450ABCDEC' The format() function can add the check digit if needed. It should leave alone existing check digits (even invalid ones). >>> meid.format('35-209900-176148-2') '35 20 99 00 17 61 48 2' >>> meid.format('35-209900-176148') '35 20 99 00 17 61 48' >>> meid.format('35-209900-176148', add_check_digit=True) '35 20 99 00 17 61 48 1' >>> meid.format('af0123450abcDE') 'AF 01 23 45 0A BC DE' >>> meid.format('af0123450abcDEC', add_check_digit=True) 'AF 01 23 45 0A BC DE C' The format() function can also convert to decimal, recalculating the check digit if needed (conversion will silently correct incorrect check digits): >>> meid.format('35-209900-176148', format='dec') '08913 28768 0153 2232' >>> meid.format('35-209900-176148', format='dec', add_check_digit=True) '08913 28768 0153 2232 3' >>> meid.format('35-209900-176148-9', format='dec') '08913 28768 0153 2232 3' >>> meid.format('af0123450abcDE', format='dec') '29360 87365 0070 3710' >>> meid.format('af0123450abcDE', format='dec', add_check_digit=True) '29360 87365 0070 3710 0' >>> meid.format('af0123450abcDEC', format='dec') '29360 87365 0070 3710 0' >>> meid.format('293608736500703710', format='dec') '29360 87365 0070 3710' >>> meid.format('293608736500703710', format='dec', add_check_digit=True) '29360 87365 0070 3710 0' >>> meid.format('2936087365007037106', format='dec') '29360 87365 0070 3710 6' The format() function can also convert to hex, recalculating the check digit if needed (conversion will silently correct incorrect check digits): >>> meid.format('35-209900-176148', format='hex') '35 20 99 00 17 61 48' >>> meid.format('35-209900-176148', format='hex', add_check_digit=True) '35 20 99 00 17 61 48 1' >>> meid.format('35-209900-176148-9', format='hex') '35 20 99 00 17 61 48 9' >>> meid.format('af0123450abcDE', format='hex') 'AF 01 23 45 0A BC DE' >>> meid.format('af0123450abcDE', format='hex', add_check_digit=True) 'AF 01 23 45 0A BC DE C' >>> meid.format('af0123450abcDEF', format='hex') 'AF 01 23 45 0A BC DE F' >>> meid.format('293608736500703710', format='hex') 'AF 01 23 45 0A BC DE' >>> meid.format('293608736500703710', format='hex', add_check_digit=True) 'AF 01 23 45 0A BC DE C' >>> meid.format('2936087365007037106', format='hex') 'AF 01 23 45 0A BC DE C' The conversion function should work regardless of the check digit and whether decimal or hex representation is used. >>> meid.to_pseudo_esn('AF 01 23 45 0A BC DE C') '8016B128' >>> meid.to_pseudo_esn('29360 87365 0070 3710') '8016B128' python-stdnum-1.2/tests/test_ismn.doctest0000644000000000000000000000446112421262264020707 0ustar rootroot00000000000000test_ismn.doctest - more detailed doctests for stdnum.ismn module Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.ismn module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import ismn These are normal variations that should just work. >>> ismn.validate('979-0-3217-6543-6') '9790321765436' >>> ismn.validate('979-0-3217-6544-3') '9790321765443' >>> ismn.validate('9790321765450') '9790321765450' >>> ismn.validate('M-3217-6546-7') 'M321765467' >>> ismn.validate('M321765474') 'M321765474' >>> ismn.validate('979-0-260000438') '9790260000438' Tests for mangling and incorect check digits. >>> ismn.validate('979-0-3217-6543-x') Traceback (most recent call last): ... InvalidFormat: ... >>> ismn.validate('M-3217-6546-8') Traceback (most recent call last): ... InvalidChecksum: ... >>> ismn.validate('979M321765450') Traceback (most recent call last): ... InvalidFormat: ... >>> ismn.validate('Z-3217-6546-8') Traceback (most recent call last): ... InvalidFormat: ... See if 10 to 13 digit conversion works. >>> ismn.to_ismn13('979-0-32176544-3') # ismn13 should stay ismn13 '979-0-32176544-3' >>> ismn.to_ismn13('M-32176546-7') '979-0-32176546-7' >>> ismn.to_ismn13('M 3217 65504') '979 0 3217 65504' Test the ismn_type() function >>> ismn.ismn_type('M-3217-6546-7') 'ISMN10' >>> ismn.ismn_type('BAD') >>> ismn.ismn_type('9790321765450') 'ISMN13' Regrouping tests. >>> ismn.format('M-3217-6546-7') '979-0-3217-6546-7' >>> ismn.format('9790321765450') '979-0-3217-6545-0' python-stdnum-1.2/tests/test_ec_ci.doctest0000644000000000000000000000362612517406407021012 0ustar rootroot00000000000000test_ec_ci.doctest - more detailed doctests for stdnum.ec.ci module Copyright (C) 2014 Jonathan Finlay Copyright (C) 2014 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.ec.ci. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.ec import ci >>> from stdnum.exceptions import * Normal values that should just work. >>> ci.validate('1714307103') '1714307103' >>> ci.validate('171430710-3') '1714307103' >>> ci.validate('0602910945') '0602910945' >>> ci.validate('0926687856') '0926687856' >>> ci.validate('0910005917') '0910005917' Some invalid numbers. >>> ci.validate('1714307104') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> ci.validate('171430710') # digit missing Traceback (most recent call last): ... InvalidLength: ... >>> ci.validate('123A567890') # contains a letter Traceback (most recent call last): ... InvalidFormat: ... >>> ci.validate('1784307108') # third digit wrong Traceback (most recent call last): ... InvalidComponent: ... >>> ci.validate('8814307107') # invalid province code Traceback (most recent call last): ... InvalidComponent: ... python-stdnum-1.2/tests/test_my_nric.doctest0000644000000000000000000000620612517406343021404 0ustar rootroot00000000000000test_my_nric.doctest - more detailed doctests for stdnum.my.nric module Copyright (C) 2013, 2014 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.my.nric. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.my import nric >>> from stdnum.exceptions import * Normal values that should just work. >>> nric.validate('770305-02-1234') '770305021234' >>> nric.validate('890131-06-1224') '890131061224' >>> nric.validate('810909785542') '810909785542' >>> nric.validate('880229875542') '880229875542' Get the birth date: >>> nric.get_birth_date('770305-02-1234') datetime.date(1977, 3, 5) >>> nric.get_birth_date('890131-06-1224') datetime.date(1989, 1, 31) >>> nric.get_birth_date('810909785542') datetime.date(1981, 9, 9) >>> nric.get_birth_date('880229875542') datetime.date(1988, 2, 29) Get the birth place: >>> str(nric.get_birth_place('770305-02-1234')['state']) 'Kedah' >>> str(nric.get_birth_place('890131-06-1224')['state']) 'Pahang' >>> str(nric.get_birth_place('810909785542')['country']).upper() 'SRI LANKA' >>> str(nric.get_birth_place('880229875542')['countries']).upper() 'BRITAIN, GREAT BRITAIN, IRELAND' Formatting: >>> nric.format('770305-02-1234') '770305-02-1234' >>> nric.format('890131-06-1224') '890131-06-1224' >>> nric.format('810909785542') '810909-78-5542' >>> nric.format('880229875542') '880229-87-5542' Invalid date: >>> nric.validate('771305-02-1234') Traceback (most recent call last): ... InvalidComponent: ... >>> nric.validate('890132-06-1224') Traceback (most recent call last): ... InvalidComponent: ... >>> nric.validate('870229875542') Traceback (most recent call last): ... InvalidComponent: ... Invalid birth place: >>> nric.validate('770305-00-1234') Traceback (most recent call last): ... InvalidComponent: ... >>> nric.validate('890131-17-1224') Traceback (most recent call last): ... InvalidComponent: ... >>> nric.validate('810909805542') Traceback (most recent call last): ... InvalidComponent: ... >>> nric.validate('880229195542') Traceback (most recent call last): ... InvalidComponent: ... Just invalid numbers: >>> nric.validate('770305-00') Traceback (most recent call last): ... InvalidLength: ... >>> nric.validate('890A31-17-1224') Traceback (most recent call last): ... InvalidFormat: ... >>> nric.get_birth_place('8109098') Traceback (most recent call last): ... InvalidComponent: ... python-stdnum-1.2/tests/test_no_mva.doctest0000644000000000000000000000263612601744732021227 0ustar rootroot00000000000000test_no_mva.doctest - more detailed doctests for stdnum.no.mva module Copyright (C) 2015 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.no.mva module. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.no import mva These have been found online and should all be valid numbers. >>> numbers = ''' ... ... 965 920 358 MVA ... 980 430 596 MVA ... 998 772 680 MVA ... NO 987 008 644 MVA ... NO 917 313 008 MVA ... NO 948007029 MVA ... NO 966 813 946 MVA ... NO 982 930 057 MVA ... NO 982 952 573 MVA ... NO 987 008 644 MVA ... NO 987 989 297 MVA ... ... ''' >>> [x for x in numbers.splitlines() if x and not mva.is_valid(x)] [] python-stdnum-1.2/tests/test_cn_ric.doctest0000644000000000000000000000435212517406343021201 0ustar rootroot00000000000000test_cn_ric.doctest - more detailed doctests for stdnum.cn.ric module Copyright (C) 2014 Jiangge Zhang 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 This file contains more detailed doctests for the stdnum.cn.ric. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.cn import ric >>> from stdnum.exceptions import * # noqa Normal values that should just work. >>> ric.validate('360426199101010071') '360426199101010071' >>> ric.validate('44011320141005001x') '44011320141005001X' >>> ric.format('44011320141005001x') '44011320141005001X' Get the birth date: >>> ric.get_birth_date('360426199101010071') datetime.date(1991, 1, 1) >>> ric.get_birth_date('44011320141005001x') datetime.date(2014, 10, 5) Get the birth place: >>> c = ric.get_birth_place('360426199101010071')['county'] >>> c == u'\u5fb7\u5b89\u53bf' True >>> c = ric.get_birth_place('44011320141005001x')['county'] >>> c == u'\u756a\u79ba\u533a' True Invalid format: >>> ric.validate('36042619910101007V') Traceback (most recent call last): ... InvalidFormat: ... >>> ric.validate('T60426199101010078') Traceback (most recent call last): ... InvalidFormat: ... Invalid date: >>> ric.validate('360426199113010079') Traceback (most recent call last): ... InvalidComponent: ... Invalid checksum: >>> ric.validate('36042619910102009X') Traceback (most recent call last): ... InvalidChecksum: ... Invalid location: >>> ric.validate('990426199112010074') # unknown birth place code Traceback (most recent call last): ... InvalidComponent: ... python-stdnum-1.2/tests/test_ean.doctest0000644000000000000000000000260012154625043020476 0ustar rootroot00000000000000test_ean.doctest - more detailed doctests for the stdnum.ean module Copyright (C) 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.ean module. It tries to test more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum import ean These numbers have broken checksums or are mangled: >>> ean.validate('7501031311309') '7501031311309' >>> ean.validate('75010313113') Traceback (most recent call last): ... InvalidLength: ... >>> ean.validate('750103AAAA309') Traceback (most recent call last): ... InvalidFormat: ... >>> ean.validate('7501031311308') Traceback (most recent call last): ... InvalidChecksum: ... python-stdnum-1.2/tests/test_gb_vat.doctest0000644000000000000000000000620612260400322021170 0ustar rootroot00000000000000test_gb_vat.doctest - more detailed doctests for stdnum.gb.vat module Copyright (C) 2012, 2013 Arthur de Jong 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 This file contains more detailed doctests for the stdnum.gb.vat. It tries to cover more corner cases and detailed functionality that is not really useful as module documentation. >>> from stdnum.gb import vat Normal values that should just work. >>> vat.validate('980780684') # standard number '980780684' >>> vat.validate('100190874') # standard number restarting '100190874' >>> vat.validate('242338087388') # branch trader '242338087388' >>> vat.validate('GD100') # government department 'GD100' >>> vat.validate('HA501') # health authority 'HA501' >>> vat.validate('GD888810003') # government department for EU 'GD888810003' >>> vat.validate('HA888856782') # health authority for EU 'HA888856782' Invalid long numbers: >>> vat.validate('802311781') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> vat.validate('9807806842') # too long for standard number Traceback (most recent call last): ... InvalidLength: ... >>> vat.validate('9807806B4') # invalid digit Traceback (most recent call last): ... InvalidFormat: ... >>> vat.validate('GD8888567B2') # invalid digit for EU health authority Traceback (most recent call last): ... InvalidFormat: ... >>> vat.validate('001234567') # invalid checksum Traceback (most recent call last): ... InvalidChecksum: ... Some variations on the short format: >>> vat.validate('ZZ100') # unknown code Traceback (most recent call last): ... InvalidComponent: ... >>> vat.validate('GD600') # government department with high number Traceback (most recent call last): ... InvalidComponent: ... >>> vat.validate('HA201') # health authority with low number Traceback (most recent call last): ... InvalidComponent: ... Some variations on the EU format: >>> vat.validate('GD888860018') # government department with high number Traceback (most recent call last): ... InvalidComponent: ... >>> vat.validate('HA888820107') # health authority with low number Traceback (most recent call last): ... InvalidComponent: ... >>> vat.validate('HA888856700') # health authority with invalid checksum Traceback (most recent call last): ... InvalidChecksum: ... Formatting tests: >>> vat.format('980780684') # standard number '980 7806 84' >>> vat.format('HA501') # health authority 'HA501' >>> vat.format('242338087388') # branch trader '242 3380 87 388' python-stdnum-1.2/getmybp.py0000755000000000000000000000571612517406343016205 0ustar rootroot00000000000000#!/usr/bin/env python # getmybp.py - script to donwnload data from Malaysian government site # # Copyright (C) 2013 Arthur de Jong # # 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 from collections import defaultdict import re import urllib import BeautifulSoup # URLs that are downloaded state_list_url = 'http://www.jpn.gov.my/informasi/kod-negeri/' country_list_url = 'http://www.jpn.gov.my/en/informasi/kod-negara/' spaces_re = re.compile('\s+', re.UNICODE) def clean(s): """Cleans up the string removing unneeded stuff from it.""" return spaces_re.sub(' ', s.replace(u'\u0096', '')).strip().encode('utf-8') def parse(f): """Parse the specified file.""" soup = BeautifulSoup.BeautifulSoup(f, convertEntities='html') # find all table rows for tr in soup.find('div', id='inner-main').findAll('tr'): # find the rows with four columns of text tds = [ clean(''.join(x.string for x in td.findAll(text=True))) for td in tr.findAll('td') ] if len(tds) >= 2 and tds[0] and tds[1]: yield tds[0], tds[1] if len(tds) >= 4 and tds[2] and tds[3]: yield tds[2], tds[3] if __name__ == '__main__': results = defaultdict(lambda : defaultdict(set)) # read the states #f = open('/tmp/states.html', 'r') f = urllib.urlopen(state_list_url) for state, bps in parse(f): for bp in bps.split(','): results[bp.strip()]['state'] = state results[bp.strip()]['countries'].add('Malaysia') # read the countries #f = open('/tmp/countries.html', 'r') f = urllib.urlopen(country_list_url) for country, bp in parse(f): results[bp]['countries'].add(country) # print the results print '# generated from National Registration Department of Malaysia, downloaded from' print '# %s' % state_list_url print '# %s' % country_list_url print for bp in sorted(results.iterkeys()): res = bp row = results[bp] if 'state' in row: res += ' state="%s"' % row['state'] countries = list(row['countries']) countries.sort() if len(countries) == 1: res += ' country="%s"' % countries[0] if len(countries) > 0: res += ' countries="%s"' % (', '.join(countries)) print res python-stdnum-1.2/NEWS0000644000000000000000000002312612606445151014652 0ustar rootroot00000000000000changes from 1.1 to 1.2 ----------------------- * add modules for the following number formats: - Austrian Company Register Numbers - CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazillian company identifier) - UID (Unternehmens-Identifikationsnummer, Swiss business identifier) - VAT, MWST, TVA, IVA, TPV (Mehrwertsteuernummer, the Swiss VAT number) - CUSIP number (financial security identification number) - Wertpapierkennnummer (German securities identification code) - Isikukood (Estonian Personcal ID number) - Finnish Association Identifier - Y-tunnus (Finnish business identifier) - SEDOL number (Stock Exchange Daily Official List number) - IMO number (International Maritime Organization number) - ISIN (International Securities Identification Number) - RFC (Registro Federal de Contribuyentes, Mexican tax number) - PESEL (Polish national identification number) - REGON (Rejestr Gospodarki Narodowej, Polish register of economic units) - ИНН (Идентификационный номер налогоплательщика, Russian tax identifier) * add an alternate VIES check (check_vies_approx()) that includes a proof (certificate) that the check was performed * fall back to pysimplesoap if suds is unavailable * test and code quality improvements changes from 1.0 to 1.1 ----------------------- * add number formats based on the implementation in the vatnumber module: - NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number) - CUIT (Código Único de Identificación Tributaria, Argentinian tax number) - RUT (Rol Único Tributario, Chilean national tax number) - NIT (Número De Identificación Tributaria, Colombian identity code) - COE (Codice operatore economico, San Marino national tax number) * add modules for the following number formats: - Cedula (Dominican Republic national identification number) - RNC (Registro Nacional del Contribuyente, Dominican Republic tax number) - Kennitala (Icelandic personal and organisation identity code, provided by Tuomas Toivonen) - VSK number (Virðisaukaskattsnúmer, Icelandic VAT number, provided by Tuomas Toivonen) - ISO 9362 (Business identifier codes, provided by Tony Bajan) - MVA (Merverdiavgift, Norwegian VAT number, provided by Tuomas Toivonen) - Orgnr (Organisasjonsnummer, Norwegian organisation number, provided by Tuomas Toivonen) - Orgnr (Organisationsnummer, Swedish company number, provided by Tomas Thor Jonsson) * add Croatia to list of EU VAT numbers * update getcnloc script * various small fixes and additional tests for existing modules changes from 0.9 to 1.0 ----------------------- * add modules for the following number formats: - Swiss social security number ("Sozialversicherungsnummer") - RIC No. (Chinese Resident Identity Card Number) - CI (Cédula de identidad, Ecuadorian personal identity code) - RUC (Registro Único de Contribuyentes, Ecuadorian company tax number) - SEPA Identifier of the Creditor (AT-02) - ISO 6346 (International standard for container identification) - Codice Fiscale (Italian tax code for individuals) - RTN (Routing transport number) * Add support for 2013 extension of Irish PPS Numbers * update getisbn script * update getmybp URLs for Malaysian code lists * various other minor improvements changes from 0.8.1 to 0.9 ------------------------- * add modules for the following number formats: - Brin number (Dutch number for schools) - Postcode (Dutch postal code) - ATIN (U.S. Adoption Taxpayer Identification Number) - EIN (U.S. Employer Identification Number) - ITIN (U.S. Individual Taxpayer Identification Number) - PTIN (U.S. Preparer Tax Identification Number) - TIN (U.S. Taxpayer Identification Number) * try to replace Unicode characters with similar-looking ASCII characters * update getimsi script (thanks eneq123) * update getiban script * add proxy support to the stdnum.eu.vat.check_vies() function (thanks Cédric Krier) * support newer United Kingdom VAT numbers changes from 0.8 to 0.8.1 ------------------------- * include some files that were missing from the source tarball changes from 0.7 to 0.8 ----------------------- * add modules for the following number formats: - NRIC No. (Malaysian National Registration Identity Card Number) * all modules now provide a validate() function that throws an exception that contains more information on the failure reason * documentation improvements * remove add_check_digit parameter from GRid's format() function * improvements to the tests * re-add Python3 support (now tested with Python 2.7, 3.2 and 3.3) changes from 0.6 to 0.7 ----------------------- * add modules for the following number formats: - Onderwijsnummer (Dutch school number) - BTW-nummer (Omzetbelastingnummer, the Dutch VAT number) - HETU (Finnish personal identity code) as provided by Jussi Judin (#5) - RČ (Rodné číslo, the Czech and Slovak birth numbers) - SIREN (a French company identification number) - FPA, ΦΠΑ (Foros Prostithemenis Aksias, the Greek VAT number) - Ust ID Nr. (Umsatzsteur Identifikationnummer, the German VAT number) - BTW, TVA, NWSt (Belgian VAT number) - DNI (Documento nacional de identidad, Spanish personal identity codes) - NIE (Número de Identificación de Extranjeros, Spanish foreigner number) - CIF (Certificado de Identificación Fiscal, Spanish company tax number) - NIF (Número de Identificación Fiscal, Spanish VAT number) - PVN (Pievienotās vērtības nodokļa, Latvian VAT number) - CVR (Momsregistreringsnummer, Danish VAT number) - TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number) - CNP (Cod Numeric Personal, Romanian Numerical Personal Code) - CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number) - Partita IVA (Italian VAT number) - Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number) - UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number) - NIF (Número de identificação fiscal, Portuguese VAT number) - IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number) - ALV nro (Arvonlisäveronumero, Finnish VAT number) - DIČ (Daňové identifikační číslo, Czech VAT number) - ANUM (Közösségi adószám, Hungarian VAT number) - VAT (Irish VAT number) - KMKR (Käibemaksukohuslase, Estonian VAT number) - PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number) - n° TVA (taxe sur la valeur ajoutée, French VAT number) - VAT (Maltese VAT number) - NIP (Numer Identyfikacji Podatkowej, Polish VAT number) - ID za DDV (Davčna številka, Slovenian VAT number) - VAT (Moms, Mervärdesskatt, Swedish VAT number) - VAT (United Kingdom (and Isle of Man) VAT registration number) - EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes) - PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner) - VAT (Идентификационен номер по ДДС, Bulgarian VAT number) - VAT (European Union VAT number) - OIB (Osobni identifikacijski broj, Croatian identification number) - PPS No (Personal Public Service Number, Irish personal number) - CPR (personnummer, the Danish citizen number) * additional tests for robustness and use introspection to test all modules * some code refactoring with the introduction of an internal utility module * improvements to the docstring documentation * generate API documentation using Sphinx changes from 0.5 to 0.6 ----------------------- * fix a problem with handling an ISBN13 with a valid check digit but with an unknown bookland prefix * add an IMSI (International Mobile Subscriber Identity) module * implement a conversion function from ISBN13 to ISBN10 * implement an ismn.ismn_type() function * implement an imei.split() function that splits the number into a TAC, serial number and checksum or software version * source code layout changes to better follow PEP8 changes from 0.4 to 0.5 ----------------------- * add modules for the following number formats: - EAN (International Article Number) * refactoring to use the EAN check digit code for ISBN and ISMN checks * implement a conversion function from ISSN to EAN * support Python3 with the same codebase * Python 2.5 compatibility improvement changes from 0.3 to 0.4 ----------------------- * add modules for the following number formats: - CPF (Cadastro de Pessoas Físicas, the Brazillian national identification number) - IBAN (International Bank Account Number) - ISIL (International Standard Identifier for Libraries and Related Organizations) - SSN (U.S. Social Security Number) * implement an internal module to store and handle hierarchically organised data structures efficiently * regional-specific numbers are now in ISO 3166 packages (the BSN module is now in stdnum.nl.bsn) * ISBN module functions now have a convert flag to convert to ISBN-13 on the fly changes from 0.2 to 0.3 ----------------------- * add modules for the following number formats: - ISMN (International Standard Music Number) - ISAN (International Standard Audiovisual Number) - IMEI (International Mobile Equipment Identity) - MEID (Mobile Equipment Identifier) - GRid (Global Release Identifier) * add modules for handling the following check digit algorithms: - the Verhoeff algorithm - the Luhn and Luhn mod N algorithms - some algorithms described in ISO/IEC 7064: Mod 11, 2, Mod 37, 2, Mod 97, 10, Mod 11, 10 and Mod 37, 36 * added more unit tests changes from 0.1 to 0.2 ----------------------- * rename validate() function to is_valid() for all modules * handle wrong types passed to is_valid() more gracefully * add more tests and fix some minor bugs python-stdnum-1.2/ChangeLog0000644000000000000000000022136512606445151015732 0ustar rootroot000000000000002015-10-11 Arthur de Jong * [1327045] getcnloc.py, stdnum/cn/loc.dat, stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat: Update database files This also updates the script to download updated Chinese location names. 2015-10-11 Arthur de Jong * [a891c60] stdnum/al/nipt.py, stdnum/co/nit.py, stdnum/iban.py, stdnum/ie/pps.py, stdnum/imei.py, stdnum/isan.py, stdnum/iso6346.py, stdnum/it/codicefiscale.py, stdnum/meid.py, stdnum/nl/postcode.py, stdnum/numdb.py, stdnum/pt/nif.py, stdnum/us/atin.py, stdnum/us/ein.py, stdnum/us/itin.py, stdnum/us/ptin.py, stdnum/us/ssn.py, stdnum/util.py: Code style improvements Ensure that regular expressions are r'' strings, avoid too long lines and fix line wrapping. Also avoid catching toplevel Exception when possible and use binascii for hex to binary conversion which is available in both Python 2 and 3. 2015-10-11 Arthur de Jong * [3c7a302] stdnum/cusip.py, stdnum/de/wkn.py, stdnum/gb/sedol.py, stdnum/isin.py: Convert security ids to ISIN Allow conversion from national securities identifiers to the international ISIN. 2015-10-11 Arthur de Jong * [c565517] stdnum/de/wkn.py, tests/test_de_wkn.doctest: Add German Wertpapierkennnummer The format itself is pretty simple (no check digit) but this module is more for completeness sake. 2015-10-10 Arthur de Jong * [961815f] stdnum/gb/sedol.py, tests/test_gb_sedol.doctest: Add SEDOL number 2015-10-10 Arthur de Jong * [fb91775] stdnum/ru/__init__.py: Add information to Russian package 2015-10-10 Arthur de Jong * [ebb5c07] MANIFEST.in, numdb-test.dat, stdnum/numdb.py, tests/numdb-test.dat: Move numdb test file This places the test database file in the tests directory. 2015-10-10 Arthur de Jong * [fa8099e] stdnum/imo.py: Add int. maritime org. number (IMO) This adds checks for the International Maritime Organization number used to identify ships. However, there seem to be a lot of ships with an IMO number that does not follow these rules (different check digits or even length). 2015-10-10 Arthur de Jong * [111b4fd] stdnum/isan.py, tests/test_isan.doctest: Fix handling of strip_check_digits in ISAN This fixes the compact() function to honor the strip_check_digits argument and does not validate the check digits if they are passed to validate together with strip_check_digits. 2015-10-10 Arthur de Jong * [9f9d13c] stdnum/isin.py, tests/test_isin.doctest: Add international securities id (ISIN) This adds support for handling ISINs (International Securities Identification Number). The can contain a CUSIP but performing this additional validation is currently not performed. 2015-10-09 Arthur de Jong * [522611c] stdnum/cusip.py, tests/test_cusip.doctest: Add CUSIP number 2015-10-08 Arthur de Jong * [320ecea] stdnum/ch/uid.py, stdnum/ch/vat.py, tests/test_ch_uid.doctest, tests/test_ch_vat.doctest: Add Swiss UID and VAT numbers The Swiss VAT number (MWST, TVA, IVA, TPV) is the UID (Unternehmens-Identifikationsnummer) followed by one of the VAT abbreviations. 2015-10-05 Arthur de Jong * [ec9bcb0] stdnum/mx/__init__.py, stdnum/mx/rfc.py, tests/test_mx_rfc.doctest: Add Mexican RFC number This adds support for the Mexican tax number RFC (Registro Federal de Contribuyentes). This module includes a number of checks on the number but the validation of the last check digit is disabled by default because a large number of numbers were found that were otherwise valid but had an invalid check digit. 2015-10-04 Arthur de Jong * [fd0cfd9] stdnum/eu/vat.py, stdnum/util.py: Move finding VAT module to util This moves the finding of a VAT module to the util module so that it can be more easily re-used for non-EU countries. 2015-10-04 Arthur de Jong * [38ed9c0] stdnum/co/nit.py, tests/test_co_nit.doctest: Update Colombian NIT checks This adds a number of tests for numbers found online. The length check has also been revisited because both shorter numbers and longer number have been found. This also updates the format() function to handle arbitrary length numbers. 2015-10-02 Arthur de Jong * [d413f95] stdnum/isbn.py: Fix comment 2015-10-02 Arthur de Jong * [3d1dbbb] stdnum/ar/cuit.py, stdnum/bg/egn.py, stdnum/bg/pnf.py, stdnum/bg/vat.py, stdnum/co/nit.py, stdnum/dk/cpr.py, stdnum/dk/cvr.py, stdnum/do/rnc.py, stdnum/ec/ruc.py, stdnum/ee/kmkr.py, stdnum/fi/alv.py, stdnum/gb/vat.py, stdnum/hu/anum.py, stdnum/is_/kennitala.py, stdnum/lv/pvn.py, stdnum/mt/vat.py, stdnum/no/orgnr.py, stdnum/pl/nip.py, stdnum/pl/pesel.py, stdnum/pl/regon.py, stdnum/ro/cf.py, stdnum/ro/cnp.py: Use zip() instead of enumerate() Makes the code slightly simpler and more compact. 2015-10-01 Sergio Isidoro * [222a87e] stdnum/fi/__init__.py: Add alias to hetu in for finnish personal id code 2015-09-27 Arthur de Jong * [e045c71] tests/test_eu_vat.doctest: Add more numbers found online 2015-09-07 Dariusz Choruzy * [36217ac] stdnum/pl/regon.py, tests/test_pl_regon.doctest: Add Polish REGON number 2015-09-06 Dariusz Choruzy * [a0cb61f] stdnum/pl/pesel.py: Add Polish PESEL number 2015-08-16 Arthur de Jong * [5ab8d24] stdnum/ru/__init__.py, stdnum/ru/inn.py, tests/test_ru_inn.doctest: Add Russioan ИНН (INN) tax ID This adds a basic implementation of the Russian Идентификационный номер налогоплательщика (tax identification number). This currently only checks the format, length and check digits but not whether each of the parts of the number are valid (e.g. valid region specified). 2015-08-16 Arthur de Jong * [714fa60] stdnum/br/cnpj.py, tests/test_br_cnpj.doctest: Add Brazillian CNPJ business identifier Add module for Cadastro Nacional da Pessoa Jurídica, the Brazillian company identifier. 2015-08-16 Arthur de Jong * [b939099] getiban.py, stdnum/iban.dat, tests/test_iban.doctest: Update IBAN tests This updates the iban.dat file from the IBAN registry, includes a fix for handling spaces in the BBAN and adds some more IBAN examples from the IBAN registry. 2015-08-16 Arthur de Jong * [7714db7] stdnum/iso9362.py: Make uppercase in compact() This changes the compact() function of the ISO 9362 module to make all the letters uppercase. 2015-08-16 Arthur de Jong * [6afa875] setup.cfg, stdnum/imei.py, stdnum/isbn.py, stdnum/isil.py, stdnum/ismn.py, stdnum/meid.py, stdnum/us/atin.py, stdnum/us/ein.py, stdnum/us/itin.py: Turn on and improve branch coverage 2015-08-16 Arthur de Jong * [e88ba0b] stdnum/dk/cpr.py, stdnum/is_/kennitala.py, stdnum/it/codicefiscale.py: Small typo and code style fixes 2015-08-03 Tomas Karasek * [243e50f] stdnum/ee/ik.py, tests/test_ee_ik.doctest: Add validation of Estonian personal ID 2015-06-12 Lari Haataja * [7f9c94f] stdnum/at/businessid.py: Add company register number validation for Austria 2015-07-12 Arthur de Jong * [0cbba6e] : Merge Finnish numbers provided by Holvi This merges the Finnish numbers provided by Holvi Payment Services Oy as found here: https://github.com/holvi/python-stdnum 2015-07-12 Arthur de Jong * [320326e] stdnum/fi/ytunnus.py: Split out format() function This uses the stdnum.fi.alv module more extensively and ensures that validate() returns a compact representation and a separate format() function is available. 2015-06-23 Lari Haataja * [37f7fa6] stdnum/fi/__init__.py, stdnum/fi/ytunnus.py: Add validation for Finnish y-tunnus (business identifier) 2015-07-12 Arthur de Jong * [db24746] stdnum/fi/associationid.py: Add a whitelist for short numbers and fix API This implements separate functions compact() and format() and fixes the doctests. This also implements a whitelist of registered short numbers to avoid accidentally validating just any number. 2015-06-16 Lari Haataja * [8d30992] stdnum/fi/associationid.py: Validation for Finnish association identifier 2015-07-12 Arthur de Jong * [e107457] : Merge changes to use CN Open Data 2015-07-12 Arthur de Jong * [a1a134e] stdnum/eu/vat.py: Fall back to pysimplesoap if suds is unavailable Initial testing seems to suggest that proxy-support is not complete with pysimplesoap (at least httplib2 and PySocks seem to be required). 2015-04-28 Lionel Elie Mamane * [8fe44f9] stdnum/eu/vat.py: Implement alternate VIES check Add a function to stdnum.eu.vat so that when one does a VIES VAT number check, one gets a proof (certificate) that one did the check, as defence against the VAT administration later putting this in doubt. This certificate is provided by the VIES service, if one provides one's own VAT number. 2015-06-08 Jiangge Zhang * [6308261] stdnum/cn/loc.dat: Download and generate latest Chinese location data. 2015-06-08 Jiangge Zhang * [12ba352] getcnloc.py: Download GB2260 data from github.com/cn. 2015-04-27 Arthur de Jong * [8925ae2] tests/test_iso6346.doctest: Fix copyright header 2015-04-27 Arthur de Jong * [58775d9] ChangeLog, NEWS, README, docs/index.rst, docs/stdnum.al.nipt.rst, docs/stdnum.ar.cuit.rst, docs/stdnum.cl.rut.rst, docs/stdnum.co.nit.rst, docs/stdnum.do.cedula.rst, docs/stdnum.do.rnc.rst, docs/stdnum.is_.kennitala.rst, docs/stdnum.is_.vsk.rst, docs/stdnum.iso9362.rst, docs/stdnum.no.mva.rst, docs/stdnum.no.orgnr.rst, docs/stdnum.se.orgnr.rst, docs/stdnum.sm.coe.rst, setup.py, stdnum/__init__.py: Get files ready for 1.1 release 2015-04-27 Arthur de Jong * [583b066] getcnloc.py, stdnum/cn/loc.dat, stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat: Update database files This also updates the script to download updated Chinese location names. 2014-10-24 Tomas Thor Jonsson * [dd309e4] stdnum/se/orgnr.py, stdnum/se/vat.py: Add support for SE orgnr This also delegates some of the validation for the Swedish VAT module to the orgnr module. 2015-04-27 Arthur de Jong * [23882e2] tests/test_ec_ruc.doctest: Add extra tests for the stdnum.ec.ruc module These numbers were found in various online sources. 2015-04-25 Arthur de Jong * [eac4d63] stdnum/fr/tva.py: Add extra test for French TVA 2014-10-14 P. Christeas * [9934f76] stdnum/gr/vat.py: Change description of Greek FPA number In Greece, our VAT number is used as a generic "tax registration" num. Update the docstring to reflect that name. 2015-04-22 Arthur de Jong * [4d7163c] stdnum/ar/__init__.py, stdnum/ar/cuit.py, tests/test_ar_cuit.doctest: Add Argentinian CUIT (VAT) number Based partially on the implementation in the vatnumber module. 2015-04-18 Arthur de Jong * [ba894d7] stdnum/sm/__init__.py, stdnum/sm/coe.py: Add San Marino COE (VAT) number Based partially on the implementation in the vatnumber module. 2015-04-18 Arthur de Jong * [144e1a4] stdnum/co/__init__.py, stdnum/co/nit.py: Add Colombian NIT/RUT (VAT) code Based on the implementation in the vatnumber module. 2015-04-18 Arthur de Jong * [c69c8f0] stdnum/cl/__init__.py, stdnum/cl/rut.py, tests/test_cl_rut.doctest: Add Chilean national tax number (RUT) Based on the implementation in the vatnumber module. 2015-04-18 Arthur de Jong * [3db826c] stdnum/al/__init__.py, stdnum/al/nipt.py, tests/test_al_nipt.doctest: Add Albanian NIPT (VAT) number Partially based on the implementation in the vatnumber module. Some valid numbers appear to start with an L so those are allowed as well. 2015-04-23 Arthur de Jong * [88d1af3] stdnum/do/cedula.py: Extend the list of valid Cedula This is based on the list of Cedula found at http://prd.org.do/2013/07/30/lista-del-cen-del-prd-actualizada-y-registrada-en-la-junta-central-electoral/ (link provided by José Arturo García) 2015-04-17 Arthur de Jong * [49d1e69] stdnum/do/cedula.py, tests/test_do_cedula.doctest: Add Dominican Republic Cedula number The Cedule is a Dominican Republic national identification number for persons. The number uses the Luhn checksum but apparently there are a lof of valid numbers in use that do not match the checksum. For this a whitelist is used. 2015-04-17 Arthur de Jong * [d003ac3] stdnum/do/__init__.py, stdnum/do/rnc.py, tests/test_do_rnc.doctest: Add Dominican Republic RNC number The RNC (Registro Nacional del Contribuyente) is the Dominican Republic taxpayer registration number for companies. 2015-04-19 Arthur de Jong * [9e94ab8] tests/test_no_mva.doctest: Add more stdnum.no.mva tests 2015-04-18 Arthur de Jong * [c334bcf] stdnum/is_/kennitala.py, tests/test_is_kennitala.doctest: Add more tests for Kennitala 2015-04-11 Tuomas Toivonen * [84620f8] stdnum/is_/__init__.py, stdnum/is_/kennitala.py, stdnum/is_/vsk.py: Support Icelandic personal, organisation and VAT identifiers The package is named "is_" because "is" is a reserved word. 2015-04-11 Tuomas Toivonen * [699b340] stdnum/no/__init__.py, stdnum/no/mva.py, stdnum/no/orgnr.py: Add support for Norwegian organisation and VAT numbers This commit also includes changes from Tomas Thor Jonsson . 2015-02-09 Tony Bajan * [75bcef0] stdnum/iso9362.py: Add ISO 9362 (BIC) support 2015-04-17 Arthur de Jong * [2574f89] stdnum/imsi.py: Raise InvalidComponent for unregistered IMSI 2014-12-23 Emiliano Castro * [9883c72] stdnum/eu/vat.py, stdnum/hr/__init__.py: Adding HR (Croatia) to the list of available countries 2014-11-01 Arthur de Jong * [3a7c9f7] stdnum/bg/vat.py, stdnum/eu/at_02.py, stdnum/iban.py, stdnum/isan.py, stdnum/meid.py, stdnum/numdb.py: Fix common spelling mistake 2014-10-31 Matt McDonald * [6e332b1] stdnum/meid.py, tests/test_meid.doctest: Fix for invalidating MEIDs with invalid decimal bit length See: http://arthurdejong.org/trac/python-stdnum/ticket/10 2014-10-20 Arthur de Jong * [3fa795d] getnumlist.py: Restore section for on homepage 2014-10-19 Arthur de Jong * [147eeb1] ChangeLog, NEWS, README, docs/index.rst, docs/stdnum.ch.ssn.rst, docs/stdnum.cn.ric.rst, docs/stdnum.ec.ci.rst, docs/stdnum.ec.ruc.rst, docs/stdnum.eu.at_02.rst, docs/stdnum.iso6346.rst, docs/stdnum.it.codicefiscale.rst, docs/stdnum.us.rtn.rst, getnumlist.py, setup.py, stdnum/__init__.py: Get files ready for 1.0 release 2014-10-19 Arthur de Jong * [72c0ff1] stdnum/iso6346.py: Remove unused import 2014-10-19 Arthur de Jong * [e713cc7] stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat: Update database files 2014-10-13 Denis Krienbühl * [256aa49] stdnum/ch/__init__.py, stdnum/ch/ssn.py: Adds the Swiss social security number Also known as "Sozialversicherungsnummer" / "Neue AHV Nummer". 2014-10-18 Arthur de Jong * [2cc50e2] stdnum/eu/at_02.py, stdnum/iban.py, stdnum/imei.py, stdnum/iso7064/mod_11_10.py, stdnum/iso7064/mod_11_2.py, stdnum/iso7064/mod_37_2.py, stdnum/iso7064/mod_37_36.py, stdnum/iso7064/mod_97_10.py, stdnum/luhn.py, stdnum/util.py, stdnum/verhoeff.py: Only catch Exception 2014-10-17 Arthur de Jong * [e2948bb] : Add Ecuadorian CI and RUC numbers Add modules for Ecuadorian Identification Card (CI - Cédula de identidad) and Fiscal Numbers (RUC - Registro Único de Contribuyentes) See: https://github.com/arthurdejong/python-stdnum/pull/12 2014-10-17 Arthur de Jong * [e5250be] stdnum/ec/ci.py, stdnum/ec/ruc.py, tests/test_ec_ci.doctest, tests/test_ec_ruc.doctest: Validate parts of numbers This raises exceptions when the provice or establishment number part of the number contains invalid values. 2014-10-17 Arthur de Jong * [10a044f] stdnum/ec/ci.py, stdnum/ec/ruc.py: Refactor checksum functions Use the CI checks from within the RUC module for natural RUC numbers (thereby eliminating a bug in the RUC checksum calculation) and simplify the checksum functions. 2014-10-17 Arthur de Jong * [f61b855] stdnum/ec/ci.py, stdnum/ec/ruc.py, tests/test_ec_ci.doctest, tests/test_ec_ruc.doctest: Use dedicated doctests This moves a number of the existing test cases to dedicated doctest files and extend the tests with more numbers and corner cases. This also fixes a few docstrings. 2014-10-12 Jonathan Finlay * [e8f1ca6] stdnum/ec/__init__.py, stdnum/ec/ci.py, stdnum/ec/ruc.py: Add Ecuadorian CI and RUC numbers Add modules for Ecuadorian Identification Card (CI - Cédula de identidad) and Fiscal Numbers (RUC - Registro Único de Contribuyentes) 2014-10-06 Arthur de Jong * [2700b7a] : Add Chinese Resident Identity Card Number 2014-10-06 Jiangge Zhang * [141d576] stdnum/cn/ric.py, tests/test_cn_ric.doctest: Support the Resident Identity Card Number of People's Republic China 2014-10-05 Jiangge Zhang * [10ae548] getcnloc.py, stdnum/cn/loc.dat: Download locations from the China (PRC) government site 2014-10-05 Jiangge Zhang * [e9eb546] stdnum/cn/__init__.py: Add stdnum.cn package for Chinese (PRC) numbers 2014-10-05 Arthur de Jong * [97ac94d] stdnum/my/nric.py, tests/test_my_nric.doctest: Update NRIC tests 2014-10-05 Arthur de Jong * [123e9cb] getmybp.py, stdnum/my/bp.dat: Update URLs for Malaysian code lists This updates the URLs for the state and country codes as published by the National Registration Department of Malaysia and changes the parsing to the new page layout. This also updates the data file. https://github.com/arthurdejong/python-stdnum/issues/14 2014-09-01 Tony Bajan * [86f60a2] stdnum/us/rtn.py: Add US bank routing transit numbers 2014-07-05 Arthur de Jong * [fbb0316] getisbn.py: Use ElementTree for simpler XML parsing 2014-07-05 Arthur de Jong * [03e4f97] getisbn.py, stdnum/isbn.dat: Fix getisbn script and update ISBN data file 2014-04-11 Arthur de Jong * [26517fe] getnumlist.py, stdnum/__init__.py: Improve package docstring formatting and show example 2014-03-18 Sharoon Thomas * [85dd6f2] stdnum/iso6346.py, tests/test_iso6346.doctest: Add support for ISO6346 Add validation and creation of check digit for ISO6346 codes. See: https://github.com/arthurdejong/python-stdnum/pull/9 2014-03-05 Jussi Räsänen * [2405c89] stdnum/eu/vat.py: Added a simple backwards compability check 2014-02-17 Arthur de Jong * [a4012f5] stdnum/ie/pps.py, stdnum/ie/vat.py, tests/test_eu_vat.doctest: Add support for 2013 extension of Irish PPS Numbers References: - https://www.welfare.ie/en/Pages/PPSN.aspx - http://www.citizensinformation.ie/en/social_welfare/irish_social_welfare_system/personal_public_service_number.html 2014-02-06 Arthur de Jong * [71d9837] stdnum/at_02.py, stdnum/eu/at_02.py: Rename AT-02 module to stdnum.eu.at_02 2014-02-05 Sergi Almacellas Abellana * [099078e] stdnum/at_02.py: Add SEPA Creditor identifier (AT-02) 2014-02-02 Arthur de Jong * [1ac00a0] stdnum/it/codicefiscale.py, tests/test_it_codicefiscale.doctest: Add an Italian Codice Fiscale module This module validates 16 digit Italian tax codes for individuals. https://en.wikipedia.org/wiki/Italian_fiscal_code_card It is based on the pycodicefiscale module that can be found here: https://github.com/baxeico/pycodicefiscale Functions have been renamed to follow the stdnum naming scheme: isvalid() -> is_valid(), control_code -> calc_check_digit(), get_birthday() -> get_birth_date(), get_sex() -> get_gender(). The build() function for generating tax codes (based on name, birth place and date) has been left out because this number cannot be uniquely constructed with this information alone (numbers are issued by the Italian tax office with a mechanism handle duplicates). Addresses trac ticket #9. 2014-01-01 Arthur de Jong * [c3d669c] setup.py: Remove requirement on distribute This accidentally slipped into 907e410. 2013-12-31 Arthur de Jong * [d933aab] .gitignore, ChangeLog, NEWS, README, docs/index.rst, docs/stdnum.my.nric.rst, docs/stdnum.nl.brin.rst, docs/stdnum.nl.postcode.rst, docs/stdnum.us.atin.rst, docs/stdnum.us.ein.rst, docs/stdnum.us.itin.rst, docs/stdnum.us.ptin.rst, docs/stdnum.us.tin.rst, getiban.py, getimsi.py, stdnum/__init__.py: Get files ready for 0.9 release 2013-12-31 Arthur de Jong * [5c1765e] stdnum/iban.dat, stdnum/isbn.dat: Update database files 2013-12-31 Arthur de Jong * [4217c35] stdnum/isan.py, stdnum/meid.py, stdnum/util.py: Add pragma: no cover for Python 3 Some statements are not covered in Python 3 tests. 2013-12-31 Arthur de Jong * [6c49ca8] getiban.py: Update getiban script This switches to use the csv module to support multi-line column values. This also handles some problems in the BBAN structure column that would contain an IBAN structure. 2013-12-31 Arthur de Jong * [0ee74e5] ChangeLog: Generate Changelog with different formatter git log --date=short --name-only \ --format="%x0c%ad %aN <%aE>%n%n%x09* [%h]%x00%s%n%x00%+b%x00" | \ awk 'BEGIN { RS="\f"; FS="\0" } { if ($1) { gsub(/\n*$/, "", $4); gsub(/^\n*/, "", $4); gsub(/\n/, ", ", $4); gsub(/\ngit-svn-id.*/, "", $3); gsub(/\n/, "\n\t ", $3); print $1 " " $4 ": "; print "\t " $2 $3 }}' | \ fmt --width=78 -c > ChangeLog 2013-12-30 Cédric Krier * [a148835] stdnum/gb/vat.py, tests/test_gb_vat.doctest: Add some new VAT numbers for GB Add support for restarting from November 2009 using 9755. Add support for EU format of health authorities See: https://github.com/arthurdejong/python-stdnum/pull/4 2013-12-12 eneq123 * [4609a22] getimsi.py, stdnum/imsi.dat: Update parsing in getimsi script This updates the regexes and includes seom optimizations. See: https://github.com/arthurdejong/python-stdnum/issues/1 2013-12-30 Cédric Krier * [9ec3cb0] stdnum/eu/vat.py: Add support for proxy 2013-12-04 Arthur de Jong * [7f30979] getimsi.py, stdnum/imsi.dat: Update getimsi script This updates the script due to the Wikipedia article change and removes the code for getting the data from ITU for now. See: https://github.com/arthurdejong/python-stdnum/issues/1 2013-11-09 Arthur de Jong * [b0c47d5] stdnum/nl/__init__.py, stdnum/nl/postcode.py: Add a Dutch postal code module The Dutch postal code (postcode) consists of four digits followed by two characters and together with the house number should uniquely identify any address. Addresses trac ticket #7. 2013-11-09 Arthur de Jong * [73d05b0] stdnum/nl/brin.py: Add a Dutch Brin number module The Brin (Basis Registratie Instellingen) is a number to identify schools and related institutions. Addresses trac ticket #6. 2013-11-09 Arthur de Jong * [73330a1] stdnum/nl/onderwijsnummer.py: Clarify onderwijsnummer description 2013-11-09 Arthur de Jong * [188d3ea] : Add various United States Tax number modules This adds modules for the Individual Taxpayer Identification Number (ITIN), the Employer Identification Number (EIN), Adoption Taxpayer Identification Number (ATIN) and Preparer Tax Identification Number (PTIN) that together with the Social Security Number (SSN) are valid Taxpayer Identification Numbers (TIN) 2013-10-12 Arthur de Jong * [9530635] stdnum/us/tin.py: Add a United States TIN module The Taxpayer Identification Number is used used for tax purposes in the United States. This module uses the SSN, ITIN, EIN, PTIN and ATIN modules to determine validitiy of the TIN. 2013-10-11 Arthur de Jong * [316e3f2] stdnum/us/ptin.py: Add a United States PTIN module A Preparer Tax Identification Number (PTIN) is United States identification number for tax return preparers. It is an eight-digit number prefixed with a capital P. 2013-10-11 Arthur de Jong * [47ea6ea] stdnum/us/atin.py: Add a United States ATIN module An Adoption Taxpayer Identification Number (ATIN) is a temporary nine-digit number issued by the United States IRS for a child for whom the adopting parents cannot obtain a Social Security Number. 2013-10-11 Arthur de Jong * [b1c9ba5] stdnum/us/ein.dat, stdnum/us/ein.py: Add a United States EIN module The Employer Identification Number (EIN), also known as Federal Employer Identification Number (FEIN), is used to identify a business entity in the United States. It is issued to anyone that has to pay withholding taxes on employees. 2013-10-11 Arthur de Jong * [19039f7] stdnum/us/itin.py: Add a United States ITIN module The ITIN (Individual Taxpayer Identification Number) is issued by the United States IRS to individuals who are required to have a taxpayer identification number but who are not eligible to obtain a Social Security Number. 2013-10-11 Arthur de Jong * [70b974b] stdnum/meid.py: Remove unused import 2013-11-08 Arthur de Jong * [f122c88] stdnum/util.py: Try to replace Unicode characters with ASCII This changes the stdnum.util.clean() method that is used by all modules to replace alternative Unicode dashes, dots, etc. by their ASCII equivalent so the numbers will be automatically converted and validated. Inspiration for this change came from https://github.com/JNRowe/pyisbn/pull/6 2013-06-14 Arthur de Jong * [c042f02] ChangeLog, NEWS, stdnum/__init__.py: Get files ready for 0.8.1 release 2013-06-14 Arthur de Jong * [31e5e81] MANIFEST.in, setup.py: Ensure that all used files are included in the sdist 2013-06-09 Arthur de Jong * [7fa9822] ChangeLog, NEWS, README, docs/index.rst, getnumlist.py, setup.py, stdnum/__init__.py: Get files ready for 0.8 release 2013-06-09 Arthur de Jong * [9597010] stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat: Update database files We manually tweak the Finland IBAN entry. We should probably change the parsing so that it uses the IBAN structure instead of the BBAN structure. 2013-06-09 Arthur de Jong * [19cbb3c] stdnum/my/nric.py: Fix NRIC module description 2013-06-08 Arthur de Jong * [46a7996] getmybp.py, stdnum/my/__init__.py, stdnum/my/bp.dat, stdnum/my/nric.py, tests/test_my_nric.doctest: Add a Malaysian NRIC No. module NRIC No. (National Registration Identity Card Number) is the unique identifier for issued to Malaysian citizens and permanent residents. 2013-06-08 Arthur de Jong * [999f2c3] : Provide a validate() function in all modules This provides an additional means of doing number validation that allows applications calling this library to get more information about why the validation failed and present more informative messages to the user. This introduces a collection of exceptions which will be raised by the validate() function in each module. All modules have been updated to provide this new function. 2013-05-22 Arthur de Jong * [cb69921] README, docs/index.rst, docs/stdnum.exceptions.rst: Document the validate() function and exceptions 2013-05-18 Arthur de Jong * [e00744c] stdnum/util.py: Use validate() in stdnum.util 2013-05-17 Arthur de Jong * [3d3a97d] stdnum/us/ssn.py: Implement validate() for U.S. Social Security Number 2013-05-17 Arthur de Jong * [4bfce3f] stdnum/eu/vat.py, tests/test_eu_vat.doctest: Implement validate() for European VAT numbers 2013-05-17 Arthur de Jong * [1aaf902] stdnum/sk/dph.py, stdnum/sk/rc.py: Implement validate() for Slovak numbers 2013-05-17 Arthur de Jong * [8982d1e] stdnum/si/ddv.py: Implement validate() for Slovenian VAT numbers 2013-05-17 Arthur de Jong * [522a599] stdnum/se/vat.py: Implement validate() for Swedish VAT numbers 2013-05-17 Arthur de Jong * [8e7d807] stdnum/pt/nif.py: Implement validate() for Portuguese VAT numbers 2013-05-17 Arthur de Jong * [7e865db] stdnum/pl/nip.py: Implement validate() for Polish numbers 2013-05-17 Arthur de Jong * [96c5080] stdnum/mt/vat.py: Implement validate() for Maltese numbers 2013-05-17 Arthur de Jong * [2ff4950] stdnum/lv/pvn.py: Implement validate() for Latvian numbers 2013-05-17 Arthur de Jong * [9845b0a] stdnum/lu/tva.py: Implement validate() for Luxembourgian numbers 2013-05-17 Arthur de Jong * [04cfb84] stdnum/lt/pvm.py: Implement validate() for Lithuanian numbers 2013-05-17 Arthur de Jong * [b1d5a72] stdnum/it/iva.py: Implement validate() for Italian numbers 2013-05-17 Arthur de Jong * [083993b] stdnum/ie/pps.py, stdnum/ie/vat.py: Implement validate() for Irish numbers 2013-05-17 Arthur de Jong * [301ba25] stdnum/hu/anum.py: Implement validate() for Hungarian numbers 2013-05-17 Arthur de Jong * [31f2684] stdnum/hr/oib.py: Implement validate() for Croatian numbers 2013-05-17 Arthur de Jong * [1932f69] stdnum/gr/vat.py: Implement validate() for Greek numbers 2013-05-17 Arthur de Jong * [10710dc] stdnum/gb/vat.py, tests/test_gb_vat.doctest: Implement validate() for United Kingdom numbers 2013-05-17 Arthur de Jong * [4753c09] stdnum/fi/alv.py, stdnum/fi/hetu.py, tests/test_fi_hetu.doctest: Implement validate() for Finnish numbers 2013-05-17 Arthur de Jong * [2259cbb] stdnum/es/cif.py, stdnum/es/dni.py, stdnum/es/nie.py, stdnum/es/nif.py: Implement validate() for Spanish numbers 2013-05-17 Arthur de Jong * [07c66e1] stdnum/ee/kmkr.py: Implement validate() for Estonian numbers 2013-05-17 Arthur de Jong * [8caecc5] stdnum/dk/cpr.py, stdnum/dk/cvr.py: Implement validate() for Danish numbers 2013-05-17 Arthur de Jong * [360480b] stdnum/de/vat.py: Implement validate() for German numbers 2013-05-17 Arthur de Jong * [fce6196] stdnum/cy/vat.py: Implement validate() for Cypriot numbers 2013-05-17 Arthur de Jong * [14e382f] stdnum/cz/dic.py, stdnum/cz/rc.py: Implement validate() for Czech numbers 2013-05-17 Arthur de Jong * [54ce2d7] stdnum/br/cpf.py: Implement validate() for Brazillian numbers 2013-05-17 Arthur de Jong * [6080907] stdnum/bg/egn.py, stdnum/bg/pnf.py, stdnum/bg/vat.py, tests/test_bg_vat.doctest: Implement validate() for Bulgarian numbers 2013-05-17 Arthur de Jong * [33ce4e9] stdnum/be/vat.py: Implement validate() for Belgian numbers 2013-05-17 Arthur de Jong * [66d6259] stdnum/at/uid.py: Implement validate() for Austrian numbers 2013-05-11 Arthur de Jong * [05547a4] stdnum/ro/cf.py, stdnum/ro/cnp.py: Implement validate() for Romanian numbers 2013-05-17 Arthur de Jong * [fc1432c] stdnum/fr/siren.py, stdnum/fr/tva.py: Implement validate() for French numbers 2013-05-05 Arthur de Jong * [62cafb4] stdnum/nl/bsn.py, stdnum/nl/btw.py, stdnum/nl/onderwijsnummer.py: Implement validate() for Dutch numbers 2013-05-04 Arthur de Jong * [cf88e23] stdnum/meid.py, tests/test_meid.doctest: Implement validate() for MEID 2013-05-04 Arthur de Jong * [c6f41f6] stdnum/issn.py: Implement validate() for ISSN 2013-05-04 Arthur de Jong * [21f07b3] stdnum/ismn.py, tests/test_ismn.doctest: Implement validate() for ISMN 2013-05-04 Arthur de Jong * [c07609f] stdnum/isil.py: Implement validate() for ISIL 2013-05-04 Arthur de Jong * [a18f1ac] stdnum/isan.py, tests/test_isan.doctest: Implement validate() for ISAN 2013-05-01 Arthur de Jong * [3ac8164] stdnum/iban.py: Implement validate() for IBAN 2013-05-03 Arthur de Jong * [12bd684] stdnum/grid.py: Implement validate() for GRid numbers 2013-05-04 Arthur de Jong * [9cee495] stdnum/imsi.py: Implement validate() for IMSI 2013-05-04 Arthur de Jong * [6e4bb71] stdnum/imei.py, tests/test_imei.doctest: Implement validate() for IMEI numbers 2013-05-04 Arthur de Jong * [efa2550] stdnum/iso7064/mod_11_10.py, stdnum/iso7064/mod_11_2.py, stdnum/iso7064/mod_37_2.py, stdnum/iso7064/mod_37_36.py, stdnum/iso7064/mod_97_10.py, tests/test_iso7064.doctest: Implement validate() for ISO 7064 algorithms 2013-05-03 Arthur de Jong * [5c9090b] stdnum/verhoeff.py, tests/test_verhoeff.doctest: Implement validate() for the Verhoeff checksum 2013-05-03 Arthur de Jong * [9ad5139] stdnum/luhn.py, tests/test_luhn.doctest: Implement validate() for the Luhn algorithms 2013-05-03 Arthur de Jong * [9580046] stdnum/isbn.py, tests/test_isbn.doctest: Implement validate() for ISBN 2013-05-03 Arthur de Jong * [fa1864f] stdnum/ean.py, tests/test_ean.doctest: Implement validate() for EAN 2013-06-07 Arthur de Jong * [8b9ef8f] stdnum/util.py: Raise a proper exception if cleaning fails 2013-06-07 Arthur de Jong * [1ac5437] setup.cfg, stdnum/exceptions.py: Provide a module with validation exceptions This introduces a new module for switching the validation scheme. Instead of using the is_valid() function that returns a boolean a validate() function either returns the sanitised number or raises an exception that should indicate the kind of validation failure. This should make it easier for applications calling this library to present more informative messages to the user. 2013-06-07 Arthur de Jong * [99586c9] stdnum/__init__.py, stdnum/de/vat.py, stdnum/nl/bsn.py, stdnum/util.py: Revert generating stdnum docstring dynamically Generating the docstring dynamically results in all stdnum modules being imported for every import from any stdnum module which is a performance hit. So we switch back to a manually generated list, using: from stdnum.util import get_module_list print '\n'.join(get_module_list()) This also shortens a few short descriptions to attempt to fit things on one line. 2013-06-07 Arthur de Jong * [a655e82] docs/conf.py, docs/index.rst: Documentation consistency improvements 2013-06-07 Arthur de Jong * [37a2afd] tests/test_iso7064.doctest: The robustness test were moved to the general tests 2013-06-07 Arthur de Jong * [90b7c4a] stdnum/numdb.py: Remove empty line 2013-06-07 Arthur de Jong * [bcb0a0b] stdnum/grid.py: GRid's format() function shouldn't have add_check_digit parameter 2013-04-26 Arthur de Jong * [2d956eb] stdnum/util.py: Use a cleaner way to get all stdnum modules This mechanism should work from Python 2.6 up to and including Python 3.3. 2013-04-26 Arthur de Jong * [30c832f] stdnum/numdb.py: Fix doctest to not be dependant on dict ordering 2013-04-26 Arthur de Jong * [51a55be] .gitignore: Add a .gitignore file 2012-09-22 Arthur de Jong * [3f6d52a] stdnum/__init__.py, stdnum/util.py: generate part of the stdnum docstring based on introspection of the modules 2012-06-16 Arthur de Jong * [af7e837] : set svn:ignore properly 2012-02-26 Arthur de Jong * [8f2e44c] stdnum/bg/egn.py, stdnum/cz/rc.py, stdnum/dk/cpr.py, stdnum/fi/hetu.py, stdnum/isan.py, stdnum/lv/pvn.py, stdnum/meid.py, stdnum/ro/cnp.py, tests/test_isan.doctest, tests/test_ismn.doctest, tests/test_robustness.doctest: re-add Python3 support 2012-02-26 Arthur de Jong * [3325052] ChangeLog, NEWS, stdnum/__init__.py: get files ready for 0.7 release 2012-02-26 Arthur de Jong * [a3ba206] stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat: update data files 2012-02-26 Arthur de Jong * [c240eff] getnumlist.py: also generate a list of modules for use in the Spinx documentation 2012-02-26 Arthur de Jong * [54b0f47] README, getnumlist.py, stdnum/__init__.py: use a script to generate the list of number formats in stdnum 2012-02-26 Arthur de Jong * [dada6a4] stdnum/eu/vat.py, stdnum/gb/vat.py, stdnum/gr/vat.py, stdnum/grid.py, stdnum/hr/oib.py, stdnum/hu/anum.py, stdnum/iban.py, stdnum/ie/pps.py, stdnum/ie/vat.py, stdnum/imei.py, stdnum/isan.py, stdnum/iso7064/__init__.py, stdnum/iso7064/mod_11_10.py, stdnum/iso7064/mod_11_2.py, stdnum/iso7064/mod_37_2.py, stdnum/iso7064/mod_37_36.py, stdnum/iso7064/mod_97_10.py, stdnum/lt/pvm.py, stdnum/luhn.py, stdnum/meid.py, stdnum/verhoeff.py: some more documentation improvements 2012-02-26 Arthur de Jong * [13218a0] setup.py: make script executable 2012-02-26 Arthur de Jong * [c2f0ea2] stdnum/fr/siren.py: add a to_vta() function to the stdnum.fr.siren module 2012-02-26 Arthur de Jong * [902a656] stdnum/__init__.py, stdnum/at/uid.py, stdnum/be/vat.py, stdnum/bg/egn.py, stdnum/bg/pnf.py, stdnum/bg/vat.py, stdnum/br/cpf.py, stdnum/cy/vat.py, stdnum/cz/dic.py, stdnum/cz/rc.py, stdnum/de/vat.py, stdnum/dk/cpr.py, stdnum/dk/cvr.py, stdnum/ean.py, stdnum/ee/kmkr.py, stdnum/es/cif.py, stdnum/es/dni.py, stdnum/es/nie.py, stdnum/es/nif.py, stdnum/eu/vat.py, stdnum/fi/alv.py, stdnum/fi/hetu.py, stdnum/fr/siren.py, stdnum/fr/tva.py, stdnum/gb/vat.py, stdnum/gr/vat.py, stdnum/grid.py, stdnum/hr/oib.py, stdnum/hu/anum.py, stdnum/iban.py, stdnum/ie/pps.py, stdnum/ie/vat.py, stdnum/imei.py, stdnum/imsi.py, stdnum/isan.py, stdnum/isbn.py, stdnum/isil.py, stdnum/ismn.py, stdnum/iso7064/__init__.py, stdnum/iso7064/mod_11_10.py, stdnum/iso7064/mod_11_2.py, stdnum/iso7064/mod_37_2.py, stdnum/iso7064/mod_37_36.py, stdnum/iso7064/mod_97_10.py, stdnum/issn.py, stdnum/it/iva.py, stdnum/lt/pvm.py, stdnum/lu/tva.py, stdnum/luhn.py, stdnum/lv/pvn.py, stdnum/meid.py, stdnum/mt/vat.py, stdnum/nl/bsn.py, stdnum/nl/btw.py, stdnum/nl/onderwijsnummer.py, stdnum/numdb.py, stdnum/pl/nip.py, stdnum/pt/nif.py, stdnum/ro/cf.py, stdnum/ro/cnp.py, stdnum/se/vat.py, stdnum/si/ddv.py, stdnum/sk/dph.py, stdnum/sk/rc.py, stdnum/us/ssn.py, stdnum/util.py, stdnum/verhoeff.py: ensure that the module docstrings are in a somewhat more usable format 2012-02-25 Arthur de Jong * [907e410] setup.py: add the optional dependency on suds for the stdnum.eu.vat.check_vies() function 2012-02-24 Arthur de Jong * [ae9268b] stdnum/cz/rc.py: make the get_birth_date() function publically available 2012-02-24 Arthur de Jong * [4dfc8d7] docs/_templates/autosummary/module.rst, docs/conf.py, docs/index.rst, docs/stdnum.at.uid.rst, docs/stdnum.be.vat.rst, docs/stdnum.bg.egn.rst, docs/stdnum.bg.pnf.rst, docs/stdnum.bg.vat.rst, docs/stdnum.br.cpf.rst, docs/stdnum.cy.vat.rst, docs/stdnum.cz.dic.rst, docs/stdnum.cz.rc.rst, docs/stdnum.de.vat.rst, docs/stdnum.dk.cpr.rst, docs/stdnum.dk.cvr.rst, docs/stdnum.ean.rst, docs/stdnum.ee.kmkr.rst, docs/stdnum.es.cif.rst, docs/stdnum.es.dni.rst, docs/stdnum.es.nie.rst, docs/stdnum.es.nif.rst, docs/stdnum.eu.vat.rst, docs/stdnum.fi.alv.rst, docs/stdnum.fi.hetu.rst, docs/stdnum.fr.siren.rst, docs/stdnum.fr.tva.rst, docs/stdnum.gb.vat.rst, docs/stdnum.gr.vat.rst, docs/stdnum.grid.rst, docs/stdnum.hr.oib.rst, docs/stdnum.hu.anum.rst, docs/stdnum.iban.rst, docs/stdnum.ie.pps.rst, docs/stdnum.ie.vat.rst, docs/stdnum.imei.rst, docs/stdnum.imsi.rst, docs/stdnum.isan.rst, docs/stdnum.isbn.rst, docs/stdnum.isil.rst, docs/stdnum.ismn.rst, docs/stdnum.iso7064.rst, docs/stdnum.issn.rst, docs/stdnum.it.iva.rst, docs/stdnum.lt.pvm.rst, docs/stdnum.lu.tva.rst, docs/stdnum.luhn.rst, docs/stdnum.lv.pvn.rst, docs/stdnum.meid.rst, docs/stdnum.mt.vat.rst, docs/stdnum.nl.bsn.rst, docs/stdnum.nl.btw.rst, docs/stdnum.nl.onderwijsnummer.rst, docs/stdnum.pl.nip.rst, docs/stdnum.pt.nif.rst, docs/stdnum.ro.cf.rst, docs/stdnum.ro.cnp.rst, docs/stdnum.se.vat.rst, docs/stdnum.si.ddv.rst, docs/stdnum.sk.dph.rst, docs/stdnum.sk.rc.rst, docs/stdnum.us.ssn.rst, docs/stdnum.verhoeff.rst, setup.cfg: generate documentation using Sphinx 2012-02-23 Arthur de Jong * [093b1a1] README, stdnum/__init__.py, stdnum/dk/cpr.py: add a CPR (personnummer, the Danish citizen number) module 2012-02-23 Arthur de Jong * [89e4d78] README, stdnum/__init__.py, stdnum/ie/pps.py: add a PPS No (Personal Public Service Number, Irish personal number) module 2012-02-22 Arthur de Jong * [3a9c407] README, stdnum/__init__.py, stdnum/hr/__init__.py, stdnum/hr/oib.py: add an OIB (Osobni identifikacijski broj, Croatian personal identification number) module 2012-02-20 Arthur de Jong * [680b7d1] numdb-test.dat, stdnum/numdb.py, test.dat: rename numdb test file 2012-02-20 Arthur de Jong * [68f62bf] stdnum/eu/vat.py: add a stdnum.eu.vat.check_vies() function to do an on-line check of the VAT number 2012-02-19 Arthur de Jong * [e640e3b] stdnum/iban.py, stdnum/numdb.py: add "pragma: no cover" statements to code that isn't expected to be covered 2012-02-19 Arthur de Jong * [b561d59] README, stdnum/__init__.py, stdnum/eu/__init__.py, stdnum/eu/vat.py, tests/test_eu_vat.doctest: add a VAT (European Union VAT number) module 2012-02-19 Arthur de Jong * [61af19d] README, stdnum/__init__.py: make number description consistent 2012-02-19 Arthur de Jong * [eeb5c61] stdnum/at/__init__.py, stdnum/cz/__init__.py, stdnum/dk/__init__.py, stdnum/ee/__init__.py, stdnum/es/__init__.py, stdnum/fi/__init__.py, stdnum/fr/__init__.py, stdnum/hu/__init__.py, stdnum/it/__init__.py, stdnum/lt/__init__.py, stdnum/lu/__init__.py, stdnum/lv/__init__.py, stdnum/nl/__init__.py, stdnum/pl/__init__.py, stdnum/pt/__init__.py, stdnum/ro/__init__.py, stdnum/si/__init__.py, stdnum/sk/__init__.py: for all countries, provide vat as an alias for the local vat identifier 2012-02-19 Arthur de Jong * [6755b94] stdnum/at/__init__.py, stdnum/be/__init__.py, stdnum/bg/__init__.py, stdnum/br/__init__.py, stdnum/cy/__init__.py, stdnum/cz/__init__.py, stdnum/de/__init__.py, stdnum/dk/__init__.py, stdnum/ee/__init__.py, stdnum/es/__init__.py, stdnum/fi/__init__.py, stdnum/fr/__init__.py, stdnum/gb/__init__.py, stdnum/gr/__init__.py, stdnum/hu/__init__.py, stdnum/ie/__init__.py, stdnum/it/__init__.py, stdnum/lt/__init__.py, stdnum/lu/__init__.py, stdnum/lv/__init__.py, stdnum/mt/__init__.py, stdnum/nl/__init__.py, stdnum/pl/__init__.py, stdnum/pt/__init__.py, stdnum/ro/__init__.py, stdnum/se/__init__.py, stdnum/si/__init__.py, stdnum/sk/__init__.py, stdnum/us/__init__.py: give all packages a description 2012-02-19 Arthur de Jong * [6d74fe9] stdnum/nl/vat.py: remove stdnum.nl.vat alias module 2012-02-19 Arthur de Jong * [528901d] stdnum/util.py, tests/test_robustness.doctest: use introspection to find number modules and test them 2012-02-18 Arthur de Jong * [2d80a24] README, stdnum/__init__.py, stdnum/bg/vat.py, tests/test_bg_vat.doctest, tests/test_robustness.doctest: add a VAT (Идентификационен номер по ДДС, Bulgarian VAT numbers) module 2012-02-18 Arthur de Jong * [1384488] README, stdnum/__init__.py, stdnum/bg/pnf.py, tests/test_robustness.doctest: add a PNF (ЛНЧ, Личен номер на чужденец, Bulgarian personal number of a foreigner) module 2012-02-18 Arthur de Jong * [a24e98e] README, stdnum/__init__.py, stdnum/bg/__init__.py, stdnum/bg/egn.py, tests/test_robustness.doctest: add an EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes) module 2012-02-18 Arthur de Jong * [4ac3fe7] tests/test_robustness.doctest: explicitly test for False 2012-02-18 Arthur de Jong * [0c78d90] stdnum/lt/pvm.py: explicitly return False if no rule matches 2012-02-18 Arthur de Jong * [cddb5f9] README, stdnum/__init__.py, stdnum/gb/__init__.py, stdnum/gb/vat.py, tests/test_gb_vat.doctest, tests/test_robustness.doctest: add a VAT (United Kingdom (and Isle of Man) VAT registration number) module 2012-02-18 Arthur de Jong * [6c436ec] tests/test_fi_hetu.doctest: fix typo 2012-02-18 Arthur de Jong * [aa39c92] README, stdnum/__init__.py, stdnum/se/__init__.py, stdnum/se/vat.py, tests/test_robustness.doctest: add a VAT (Moms, Mervärdesskatt, Swedish VAT number) module 2012-02-18 Arthur de Jong * [3a7a91c] README, stdnum/__init__.py, stdnum/si/__init__.py, stdnum/si/ddv.py, tests/test_robustness.doctest: add a ID za DDV (Davčna številka, Slovenian VAT number) module 2012-02-18 Arthur de Jong * [ebbd1af] README, stdnum/__init__.py, stdnum/pl/__init__.py, stdnum/pl/nip.py, tests/test_robustness.doctest: add a NIP (Numer Identyfikacji Podatkowej, Polish VAT number) module 2012-02-18 Arthur de Jong * [c75f072] README, stdnum/__init__.py, stdnum/mt/__init__.py, stdnum/mt/vat.py, tests/test_robustness.doctest: add a VAT (Maltese VAT number) module 2012-02-17 Arthur de Jong * [0922f3c] stdnum/it/iva.py: strip a few more separators 2012-02-17 Arthur de Jong * [b708920] README, stdnum/__init__.py, stdnum/fr/tva.py, tests/test_robustness.doctest: add a TVA (Numéro d'identification à la taxe sur la valeur ajoutée, French VAT number) module 2012-02-17 Arthur de Jong * [dc8e9a3] README, stdnum/__init__.py, stdnum/lt/__init__.py, stdnum/lt/pvm.py, tests/test_robustness.doctest: add a PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number) module 2012-02-17 Arthur de Jong * [20296ef] README, stdnum/__init__.py, stdnum/ee/__init__.py, stdnum/ee/kmkr.py, tests/test_robustness.doctest: add a KMKR (Käibemaksukohuslase, Estonian VAT number) module 2012-02-17 Arthur de Jong * [2100c28] README, stdnum/__init__.py, stdnum/ie/__init__.py, stdnum/ie/vat.py, tests/test_robustness.doctest: add a VAT (Irish VAT number) module 2012-02-17 Arthur de Jong * [d2f1348] README, stdnum/__init__.py, stdnum/hu/__init__.py, stdnum/hu/anum.py, tests/test_robustness.doctest: add an ANUM (Közösségi adószám, Hungarian VAT number) module 2012-02-17 Arthur de Jong * [d803443] README, stdnum/__init__.py, stdnum/cz/dic.py, tests/test_robustness.doctest: add a DIČ (Daňové identifikační číslo, Czech VAT number) module 2012-02-17 Arthur de Jong * [0d2e4cc] README, stdnum/__init__.py, stdnum/fi/alv.py, tests/test_robustness.doctest: add an ALV nro (Arvonlisäveronumero, Finnish VAT number) module 2012-02-17 Arthur de Jong * [03eccc4] README, stdnum/__init__.py, stdnum/sk/dph.py, tests/test_robustness.doctest: add IČ DPH (Identifikačné číslo pre daň z pridanej hodnoty, Slovak VAT number) module 2012-02-16 Arthur de Jong * [389c306] README, stdnum/__init__.py, stdnum/pt/__init__.py, stdnum/pt/nif.py, tests/test_robustness.doctest: add a NIF (Número de identificação fiscal, Portuguese VAT number) module 2012-02-13 Arthur de Jong * [cdc7f96] README, stdnum/__init__.py, stdnum/at/__init__.py, stdnum/at/uid.py, tests/test_robustness.doctest: add a UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number) module 2012-02-13 Arthur de Jong * [e0bb4e8] README, stdnum/__init__.py, stdnum/cy/__init__.py, stdnum/cy/vat.py, tests/test_robustness.doctest: add a Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number) module 2012-02-12 Arthur de Jong * [402a0d5] stdnum/es/cif.py, stdnum/it/iva.py, stdnum/util.py: use the luhn module where possible 2012-02-12 Arthur de Jong * [1c2b4c3] tests/test_robustness.doctest: fix typo in header 2012-02-12 Arthur de Jong * [09ef54d] README, stdnum/__init__.py, stdnum/it/__init__.py, stdnum/it/iva.py, tests/test_robustness.doctest: add a Partita IVA (Italian VAT number) module 2012-02-12 Arthur de Jong * [ffc824b] README, stdnum/__init__.py, stdnum/ro/cf.py, tests/test_robustness.doctest: add a CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number) module 2012-02-12 Arthur de Jong * [9d65f6a] README, stdnum/__init__.py, stdnum/ro/__init__.py, stdnum/ro/cnp.py, tests/test_robustness.doctest: add a CNP (Cod Numeric Personal, Romanian Numerical Personal Code) module 2012-02-12 Arthur de Jong * [60533cd] stdnum/gr/vat.py: also strip : as seen in some numbers 2012-02-11 Arthur de Jong * [74c4c71] README, stdnum/__init__.py, stdnum/lu/__init__.py, stdnum/lu/tva.py, tests/test_robustness.doctest: add a TVA (Numéro d'identification à la taxe sur la valeur ajoutée, Luxembourgian VAT number) module 2012-02-11 Arthur de Jong * [74f4e2a] README, stdnum/__init__.py, stdnum/dk/__init__.py, stdnum/dk/cvr.py, tests/test_robustness.doctest: add a CVR (Momsregistreringsnummer, Danish VAT number) module 2012-02-11 Arthur de Jong * [3c64f1e] stdnum/be/vat.py: add missing test 2012-02-11 Arthur de Jong * [b8c3ba6] stdnum/be/vat.py: clean up numbers starting with (0) 2012-02-11 Arthur de Jong * [8a10861] README, stdnum/__init__.py, stdnum/lv/__init__.py, stdnum/lv/pvn.py, tests/test_robustness.doctest: add a PVN (Pievienotās vērtības nodokļa, Latvian VAT number) module 2012-02-11 Arthur de Jong * [a3610a3] README, stdnum/__init__.py, stdnum/es/nif.py, tests/test_robustness.doctest: add a NIF (Número de Identificación Fiscal, Spanish VAT number) module 2012-02-11 Arthur de Jong * [aa90c4f] README, stdnum/__init__.py, stdnum/es/cif.py, tests/test_robustness.doctest: add a CIF (Certificado de Identificación Fiscal, Spanish tax identification number) module 2012-02-11 Arthur de Jong * [a574e6c] stdnum/util.py: implement a digitsum() function to find the sub of all digits in a number 2012-02-11 Arthur de Jong * [84d1ee7] stdnum/es/nie.py: fix description and remove unnecessary import 2012-02-10 Arthur de Jong * [fa2d398] README, stdnum/__init__.py, stdnum/es/nie.py, tests/test_robustness.doctest: add a NIE (Número de Identificación de Extranjeros, Spanish identification number for foreigners) module 2012-02-10 Arthur de Jong * [fe3210f] README, stdnum/__init__.py, stdnum/es/__init__.py, stdnum/es/dni.py, tests/test_robustness.doctest: add a DNI (Documento nacional de identidad, Spanish personal identity codes) module 2012-02-10 Arthur de Jong * [4439f47] README, stdnum/__init__.py, stdnum/be/__init__.py, stdnum/be/vat.py, tests/test_robustness.doctest: add a BTW, TVA, NWSt (Belgian VAT number) module 2012-02-10 Arthur de Jong * [1ab602c] README, stdnum/__init__.py, stdnum/sk/__init__.py, stdnum/sk/rc.py: also make the stdnum.cz.rc module available as stdnum.sk.rc 2012-02-10 Arthur de Jong * [e9e5861] stdnum/nl/vat.py: also make the stdnum.nl.btw module available as stdnum.nl.vat 2012-02-10 Arthur de Jong * [c795b3c] stdnum/nl/btw.py: fix number in test and ensure that number is not all zeroes 2012-02-10 Arthur de Jong * [2bb9231] stdnum/cz/rc.py: add some info to description 2012-02-10 Arthur de Jong * [1aeeaf4] README, stdnum/__init__.py, stdnum/de/__init__.py, stdnum/de/vat.py, tests/test_robustness.doctest: add an Ust ID Nr. (Umsatzsteur Identifikationnummer, the German VAT number) module 2012-02-10 Arthur de Jong * [473b3ca] README, stdnum/__init__.py, stdnum/gr/__init__.py, stdnum/gr/vat.py, tests/test_robustness.doctest: add a FPA, ΦΠΑ (Foros Prostithemenis Aksias, the Greek VAT number) module 2012-02-05 Arthur de Jong * [9f1d47b] README, stdnum/__init__.py, stdnum/fr/__init__.py, stdnum/fr/siren.py, tests/test_robustness.doctest: add a SIREN (Système d'Identification du Répertoire des Entreprises, a French company identification number) module 2012-02-05 Arthur de Jong * [575fc75] README, stdnum/__init__.py, stdnum/cz/__init__.py, stdnum/cz/rc.py, tests/test_robustness.doctest: add a RČ (Rodné číslo, the Czech birth numbers) module 2012-02-04 Arthur de Jong * [41dd815] stdnum/br/cpf.py, stdnum/ean.py, stdnum/grid.py, stdnum/iban.py, stdnum/imei.py, stdnum/imsi.py, stdnum/isan.py, stdnum/isbn.py, stdnum/ismn.py, stdnum/issn.py, stdnum/meid.py, stdnum/nl/bsn.py, stdnum/nl/btw.py, stdnum/nl/onderwijsnummer.py, stdnum/us/ssn.py, stdnum/util.py: implement a stdnum.util module for holding utility functions (for now clean()) 2012-02-04 Arthur de Jong * [54cc207] tests/test_robustness.doctest: some extra rubustness checks 2012-02-04 Arthur de Jong * [b43817c] stdnum/nl/bsn.py, stdnum/nl/onderwijsnummer.py: rename calc_checksum() to checksum() for consistency 2012-02-04 Arthur de Jong * [548f129] stdnum/iso7064/mod_37_36.py: use integer division 2012-02-02 Arthur de Jong * [9efde4f] README, stdnum/__init__.py, stdnum/nl/btw.py, tests/test_robustness.doctest: add a BTW (the Dutch VAT number) module 2012-02-02 Arthur de Jong * [086e509] README, stdnum/__init__.py, stdnum/nl/bsn.py, stdnum/nl/onderwijsnummer.py, tests/test_robustness.doctest: add an onderwijsnummer (Dutch school number) module 2011-12-31 Arthur de Jong * [587c538] setup.py: revert switching to distutils part of r93, keep restructuring part 2011-12-31 Arthur de Jong * [6756d79] setup.cfg, setup.py: switch to distutils 2011-11-07 Arthur de Jong * [e6020b9] README, stdnum/__init__.py, stdnum/fi/__init__.py, stdnum/fi/hetu.py, tests/test_fi_hetu.doctest, tests/test_robustness.doctest: add a HETU (Finnish personal identity code) module as provided by Jussi Judin (#5) 2011-09-30 Arthur de Jong * [77ac8d4] setup.py: fix version number use (fix r86) 2011-09-30 Arthur de Jong * [6cdfb6b] ChangeLog, NEWS, stdnum/__init__.py: get files ready for 0.6 release 2011-09-30 Arthur de Jong * [1451b47] stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat: update data files 2011-09-30 Arthur de Jong * [6ec6c7e] setup.py, stdnum/__init__.py: move the version number definition to the stdnum package 2011-09-25 Arthur de Jong * [ae2013d] stdnum/ismn.py: implement an ismn_type() function 2011-09-23 Arthur de Jong * [14b97f9] : ignore __pycache__ directories 2011-09-23 Arthur de Jong * [cbd114e] README, getimsi.py, stdnum/__init__.py, stdnum/imsi.dat, stdnum/imsi.py, tests/test_robustness.doctest: add an IMSI (International Mobile Subscriber Identity) module 2011-09-23 Arthur de Jong * [68c98f0] stdnum/imei.py: implement an imei.split() function that splits the number into a TAC, serial number and checksum or software version 2011-09-23 Arthur de Jong * [e6cd768] getiban.py: remove unneeded import 2011-09-20 Arthur de Jong * [4e8d7e4] stdnum/isbn.py, tests/test_isbn.doctest: implement a conversion function from ISBN13 to ISBN10 2011-09-20 Arthur de Jong * [d6f9ba2] tests/test_imei.doctest, tests/test_isan.doctest, tests/test_isbn.doctest, tests/test_ismn.doctest: fix space before inline comments 2011-09-20 Arthur de Jong * [c4ad099] stdnum/isbn.py, tests/test_isbn.doctest: fix a problem with an ISBN13 with a valid check digit but with an unknown bookland prefix 2011-09-04 Arthur de Jong * [1c7c198] setup.py: fix homepage URL 2011-08-19 Arthur de Jong * [881e8a6] getiban.py, getisbn.py, getisil.py, setup.py, stdnum/br/cpf.py, stdnum/ean.py, stdnum/grid.py, stdnum/iban.py, stdnum/imei.py, stdnum/isan.py, stdnum/isbn.py, stdnum/isil.py, stdnum/ismn.py, stdnum/iso7064/mod_11_10.py, stdnum/iso7064/mod_11_2.py, stdnum/iso7064/mod_37_2.py, stdnum/iso7064/mod_37_36.py, stdnum/iso7064/mod_97_10.py, stdnum/issn.py, stdnum/luhn.py, stdnum/meid.py, stdnum/nl/bsn.py, stdnum/numdb.py, stdnum/us/ssn.py, stdnum/verhoeff.py: make source code layout follow PEP8 more 2011-07-09 Arthur de Jong * [8dbcedd] ChangeLog, NEWS, setup.py: get files ready for 0.5 release 2011-07-09 Arthur de Jong * [596c7a1] stdnum/iban.dat, stdnum/isbn.dat, stdnum/isil.dat: update data files 2011-06-20 Arthur de Jong * [63b2b0a] stdnum/issn.py: implement a conversion function from ISSN to EAN 2011-06-20 Arthur de Jong * [d101acf] stdnum/isbn.py, stdnum/ismn.py: use the ean module for calculating the check digit 2011-06-20 Arthur de Jong * [f5747bc] README, stdnum/__init__.py, stdnum/ean.py, tests/test_robustness.doctest: add an EAN (International Article Number) module 2011-03-06 Arthur de Jong * [1b904ba] setup.py, stdnum/numdb.py: also support Python3 with the same codebase (see #3) 2011-03-06 Arthur de Jong * [a45079f] setup.py: ensure that data files are always included 2011-03-02 Arthur de Jong * [c17920a] stdnum/verhoeff.py: Python 2.5 compatibility improvement 2011-02-06 Arthur de Jong * [e6ba399] ChangeLog, NEWS, setup.py: get files ready for 0.4 release 2011-02-06 Arthur de Jong * [060dfce] stdnum/isbn.dat: include an updated version 2011-02-06 Arthur de Jong * [8806d2a] README, stdnum/__init__.py, stdnum/us/__init__.py, stdnum/us/ssn.py, tests/test_robustness.doctest: add an SSN (U.S. Social Security Number) module 2011-02-05 Arthur de Jong * [c260626] README, stdnum/__init__.py: add ISIL to the documentation 2011-02-05 Arthur de Jong * [e517903] getisil.py, stdnum/isil.dat, stdnum/isil.py, tests/test_robustness.doctest: add an ISIL (International Standard Identifier for Libraries and Related Organizations) module 2011-02-05 Arthur de Jong * [96f4f7c] stdnum/numdb.py: allow most kind of characters in number ranges 2011-02-05 Arthur de Jong * [33611d1] stdnum/iban.py: move more validation into try/except (specifically the _convert() call) 2011-02-05 Arthur de Jong * [62aa496] tests/test_br_cpf.doctest, tests/test_iban.doctest, tests/test_imei.doctest, tests/test_isan.doctest, tests/test_isbn.doctest, tests/test_ismn.doctest, tests/test_issn.doctest, tests/test_luhn.doctest, tests/test_meid.doctest, tests/test_nl_bsn.doctest, tests/test_robustness.doctest, tests/test_verhoeff.doctest: move all robustness tests into one test file 2011-02-05 Arthur de Jong * [9081e90] tests/test_iso7064.doctest: fix imports of iso7064.mod_*_* modules 2011-02-05 Arthur de Jong * [e5678ca] stdnum/isbn.py: fix typo in r53 2011-02-05 Arthur de Jong * [ea737ff] stdnum/__init__.py: add encoding header 2011-01-31 Arthur de Jong * [cc7a6d8] README, stdnum/__init__.py: get README and package docstring in sync 2011-01-21 Arthur de Jong * [6724e50] stdnum/isbn.py, tests/test_isbn.doctest: add a convert parameter to most isbn functions to automatically convert to ISBN-13 2011-01-17 Arthur de Jong * [411874e] README: add note about CPF and update copyright year 2011-01-16 Arthur de Jong * [db2238c] README, getiban.py, stdnum/iban.dat, stdnum/iban.py, tests/test_iban.doctest: add an IBAN (International Bank Account Number) module 2011-01-16 Arthur de Jong * [2b4aff6] setup.py, stdnum/numdb.py: revert r49 because it wasn't needed after all 2011-01-16 Arthur de Jong * [0bf31c9] setup.py, stdnum/numdb.py: introduce a full parameter that can be used to only return the part that is in the database 2011-01-16 Arthur de Jong * [4fe17ba] stdnum/grid.py, stdnum/isan.py: fix import of iso7064 modules 2011-01-16 Arthur de Jong * [c1f03c2] stdnum/numdb.py, test.dat: add test for partial match 2011-01-15 Arthur de Jong * [81a99d3] tests/test_nl_bsn.doctest: fix comments to refer to the new path of the module 2011-01-15 Arthur de Jong * [fda67ac] stdnum/br/__init__.py, stdnum/br/cpf.py, tests/test_br_cpf.doctest: add a CPF (Cadastro de Pessoas Físicas) module 2011-01-15 Arthur de Jong * [8d3a92c] stdnum/bsn.py, stdnum/nl/__init__.py, stdnum/nl/bsn.py, tests/test_bsn.doctest, tests/test_nl_bsn.doctest: move bsn module inside nl package 2010-11-26 Arthur de Jong * [6ed480c] setup.py, stdnum/__init__.py: move general description to package __init__.py file 2010-11-24 Arthur de Jong * [124c16d] getisbn.py, stdnum/isbn.dat, stdnum/isbn.py, stdnum/isbn/__init__.py, stdnum/isbn/ranges.py, stdnum/numdb.py, test.dat, tests/test_isbn.doctest: implement a new numdb module to hold information on hierarchically organised numbers and switch the isbn module to use this format instead 2010-09-11 Arthur de Jong * [72a0b96] ChangeLog, NEWS, README, setup.py: get files ready for 0.3 release 2010-09-05 Arthur de Jong * [cd844b5] setup.py: have sdist target create a tarball with reasonable permissions 2010-08-29 Arthur de Jong * [2e64eb8] stdnum/bsn.py, stdnum/isan.py, stdnum/iso7064/mod_37_2.py, stdnum/iso7064/mod_37_36.py, stdnum/meid.py, stdnum/verhoeff.py, tests/test_bsn.doctest, tests/test_ismn.doctest: spelling check 2010-08-28 Arthur de Jong * [2a7afff] README, stdnum/grid.py: add a GRid (Global Release Identifier) module 2010-08-27 Arthur de Jong * [9970652] README, stdnum/isan.py, tests/test_isan.doctest: add ISAN (International Standard Audiovisual Number) module 2010-08-27 Arthur de Jong * [fda9552] README, stdnum/iso7064/__init__.py, stdnum/iso7064/mod_11_10.py, stdnum/iso7064/mod_11_2.py, stdnum/iso7064/mod_37_2.py, stdnum/iso7064/mod_37_36.py, stdnum/iso7064/mod_97_10.py, tests/test_iso7064.doctest: implement some ISO/IEC 7064 check digit schemes 2010-08-26 Arthur de Jong * [4017d83] stdnum/isbn/__init__.py, stdnum/ismn.py, stdnum/issn.py, stdnum/verhoeff.py: switch to using enumerate() for looping over numbers where needed 2010-08-21 Arthur de Jong * [8bdb6ef] README, stdnum/ismn.py, tests/test_ismn.doctest: add an ISMN (International Standard Music Number) module 2010-08-21 Arthur de Jong * [97d5280] tests/test_isbn.doctest: simplify ranges tests a bit 2010-08-21 Arthur de Jong * [f3b025b] stdnum/isbn/ranges.py: update ranges from newly downloaded file 2010-08-20 Arthur de Jong * [8748830] README, stdnum/meid.py, tests/test_meid.doctest: add a MEID (Mobile Equipment Identifier) module 2010-08-20 Arthur de Jong * [f125f3e] setup.cfg, tests/test_isbn.doctest, tests/test_issn.doctest: write some more tests (some of which are a bit of a hack) to get coverage to 100% 2010-08-20 Arthur de Jong * [d622d92] stdnum/imei.py, tests/test_imei.doctest: add an add_check_digit option to the format() function to add a check digit if needed and possible 2010-08-20 Arthur de Jong * [a74a6f7] stdnum/luhn.py: make checksum calculation a little more readable 2010-08-20 Arthur de Jong * [6bb04af] README, stdnum/imei.py, tests/test_imei.doctest: add an IMEI (International Mobile Equipment Identity) module 2010-08-20 Arthur de Jong * [ca08995] README, stdnum/luhn.py, tests/test_luhn.doctest: add functions for handling the Luhn and Luhn mod N algorithms 2010-08-20 Arthur de Jong * [7e800c3] stdnum/issn.py: fix typo 2010-08-20 Arthur de Jong * [571dc83] README, stdnum/verhoeff.py, tests/test_verhoeff.doctest: add functions for handling the Verhoeff algorithm 2010-08-16 Arthur de Jong * [9ffa9fd] ChangeLog, NEWS, setup.py: get files ready for 0.2 release 2010-08-16 Arthur de Jong * [19b7d2d] debian/changelog, debian/compat, debian/control, debian/copyright, debian/docs, debian/rules, debian/source/format, debian/watch: debian package configuration is now available at http://svn.debian.org/viewsvn/python-modules/packages/python-stdnum/trunk/ 2010-08-14 Arthur de Jong * [85e9e3b] setup.cfg, tests/test_bsn.doctest, tests/test_isbn.doctest: add more doctests that are not part of the module documentation 2010-07-27 Arthur de Jong * [c536356] README, stdnum/bsn.py, stdnum/isbn/__init__.py, stdnum/issn.py: rename validate() function to is_valid() 2010-07-27 Arthur de Jong * [85a5fc8] stdnum/isbn/ranges.py: fix typo in output() function 2010-07-27 Arthur de Jong * [1071603] stdnum/isbn/ranges.py: fix range detection to handle lookup errors more gracefully 2010-07-27 Arthur de Jong * [a86c4cc] stdnum/bsn.py, stdnum/isbn/__init__.py, stdnum/issn.py: handle wrong types passed to validate() more gracefully 2010-07-26 Arthur de Jong * [9495116] debian/changelog, debian/source/format, debian/watch: make release 0.1-1 2010-07-25 Arthur de Jong * [55a97d4] ChangeLog: get files ready for 0.1 release 2010-07-25 Arthur de Jong * [1e02d5a] debian/changelog, debian/compat, debian/control, debian/copyright, debian/docs, debian/rules, debian/source/format: add Debian packaging 2010-07-25 Arthur de Jong * [14bd2fe] COPYING, ChangeLog, MANIFEST.in, NEWS: include some more files in the source distribution 2010-07-25 Arthur de Jong * [9940cf3] setup.cfg: use nose for testing and ignore generated files and directories 2010-07-25 Arthur de Jong * [967f2ae] setup.py: add a setup.py script for use of setuptools 2010-07-25 Arthur de Jong * [ca5f850] README: add documentation to the README 2010-07-25 Arthur de Jong * [40aff16] stdnum/bsn.py, stdnum/isbn/__init__.py, stdnum/isbn/ranges.py, stdnum/issn.py: spelling check an extra doctest and a simplification 2010-07-23 Arthur de Jong * [6eabbc3] stdnum/bsn.py: add BSN (Burgerservicenummer, the Ducth national identification number) module 2010-07-23 Arthur de Jong * [92e18aa] stdnum/issn.py: add an ISSN (International Standard Serial Number) module 2010-07-23 Arthur de Jong * [31ce783] stdnum/isbn/__init__.py: fix example and fix ISBN13 conversion 2010-07-23 Arthur de Jong * [4b8c10e] stdnum/isbn/__init__.py: get rid of remainders of old code that used exceptions 2010-07-23 Arthur de Jong * [7d2f15a] README, stdnum/__init__.py, stdnum/isbn/__init__.py, stdnum/isbn/ranges.py: make a initial repository layout with an implementation of the isbn module python-stdnum-1.2/getisil.py0000755000000000000000000000475512606424375016204 0ustar rootroot00000000000000#!/usr/bin/env python # getisil.py - script to donwload ISIL agencies # # Copyright (C) 2011 Arthur de Jong # # 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 """This script downloads a web page from the ISIL Registration Authority and screen-scrapes the national and non-national ISIL agencies and code prefixes.""" import urllib import BeautifulSoup import re spaces_re = re.compile('\s+', re.UNICODE) # the web page that holds information on the ISIL authorities download_url = 'http://biblstandard.dk/isil/' def clean(s): """Cleans up the string removing unneeded stuff from it.""" return spaces_re.sub(' ', s.replace(u'\u0096', '')).strip().encode('utf-8') def parse(f): """Parse the specified file.""" print '# generated from ISIL Registration Authority, downloaded from' print '# %s' % download_url soup = BeautifulSoup.BeautifulSoup(f, convertEntities='html') # find all table rows for tr in soup.findAll('tr'): # find the rows with four columns of text tds = tr.findAll('td', attrs={'class': 'text'}, recursive=False) if len(tds) == 4: props = {} cc = clean(tds[0].string) if tds[1].string: props['country'] = clean(tds[1].contents[0]) ra_a = tds[2].find('a') if ra_a: props['ra'] = clean(ra_a.string) props['ra_url'] = clean(ra_a['href']) elif tds[2].string: props['ra'] = clean(tds[2].string) # we could also get the search urls from tds[3].findAll('a') print '%s$ %s' % ( cc, ' '.join(['%s="%s"' % (x, y) for x, y in props.iteritems()])) if __name__ == '__main__': #f = open('isil.html', 'r') f = urllib.urlopen(download_url) parse(f) python-stdnum-1.2/getimsi.py0000755000000000000000000001732512261262700016167 0ustar rootroot00000000000000#!/usr/bin/env python # getismsi.py - script to donwload data from Wikipedia to build the database # # Copyright (C) 2011, 2013 Arthur de Jong # # 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 from collections import defaultdict import re import urllib # URLs that are downloaded mcc_list_url = 'https://en.wikipedia.org/w/index.php?title=Mobile_country_code&action=raw' cleanup_replacements = { 'Anguilla (United Kingdom)': 'Anguilla', 'Argentina|Argentine Republic': 'Argentina', 'Aruba (Kingdom of the Netherlands|Netherlands)': 'Aruba', 'Azerbaijan|Azerbaijani Republic': 'Azerbaijan', 'Bermuda (United Kingdom)': 'Bermuda', 'British Virgin Islands (United Kingdom)': 'British Virgin Islands', 'Brunei|Brunei Darussalam': 'Brunei', 'Cayman Islands': 'Cayman Islands (United Kingdom)', 'Cayman Islands (United Kingdom)': 'Cayman Islands (United Kingdom)', 'Czech Rep.': 'Czech Republic', 'Democratic People\'s Republic of Korea|Korea, North': 'North Korea', 'Denmark (Kingdom of Denmark)': 'Denmark', 'Faroe Islands (Kingdom of Denmark)': 'Faroe Islands (Denmark)', 'French Polynesia (France)': 'French Polynesia', 'Gabon|Gabonese Republic': 'Gabon', 'Georgia (country)|Georgia': 'Georgia', 'Gibraltar': 'Gibraltar (United Kingdom)', 'Gibraltar (United Kingdom)': 'Gibraltar (United Kingdom)', 'Greenland (Kingdom of Denmark)': 'Greenland (Denmark)', 'Guadeloupe': 'Guadeloupe (France)', 'Hong Kong (People\'s Republic of China|PRC)': 'Hong Kong (China)', 'Hong Kong (Special Administrative Region of People\'s Republic of China)': 'Hong Kong (China)', 'Korea (Rep. of)': 'South Korea', 'Kyrgyz Republic': 'Kyrgyzstan', 'Lao People\'s Democratic Republic|Laos': 'Laos', 'Macau (People\'s Republic of China)': 'Macau (China)', 'Macau (People\'s Republic of China|PRC)': 'Macau (China)', 'Martinique': 'Martinique (France)', 'Moldova (Republic of)': 'Moldova', 'Montenegro (Republic of)': 'Montenegro', 'Netherlands (Kingdom of the Netherlands)': 'Netherlands', 'Palestinian Authority': 'Palestinian territories', 'Palestinian territories|Palestine': 'Palestinian territories', 'People\'s Republic of China|China': 'China', 'Puerto Rico (United States)': 'Puerto Rico', 'Republic of Ireland|Ireland': 'Ireland', 'Republic of Korea|Korea, South': 'South Korea', 'Russian Federation': 'Russian Federation', 'Rwanda|Rwandese Republic': 'Rwanda', 'Serbia (Republic of)': 'Serbia', 'Somali Democratic Republic|Somalia': 'Somalia', 'Syrian Arab Republic': 'Syria', 'Syrian Arab Republic|Syria': 'Syria', 'Turks and Caicos Islands (United Kingdom)': 'Turks and Caicos Islands', 'United States': 'United States of America', 'United States Virgin Islands (United States)': 'United States Virgin Islands', 'Venezuela (Bolivarian Republic of)': 'Venezuela', 'Vietnam|Viet Nam': 'Vietnam', } remove_ref_re = re.compile(r'.*?') remove_comment_re = re.compile(r'{{.*?}}') remove_href_re = re.compile(ur'(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+' + ur'[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|' + ur'(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|' + ur'(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>' + ur'?\xab\xbb\u201c\u201d\u2018\u2019]))') def cleanup_value(val): """Remove unneeded markup from the value.""" # remove uninteresting things from value val = remove_comment_re.sub('', val) val = remove_ref_re.sub('', val) val = remove_href_re.sub('', val) val = val.replace('[', '').replace(']', '').replace('\'\'', '').strip() val = val.split('|')[-1] # replace value val = val.replace('Unknown', '') val = val.replace('United Kingdom|UK', 'United Kingdom') val = val.replace('United States|US', 'United States') val = val.replace('New Zealand|NZ', 'New Zealand').strip() return cleanup_replacements.get(val, val) def update_mncs(data, mcc, mnc, **kwargs): """Merge provided mnc information with the data that is already stored in mccs.""" data[mcc][mnc].update(dict((k, cleanup_value(v)) for k, v in kwargs.items() if v)) def get_mncs_from_wikipedia(data): """Update the collection of Mobile Country Codes from Wikipedia. This parses a Wikipedia page to extract the MCC and MNC, the first part of any IMSI, and stores the results.""" mnc_country_re = re.compile(r'^[=]{2,4}\s+(?P.*?)(\s+-\s+(?P[^\s]{2}))?\s+[=]{2,4}$') mnc_line_re = re.compile(r'^\|\s*(?P[0-9]+)' + r'\s*\\\\\s*(?P[0-9]+)' + r'(\s*\\\\\s*(?P[^\\]*)' + r'(\s*\\\\\s*(?P[^\\]*)' + r'(\s*\\\\\s*(?P[^\\]*)' + r'(\s*\\\\\s*(?P[^\\]*)' + r'(\s*\\\\\s*(?P[^\\]*)' + r')?)?)?)?)?') f = urllib.urlopen(mcc_list_url) country = cc = '' for line in f.readlines(): line = line.strip() match = mnc_country_re.match(line) if match: country = match.group('country') cc = (match.group('cc') or '').lower() if '||' not in line: continue line = line.replace('||', '\\\\') match = mnc_line_re.match(line) if match: mnc_list = str2range(match.group('mnc')) for mnc in mnc_list: update_mncs(data, match.group('mcc'), mnc, country=country, cc=cc, brand=match.group('brand'), operator=match.group('operator'), status=match.group('status'), bands=match.group('bands')) def str2range(x): result = [] for part in x.split(','): if '-' in part: a, b = part.split('-') f = '%0' + str(len(b)) + 'd' a, b = int(a), int(b) for i in range(a, b + 1): result.append(f % (i)) else: a = part result.append(part) return result if __name__ == '__main__': # download/parse the information data = defaultdict(lambda: defaultdict(dict)) get_mncs_from_wikipedia(data) # print header print '# generated from various sources' print '# %s' % mcc_list_url # build an ordered list of mccs mcc_list = list(data.keys()) mcc_list.sort() # go over mccs for mcc in mcc_list: print '%s' % mcc # build an ordered list of mncs mnc_list = data[mcc].keys() mnc_list.sort() for mnc in mnc_list: info = data[mcc][mnc] infokeys = info.keys() infokeys.sort() print ' %s%s' % (mnc, ''.join([' %s="%s"' % (k, info[k]) for k in infokeys])) # try to get the length of mnc's try: l = len(mnc_list[0]) print ' %s-%s' % (l * '0', l * '9') except IndexError: pass # ignore python-stdnum-1.2/README0000644000000000000000000002076312606445151015037 0ustar rootroot00000000000000python-stdnum ============= A Python module to parse, validate and reformat standard numbers and codes in different formats. Available formats ----------------- Currently this package supports the following formats: * NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number) * CUIT (Código Único de Identificación Tributaria, Argentinian tax number) * Austrian Company Register Numbers * UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number) * BTW, TVA, NWSt (Belgian VAT number) * EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes) * PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner) * VAT (Идентификационен номер по ДДС, Bulgarian VAT number) * CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazillian company identifier) * CPF (Cadastro de Pessoas Físicas, Brazillian national identifier) * Swiss social security number ("Sozialversicherungsnummer") * UID (Unternehmens-Identifikationsnummer, Swiss business identifier) * VAT, MWST, TVA, IVA, TPV (Mehrwertsteuernummer, the Swiss VAT number) * RUT (Rol Único Tributario, Chilean national tax number) * RIC No. (Chinese Resident Identity Card Number) * NIT (Número De Identificación Tributaria, Colombian identity code) * CUSIP number (financial security identification number) * Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number) * DIČ (Daňové identifikační číslo, Czech VAT number) * RČ (Rodné číslo, the Czech birth number) * Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number) * Wertpapierkennnummer (German securities identification code) * CPR (personnummer, the Danish citizen number) * CVR (Momsregistreringsnummer, Danish VAT number) * Cedula (Dominican Republic national identification number) * RNC (Registro Nacional del Contribuyente, Dominican Republic tax number) * EAN (International Article Number) * CI (Cédula de identidad, Ecuadorian personal identity code) * RUC (Registro Único de Contribuyentes, Ecuadorian company tax number) * Isikukood (Estonian Personcal ID number) * KMKR (Käibemaksukohuslase, Estonian VAT number) * CIF (Certificado de Identificación Fiscal, Spanish company tax number) * DNI (Documento nacional de identidad, Spanish personal identity codes) * NIE (Número de Identificación de Extranjeros, Spanish foreigner number) * NIF (Número de Identificación Fiscal, Spanish VAT number) * SEPA Identifier of the Creditor (AT-02) * VAT (European Union VAT number) * ALV nro (Arvonlisäveronumero, Finnish VAT number) * Finnish Association Identifier * HETU (Henkilötunnus, Finnish personal identity code) * Y-tunnus (Finnish business identifier) * SIREN (a French company identification number) * n° TVA (taxe sur la valeur ajoutée, French VAT number) * SEDOL number (Stock Exchange Daily Official List number) * VAT (United Kingdom (and Isle of Man) VAT registration number) * FPA, ΦΠΑ, ΑΦΜ (Αριθμός Φορολογικού Μητρώου, the Greek VAT number) * GRid (Global Release Identifier) * OIB (Osobni identifikacijski broj, Croatian identification number) * ANUM (Közösségi adószám, Hungarian VAT number) * IBAN (International Bank Account Number) * PPS No (Personal Public Service Number, Irish personal number) * VAT (Irish VAT number) * IMEI (International Mobile Equipment Identity) * IMO number (International Maritime Organization number) * IMSI (International Mobile Subscriber Identity) * Kennitala (Icelandic personal and organisation identity code) * VSK number (Virðisaukaskattsnúmer, Icelandic VAT number) * ISAN (International Standard Audiovisual Number) * ISBN (International Standard Book Number) * ISIL (International Standard Identifier for Libraries) * ISIN (International Securities Identification Number) * ISMN (International Standard Music Number) * ISO 6346 (International standard for container identification) * ISO 9362 (Business identifier codes) * ISSN (International Standard Serial Number) * Codice Fiscale (Italian tax code for individuals) * Partita IVA (Italian VAT number) * PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number) * TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number) * PVN (Pievienotās vērtības nodokļa, Latvian VAT number) * MEID (Mobile Equipment Identifier) * VAT (Maltese VAT number) * RFC (Registro Federal de Contribuyentes, Mexican tax number) * NRIC No. (Malaysian National Registration Identity Card Number) * Brin number (Dutch number for schools) * BSN (Burgerservicenummer, Dutch national identification number) * BTW-nummer (Omzetbelastingnummer, the Dutch VAT number) * Onderwijsnummer (Dutch student school number) * Postcode (Dutch postal code) * MVA (Merverdiavgift, Norwegian VAT number) * Orgnr (Organisasjonsnummer, Norwegian organisation number) * NIP (Numer Identyfikacji Podatkowej, Polish VAT number) * PESEL (Polish national identification number) * REGON (Rejestr Gospodarki Narodowej, Polish register of economic units) * NIF (Número de identificação fiscal, Portuguese VAT number) * CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number) * CNP (Cod Numeric Personal, Romanian Numerical Personal Code) * ИНН (Идентификационный номер налогоплательщика, Russian tax identifier) * Orgnr (Organisationsnummer, Swedish company number) * VAT (Moms, Mervärdesskatt, Swedish VAT number) * ID za DDV (Davčna številka, Slovenian VAT number) * IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number) * RČ (Rodné číslo, the Slovak birth number) * COE (Codice operatore economico, San Marino national tax number) * ATIN (U.S. Adoption Taxpayer Identification Number) * EIN (U.S. Employer Identification Number) * ITIN (U.S. Individual Taxpayer Identification Number) * PTIN (U.S. Preparer Tax Identification Number) * RTN (Routing transport number) * SSN (U.S. Social Security Number) * TIN (U.S. Taxpayer Identification Number) Furthermore a number of generic check digit algorithms are available: * the Verhoeff algorithm * the Luhn and Luhn mod N algorithms * some algorithms described in ISO/IEC 7064: Mod 11, 2, Mod 37, 2, Mod 97, 10, Mod 11, 10 and Mod 37, 36 Basically any number or code that has some validation mechanism available or some common formatting is eligible for inclusion into this library. These modules generally do not provide background information on the meaning and use of the specified numbers, only parsing and handling functions. Interface --------- Most of these modules implement the following functions: validate() - validate the correctness of the passed number and return a compact representation of the number invalid numbers are rejected with one of the exceptions from the stdnum.exceptions module compact() - return a compact representation of the number or code this function generally does not do validation but may raise exceptions for wildly incorrect numbers format() - return a formatted version of the number in the preferred format this function generally expects to be passed a valid number or code Apart from the above, the module may add extra parsing, validation or conversion functions. Requirements ------------ The modules should not require any external Python modules and should be pure Python. The modules are developed and tested with Python 2.7 and 3.5 but may also work with older versions of Python. Copyright --------- Copyright (C) 2010-2015 Arthur de Jong and others 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 Feedback and bug reports ------------------------ If you have any questions regarding python-stdnum, would like to report a bug or request addition of a format please send an email to Patches and code contributions are more than welcome. python-stdnum-1.2/getisbn.py0000755000000000000000000000572212606424375016172 0ustar rootroot00000000000000#!/usr/bin/env python # getisbn.py - script to get ISBN prefix data # # Copyright (C) 2010, 2011, 2014 Arthur de Jong # # 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 """This script downloads XML data from the International ISBN Agency website and provides a compact form of all group prefixes, and registrant ranges for those prefixes suitable for the numdb module. This data is needed to correctly split ISBNs into an EAN.UCC prefix, a group prefix, a registrant, an item number and a check-digit.""" from xml.etree import ElementTree import urllib # the location of the ISBN Ranges XML file download_url = 'https://www.isbn-international.org/export_rangemessage.xml' def ranges(group): for rule in group.find('Rules').findall('Rule'): length = int(rule.find('Length').text.strip()) if length: yield '-'.join( x[:length] for x in rule.find('Range').text.strip().split('-')) def wrap(text): while text: i = len(text) if i > 73: i = text.rindex(',', 20, 73) yield text[:i] text = text[i + 1:] def get(f=None): if f is None: yield '# generated from RangeMessage.xml, downloaded from' yield '# %s' % download_url f = urllib.urlopen(download_url) else: yield '# generated from %r' % f # parse XML document msg = ElementTree.parse(f).getroot() # dump data from document yield '# file serial %s' % msg.find('MessageSerialNumber').text.strip() yield '# file date %s' % msg.find('MessageDate').text.strip() top_groups = dict( (x.find('Prefix').text.strip(), x) for x in msg.find('EAN.UCCPrefixes').findall('EAN.UCC')) prevtop = None for group in msg.find('RegistrationGroups').findall('Group'): top, prefix = group.find('Prefix').text.strip().split('-') agency = group.find('Agency').text.strip() if top != prevtop: yield top for line in wrap(','.join(ranges(top_groups[top]))): yield ' %s' % line prevtop = top yield ' %s agency="%s"' % (prefix, agency) for line in wrap(','.join(ranges(group))): yield ' %s' % line if __name__ == '__main__': # get('RangeMessage.xml') for row in get(): print row.encode('utf-8') python-stdnum-1.2/MANIFEST.in0000644000000000000000000000016512606445151015707 0ustar rootroot00000000000000include README NEWS ChangeLog COPYING *.py recursive-include tests *.doctest *.dat recursive-include docs *.rst *.py python-stdnum-1.2/getnumlist.py0000755000000000000000000000410612514260346016717 0ustar rootroot00000000000000#!/usr/bin/env python # getnumlist.py - script to get a list of number formats in stdnum # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """This script uses introspection to present a list of number formats suitable to be included in the README and stdnum package description.""" import pydoc from stdnum import util # these are excluded algortihms = ('stdnum.verhoeff', 'stdnum.luhn', 'stdnum.iso7064') def get_number_modules(): """Provides the number modules that are not algorithms.""" for module in util.get_number_modules(): if module.__name__ not in algortihms and \ not module.__name__.startswith('stdnum.iso7064'): yield module if __name__ == '__main__': print 'For README:' print '' for module in get_number_modules(): print ' * %s' % util.get_module_name(module) print '' print 'For stdnum/__init__.py:' print '' for module in get_number_modules(): print '* %s: %s' % ( module.__name__.replace('stdnum.', ''), util.get_module_name(module), ) print '' print 'For docs/index.rst:' print '' for module in get_number_modules(): print ' %s' % module.__name__.replace('stdnum.', '') print '' print 'For index.xml:' print '' for module in get_number_modules(): print '
  • %s
  • ' % util.get_module_name(module) python-stdnum-1.2/PKG-INFO0000644000000000000000000002326612606445507015262 0ustar rootroot00000000000000Metadata-Version: 1.1 Name: python-stdnum Version: 1.2 Summary: Python module to handle standardized numbers and codes Home-page: http://arthurdejong.org/python-stdnum/ Author: Arthur de Jong Author-email: arthur@arthurdejong.org License: LGPL Description: Parse, validate and reformat standard numbers and codes. This library offers functions for parsing, validating and reformatting standard numbers and codes in various formats. Currently this package supports the following formats: * al.nipt: NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number) * ar.cuit: CUIT (Código Único de Identificación Tributaria, Argentinian tax number) * at.businessid: Austrian Company Register Numbers * at.uid: UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number) * be.vat: BTW, TVA, NWSt (Belgian VAT number) * bg.egn: EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes) * bg.pnf: PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner) * bg.vat: VAT (Идентификационен номер по ДДС, Bulgarian VAT number) * br.cnpj: CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazillian company identifier) * br.cpf: CPF (Cadastro de Pessoas Físicas, Brazillian national identifier) * ch.ssn: Swiss social security number ("Sozialversicherungsnummer") * ch.uid: UID (Unternehmens-Identifikationsnummer, Swiss business identifier) * ch.vat: VAT, MWST, TVA, IVA, TPV (Mehrwertsteuernummer, the Swiss VAT number) * cl.rut: RUT (Rol Único Tributario, Chilean national tax number) * cn.ric: RIC No. (Chinese Resident Identity Card Number) * co.nit: NIT (Número De Identificación Tributaria, Colombian identity code) * cusip: CUSIP number (financial security identification number) * cy.vat: Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number) * cz.dic: DIČ (Daňové identifikační číslo, Czech VAT number) * cz.rc: RČ (Rodné číslo, the Czech birth number) * de.vat: Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number) * de.wkn: Wertpapierkennnummer (German securities identification code) * dk.cpr: CPR (personnummer, the Danish citizen number) * dk.cvr: CVR (Momsregistreringsnummer, Danish VAT number) * do.cedula: Cedula (Dominican Republic national identification number) * do.rnc: RNC (Registro Nacional del Contribuyente, Dominican Republic tax number) * ean: EAN (International Article Number) * ec.ci: CI (Cédula de identidad, Ecuadorian personal identity code) * ec.ruc: RUC (Registro Único de Contribuyentes, Ecuadorian company tax number) * ee.ik: Isikukood (Estonian Personcal ID number) * ee.kmkr: KMKR (Käibemaksukohuslase, Estonian VAT number) * es.cif: CIF (Certificado de Identificación Fiscal, Spanish company tax number) * es.dni: DNI (Documento nacional de identidad, Spanish personal identity codes) * es.nie: NIE (Número de Identificación de Extranjeros, Spanish foreigner number) * es.nif: NIF (Número de Identificación Fiscal, Spanish VAT number) * eu.at_02: SEPA Identifier of the Creditor (AT-02) * eu.vat: VAT (European Union VAT number) * fi.alv: ALV nro (Arvonlisäveronumero, Finnish VAT number) * fi.associationid: Finnish Association Identifier * fi.hetu: HETU (Henkilötunnus, Finnish personal identity code) * fi.ytunnus: Y-tunnus (Finnish business identifier) * fr.siren: SIREN (a French company identification number) * fr.tva: n° TVA (taxe sur la valeur ajoutée, French VAT number) * gb.sedol: SEDOL number (Stock Exchange Daily Official List number) * gb.vat: VAT (United Kingdom (and Isle of Man) VAT registration number) * gr.vat: FPA, ΦΠΑ, ΑΦΜ (Αριθμός Φορολογικού Μητρώου, the Greek VAT number) * grid: GRid (Global Release Identifier) * hr.oib: OIB (Osobni identifikacijski broj, Croatian identification number) * hu.anum: ANUM (Közösségi adószám, Hungarian VAT number) * iban: IBAN (International Bank Account Number) * ie.pps: PPS No (Personal Public Service Number, Irish personal number) * ie.vat: VAT (Irish VAT number) * imei: IMEI (International Mobile Equipment Identity) * imo: IMO number (International Maritime Organization number) * imsi: IMSI (International Mobile Subscriber Identity) * is_.kennitala: Kennitala (Icelandic personal and organisation identity code) * is_.vsk: VSK number (Virðisaukaskattsnúmer, Icelandic VAT number) * isan: ISAN (International Standard Audiovisual Number) * isbn: ISBN (International Standard Book Number) * isil: ISIL (International Standard Identifier for Libraries) * isin: ISIN (International Securities Identification Number) * ismn: ISMN (International Standard Music Number) * iso6346: ISO 6346 (International standard for container identification) * iso9362: ISO 9362 (Business identifier codes) * issn: ISSN (International Standard Serial Number) * it.codicefiscale: Codice Fiscale (Italian tax code for individuals) * it.iva: Partita IVA (Italian VAT number) * lt.pvm: PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number) * lu.tva: TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number) * lv.pvn: PVN (Pievienotās vērtības nodokļa, Latvian VAT number) * meid: MEID (Mobile Equipment Identifier) * mt.vat: VAT (Maltese VAT number) * mx.rfc: RFC (Registro Federal de Contribuyentes, Mexican tax number) * my.nric: NRIC No. (Malaysian National Registration Identity Card Number) * nl.brin: Brin number (Dutch number for schools) * nl.bsn: BSN (Burgerservicenummer, Dutch national identification number) * nl.btw: BTW-nummer (Omzetbelastingnummer, the Dutch VAT number) * nl.onderwijsnummer: Onderwijsnummer (Dutch student school number) * nl.postcode: Postcode (Dutch postal code) * no.mva: MVA (Merverdiavgift, Norwegian VAT number) * no.orgnr: Orgnr (Organisasjonsnummer, Norwegian organisation number) * pl.nip: NIP (Numer Identyfikacji Podatkowej, Polish VAT number) * pl.pesel: PESEL (Polish national identification number) * pl.regon: REGON (Rejestr Gospodarki Narodowej, Polish register of economic units) * pt.nif: NIF (Número de identificação fiscal, Portuguese VAT number) * ro.cf: CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number) * ro.cnp: CNP (Cod Numeric Personal, Romanian Numerical Personal Code) * ru.inn: ИНН (Идентификационный номер налогоплательщика, Russian tax identifier) * se.orgnr: Orgnr (Organisationsnummer, Swedish company number) * se.vat: VAT (Moms, Mervärdesskatt, Swedish VAT number) * si.ddv: ID za DDV (Davčna številka, Slovenian VAT number) * sk.dph: IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number) * sk.rc: RČ (Rodné číslo, the Slovak birth number) * sm.coe: COE (Codice operatore economico, San Marino national tax number) * us.atin: ATIN (U.S. Adoption Taxpayer Identification Number) * us.ein: EIN (U.S. Employer Identification Number) * us.itin: ITIN (U.S. Individual Taxpayer Identification Number) * us.ptin: PTIN (U.S. Preparer Tax Identification Number) * us.rtn: RTN (Routing transport number) * us.ssn: SSN (U.S. Social Security Number) * us.tin: TIN (U.S. Taxpayer Identification Number) Furthermore a number of generic check digit algorithms are available: * iso7064.mod_11_10: The ISO 7064 Mod 11, 10 algorithm * iso7064.mod_11_2: The ISO 7064 Mod 11, 2 algorithm * iso7064.mod_37_2: The ISO 7064 Mod 37, 2 algorithm * iso7064.mod_37_36: The ISO 7064 Mod 37, 36 algorithm * iso7064.mod_97_10: The ISO 7064 Mod 97, 10 algorithm * luhn: The Luhn and Luhn mod N algorithms * verhoeff: The Verhoeff algorithm All modules implement a common interface: >>> from stdnum import isbn >>> isbn.validate('978-9024538270') '9789024538270' >>> isbn.validate('978-9024538271') Traceback (most recent call last): ... InvalidChecksum: ... Apart from the validate() function, modules generally provide extra parsing, validation, formatting or conversion functions. Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Financial and Insurance Industry Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: Telecommunications Industry Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+) Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Topic :: Office/Business :: Financial Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Text Processing :: General python-stdnum-1.2/docs/0000755000000000000000000000000012606445507015104 5ustar rootroot00000000000000python-stdnum-1.2/docs/stdnum.eu.vat.rst0000644000000000000000000000011011721773163020340 0ustar rootroot00000000000000stdnum.eu.vat ============= .. automodule:: stdnum.eu.vat :members: python-stdnum-1.2/docs/stdnum.fi.associationid.rst0000644000000000000000000000014512606445152022371 0ustar rootroot00000000000000stdnum.fi.associationid ======================= .. automodule:: stdnum.fi.associationid :members:python-stdnum-1.2/docs/stdnum.es.dni.rst0000644000000000000000000000011011721773163020316 0ustar rootroot00000000000000stdnum.es.dni ============= .. automodule:: stdnum.es.dni :members: python-stdnum-1.2/docs/stdnum.imo.rst0000644000000000000000000000007612606445152017732 0ustar rootroot00000000000000stdnum.imo ========== .. automodule:: stdnum.imo :members:python-stdnum-1.2/docs/stdnum.us.ptin.rst0000644000000000000000000000011312261262700020527 0ustar rootroot00000000000000stdnum.us.ptin ============== .. automodule:: stdnum.us.ptin :members: python-stdnum-1.2/docs/stdnum.ie.pps.rst0000644000000000000000000000011012420731244020323 0ustar rootroot00000000000000stdnum.ie.pps ============= .. automodule:: stdnum.ie.pps :members: python-stdnum-1.2/docs/stdnum.isan.rst0000644000000000000000000000010211721773163020071 0ustar rootroot00000000000000stdnum.isan =========== .. automodule:: stdnum.isan :members: python-stdnum-1.2/docs/stdnum.meid.rst0000644000000000000000000000010211721773163020055 0ustar rootroot00000000000000stdnum.meid =========== .. automodule:: stdnum.meid :members: python-stdnum-1.2/docs/stdnum.lu.tva.rst0000644000000000000000000000011011721773163020347 0ustar rootroot00000000000000stdnum.lu.tva ============= .. automodule:: stdnum.lu.tva :members: python-stdnum-1.2/docs/stdnum.cusip.rst0000644000000000000000000000010412606445151020260 0ustar rootroot00000000000000stdnum.cusip ============ .. automodule:: stdnum.cusip :members:python-stdnum-1.2/docs/stdnum.eu.at_02.rst0000644000000000000000000000011612517406434020457 0ustar rootroot00000000000000stdnum.eu.at_02 =============== .. automodule:: stdnum.eu.at_02 :members: python-stdnum-1.2/docs/stdnum.mt.vat.rst0000644000000000000000000000011011721773163020347 0ustar rootroot00000000000000stdnum.mt.vat ============= .. automodule:: stdnum.mt.vat :members: python-stdnum-1.2/docs/stdnum.do.rnc.rst0000644000000000000000000000010712601744731020324 0ustar rootroot00000000000000stdnum.do.rnc ============= .. automodule:: stdnum.do.rnc :members:python-stdnum-1.2/docs/stdnum.ee.kmkr.rst0000644000000000000000000000011311721773163020475 0ustar rootroot00000000000000stdnum.ee.kmkr ============== .. automodule:: stdnum.ee.kmkr :members: python-stdnum-1.2/docs/stdnum.issn.rst0000644000000000000000000000010211721773163020113 0ustar rootroot00000000000000stdnum.issn =========== .. automodule:: stdnum.issn :members: python-stdnum-1.2/docs/stdnum.ar.cuit.rst0000644000000000000000000000011212601744731020502 0ustar rootroot00000000000000stdnum.ar.cuit ============== .. automodule:: stdnum.ar.cuit :members:python-stdnum-1.2/docs/stdnum.at.businessid.rst0000644000000000000000000000013412606445151021713 0ustar rootroot00000000000000stdnum.at.businessid ==================== .. automodule:: stdnum.at.businessid :members:python-stdnum-1.2/docs/stdnum.fr.tva.rst0000644000000000000000000000011011721773163020336 0ustar rootroot00000000000000stdnum.fr.tva ============= .. automodule:: stdnum.fr.tva :members: python-stdnum-1.2/docs/stdnum.sk.dph.rst0000644000000000000000000000011011721773163020325 0ustar rootroot00000000000000stdnum.sk.dph ============= .. automodule:: stdnum.sk.dph :members: python-stdnum-1.2/docs/stdnum.fi.hetu.rst0000644000000000000000000000011311721773163020503 0ustar rootroot00000000000000stdnum.fi.hetu ============== .. automodule:: stdnum.fi.hetu :members: python-stdnum-1.2/docs/stdnum.cz.rc.rst0000644000000000000000000000010511721773163020161 0ustar rootroot00000000000000stdnum.cz.rc ============ .. automodule:: stdnum.cz.rc :members: python-stdnum-1.2/docs/stdnum.ee.ik.rst0000644000000000000000000000010412606445151020130 0ustar rootroot00000000000000stdnum.ee.ik ============ .. automodule:: stdnum.ee.ik :members:python-stdnum-1.2/docs/stdnum.de.vat.rst0000644000000000000000000000011011721773163020317 0ustar rootroot00000000000000stdnum.de.vat ============= .. automodule:: stdnum.de.vat :members: python-stdnum-1.2/docs/stdnum.br.cnpj.rst0000644000000000000000000000011212606445151020470 0ustar rootroot00000000000000stdnum.br.cnpj ============== .. automodule:: stdnum.br.cnpj :members:python-stdnum-1.2/docs/stdnum.gb.sedol.rst0000644000000000000000000000011512606445152020635 0ustar rootroot00000000000000stdnum.gb.sedol =============== .. automodule:: stdnum.gb.sedol :members:python-stdnum-1.2/docs/stdnum.al.nipt.rst0000644000000000000000000000011212601744731020502 0ustar rootroot00000000000000stdnum.al.nipt ============== .. automodule:: stdnum.al.nipt :members:python-stdnum-1.2/docs/stdnum.ch.uid.rst0000644000000000000000000000010712606445151020312 0ustar rootroot00000000000000stdnum.ch.uid ============= .. automodule:: stdnum.ch.uid :members:python-stdnum-1.2/docs/stdnum.lt.pvm.rst0000644000000000000000000000011011721773163020356 0ustar rootroot00000000000000stdnum.lt.pvm ============= .. automodule:: stdnum.lt.pvm :members: python-stdnum-1.2/docs/conf.py0000644000000000000000000001422212154447010016371 0ustar rootroot00000000000000# -*- coding: utf-8 -*- # # python-stdnum documentation build configuration file, created by # sphinx-quickstart # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os import stdnum # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('..')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.autosummary' ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. source_encoding = 'utf-8' # The master toctree document. master_doc = 'index' # General information about the project. project = u'python-stdnum' copyright = u'2013, Arthur de Jong' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = stdnum.__version__ # The full version, including alpha/beta/rc tags. release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_*', '.svn'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['stdnum.', ] # Automatically generate stub pages for autosummary entries. autosummary_generate = True # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". #html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. html_show_sourcelink = False # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Suffix for generated links to HTML files. #html_link_suffix = '' # Output file base name for HTML help builder. htmlhelp_basename = 'python-stdnumdoc' # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'python-stdnum', u'python-stdnum Documentation', [u'Arthur de Jong'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False python-stdnum-1.2/docs/_templates/0000755000000000000000000000000012606445507017241 5ustar rootroot00000000000000python-stdnum-1.2/docs/_templates/autosummary/0000755000000000000000000000000012606445507021627 5ustar rootroot00000000000000python-stdnum-1.2/docs/_templates/autosummary/module.rst0000644000000000000000000000011411721773163023641 0ustar rootroot00000000000000{{ fullname }} {{ underline }} .. automodule:: {{ fullname }} :members: python-stdnum-1.2/docs/stdnum.pl.pesel.rst0000644000000000000000000000011512606445152020662 0ustar rootroot00000000000000stdnum.pl.pesel =============== .. automodule:: stdnum.pl.pesel :members:python-stdnum-1.2/docs/stdnum.us.tin.rst0000644000000000000000000000011012261262700020344 0ustar rootroot00000000000000stdnum.us.tin ============= .. automodule:: stdnum.us.tin :members: python-stdnum-1.2/docs/stdnum.ro.cnp.rst0000644000000000000000000000011011721773163020335 0ustar rootroot00000000000000stdnum.ro.cnp ============= .. automodule:: stdnum.ro.cnp :members: python-stdnum-1.2/docs/stdnum.ean.rst0000644000000000000000000000007711721773163017715 0ustar rootroot00000000000000stdnum.ean ========== .. automodule:: stdnum.ean :members: python-stdnum-1.2/docs/stdnum.cl.rut.rst0000644000000000000000000000010712601744731020350 0ustar rootroot00000000000000stdnum.cl.rut ============= .. automodule:: stdnum.cl.rut :members:python-stdnum-1.2/docs/stdnum.si.ddv.rst0000644000000000000000000000011011721773163020325 0ustar rootroot00000000000000stdnum.si.ddv ============= .. automodule:: stdnum.si.ddv :members: python-stdnum-1.2/docs/stdnum.sk.rc.rst0000644000000000000000000000010511721773163020162 0ustar rootroot00000000000000stdnum.sk.rc ============ .. automodule:: stdnum.sk.rc :members: python-stdnum-1.2/docs/stdnum.ru.inn.rst0000644000000000000000000000010712606445152020352 0ustar rootroot00000000000000stdnum.ru.inn ============= .. automodule:: stdnum.ru.inn :members:python-stdnum-1.2/docs/stdnum.imei.rst0000644000000000000000000000010211721773163020062 0ustar rootroot00000000000000stdnum.imei =========== .. automodule:: stdnum.imei :members: python-stdnum-1.2/docs/stdnum.exceptions.rst0000644000000000000000000000143212154624370021323 0ustar rootroot00000000000000stdnum.exceptions ================= .. automodule:: stdnum.exceptions :show-inheritance: :member-order: bysource :members: The exceptions are organised hierarchically in the following structure: :: ValidationError +-- InvalidFormat | +-- InvalidLength +-- InvalidChecksum +-- InvalidComponent It is possible to change the exception messages by setting the `message` class property. This allows localisation and application-specific error messages. >>> raise InvalidFormat() Traceback (most recent call last): ... InvalidChecksum: The number has an invalid format. >>> InvalidFormat.message = 'UNKNOWN' >>> raise InvalidFormat() Traceback (most recent call last): ... InvalidChecksum: UNKNOWN python-stdnum-1.2/docs/stdnum.dk.cvr.rst0000644000000000000000000000011011721773163020325 0ustar rootroot00000000000000stdnum.dk.cvr ============= .. automodule:: stdnum.dk.cvr :members: python-stdnum-1.2/docs/stdnum.it.iva.rst0000644000000000000000000000011012420732560020321 0ustar rootroot00000000000000stdnum.it.iva ============= .. automodule:: stdnum.it.iva :members: python-stdnum-1.2/docs/stdnum.iso9362.rst0000644000000000000000000000011212601744731020253 0ustar rootroot00000000000000stdnum.iso9362 ============== .. automodule:: stdnum.iso9362 :members:python-stdnum-1.2/docs/stdnum.ch.vat.rst0000644000000000000000000000010712606445151020323 0ustar rootroot00000000000000stdnum.ch.vat ============= .. automodule:: stdnum.ch.vat :members:python-stdnum-1.2/docs/stdnum.es.cif.rst0000644000000000000000000000011011721773163020305 0ustar rootroot00000000000000stdnum.es.cif ============= .. automodule:: stdnum.es.cif :members: python-stdnum-1.2/docs/stdnum.gb.vat.rst0000644000000000000000000000011011721773163020317 0ustar rootroot00000000000000stdnum.gb.vat ============= .. automodule:: stdnum.gb.vat :members: python-stdnum-1.2/docs/stdnum.isil.rst0000644000000000000000000000010211721773163020077 0ustar rootroot00000000000000stdnum.isil =========== .. automodule:: stdnum.isil :members: python-stdnum-1.2/docs/stdnum.cz.dic.rst0000644000000000000000000000011011721773163020310 0ustar rootroot00000000000000stdnum.cz.dic ============= .. automodule:: stdnum.cz.dic :members: python-stdnum-1.2/docs/stdnum.imsi.rst0000644000000000000000000000010211721773163020100 0ustar rootroot00000000000000stdnum.imsi =========== .. automodule:: stdnum.imsi :members: python-stdnum-1.2/docs/stdnum.se.orgnr.rst0000644000000000000000000000011512601744731020675 0ustar rootroot00000000000000stdnum.se.orgnr =============== .. automodule:: stdnum.se.orgnr :members:python-stdnum-1.2/docs/stdnum.is_.vsk.rst0000644000000000000000000000011212601744731020511 0ustar rootroot00000000000000stdnum.is_.vsk ============== .. automodule:: stdnum.is_.vsk :members:python-stdnum-1.2/docs/stdnum.cn.ric.rst0000644000000000000000000000011012517406434020310 0ustar rootroot00000000000000stdnum.cn.ric ============= .. automodule:: stdnum.cn.ric :members: python-stdnum-1.2/docs/stdnum.us.atin.rst0000644000000000000000000000011312261262700020510 0ustar rootroot00000000000000stdnum.us.atin ============== .. automodule:: stdnum.us.atin :members: python-stdnum-1.2/docs/stdnum.de.wkn.rst0000644000000000000000000000010712606445151020326 0ustar rootroot00000000000000stdnum.de.wkn ============= .. automodule:: stdnum.de.wkn :members:python-stdnum-1.2/docs/stdnum.bg.egn.rst0000644000000000000000000000011011721773163020276 0ustar rootroot00000000000000stdnum.bg.egn ============= .. automodule:: stdnum.bg.egn :members: python-stdnum-1.2/docs/stdnum.iso6346.rst0000644000000000000000000000011312517406434020254 0ustar rootroot00000000000000stdnum.iso6346 ============== .. automodule:: stdnum.iso6346 :members: python-stdnum-1.2/docs/stdnum.no.orgnr.rst0000644000000000000000000000011512601744731020702 0ustar rootroot00000000000000stdnum.no.orgnr =============== .. automodule:: stdnum.no.orgnr :members:python-stdnum-1.2/docs/stdnum.grid.rst0000644000000000000000000000010211721773163020064 0ustar rootroot00000000000000stdnum.grid =========== .. automodule:: stdnum.grid :members: python-stdnum-1.2/docs/stdnum.dk.cpr.rst0000644000000000000000000000011011721773163020317 0ustar rootroot00000000000000stdnum.dk.cpr ============= .. automodule:: stdnum.dk.cpr :members: python-stdnum-1.2/docs/stdnum.br.cpf.rst0000644000000000000000000000011011721773163020310 0ustar rootroot00000000000000stdnum.br.cpf ============= .. automodule:: stdnum.br.cpf :members: python-stdnum-1.2/docs/stdnum.se.vat.rst0000644000000000000000000000011011721773163020336 0ustar rootroot00000000000000stdnum.se.vat ============= .. automodule:: stdnum.se.vat :members: python-stdnum-1.2/docs/stdnum.iban.rst0000644000000000000000000000010212420731240020033 0ustar rootroot00000000000000stdnum.iban =========== .. automodule:: stdnum.iban :members: python-stdnum-1.2/docs/stdnum.it.codicefiscale.rst0000644000000000000000000000014612517406434022335 0ustar rootroot00000000000000stdnum.it.codicefiscale ======================= .. automodule:: stdnum.it.codicefiscale :members: python-stdnum-1.2/docs/index.rst0000644000000000000000000000627212606445151016747 0ustar rootroot00000000000000.. module:: stdnum python-stdnum ============= A Python module to parse, validate and reformat standard numbers and codes in different formats. It contains a large collection of number formats. Basically any number or code that has some validation mechanism available or some common formatting is eligible for inclusion in this library. http://arthurdejong.org/python-stdnum/ Common Interface ---------------- Most of the number format modules implement the following functions: .. function:: validate(number) Validate the number and return a compact, consistent representation of the number or code. If the validation fails, :mod:`an exception <.exceptions>` is raised that indicates the type of error. .. function:: is_valid(number) Return either True or False depending on whether the passed number is in any supported and valid form and passes all embedded checks of the number. This function should never raise an exception. .. function:: compact(number) Return a compact representation of the number or code. This function generally does not do validation but may raise exceptions for wildly invalid numbers. .. function:: format(number) Return a formatted version of the number in the preferred format. This function generally expects to be passed a valid number or code and may raise exceptions for invalid numbers. The check digit modules generally also provide the following functions: .. function:: checksum(number) Calculate the checksum over the provided number. This is generally a number that can be used to determine whether the provided number is valid. It depends on the algorithm which checksum is considered valid. .. function:: calc_check_digit(number) Calculate the check digit that should be added to the number to make it valid. Apart from the above, the modules may add extra parsing, validation or conversion functions. Helper modules -------------- .. autosummary:: :toctree: exceptions Generic check digit algorithms ------------------------------ .. autosummary:: :toctree: iso7064 luhn verhoeff Available formats ----------------- .. autosummary:: :toctree: al.nipt ar.cuit at.businessid at.uid be.vat bg.egn bg.pnf bg.vat br.cnpj br.cpf ch.ssn ch.uid ch.vat cl.rut cn.ric co.nit cusip cy.vat cz.dic cz.rc de.vat de.wkn dk.cpr dk.cvr do.cedula do.rnc ean ec.ci ec.ruc ee.ik ee.kmkr es.cif es.dni es.nie es.nif eu.at_02 eu.vat fi.alv fi.associationid fi.hetu fi.ytunnus fr.siren fr.tva gb.sedol gb.vat gr.vat grid hr.oib hu.anum iban ie.pps ie.vat imei imo imsi is_.kennitala is_.vsk isan isbn isil isin ismn iso6346 iso9362 issn it.codicefiscale it.iva lt.pvm lu.tva lv.pvn meid mt.vat mx.rfc my.nric nl.brin nl.bsn nl.btw nl.onderwijsnummer nl.postcode no.mva no.orgnr pl.nip pl.pesel pl.regon pt.nif ro.cf ro.cnp ru.inn se.orgnr se.vat si.ddv sk.dph sk.rc sm.coe us.atin us.ein us.itin us.ptin us.rtn us.ssn us.tin python-stdnum-1.2/docs/stdnum.ec.ruc.rst0000644000000000000000000000011012517406434020313 0ustar rootroot00000000000000stdnum.ec.ruc ============= .. automodule:: stdnum.ec.ruc :members: python-stdnum-1.2/docs/stdnum.iso7064.rst0000644000000000000000000000123112420731063020244 0ustar rootroot00000000000000stdnum.iso7064 ============== .. automodule:: stdnum.iso7064 :members: Mod 11, 10 ---------- :mod:`stdnum.iso7064.mod_11_10` .. automodule:: stdnum.iso7064.mod_11_10 :members: Mod 11, 2 --------- :mod:`stdnum.iso7064.mod_11_2` .. automodule:: stdnum.iso7064.mod_11_2 :members: Mod 37, 2 (Mod x, 2) -------------------- :mod:`stdnum.iso7064.mod_37_2` .. automodule:: stdnum.iso7064.mod_37_2 :members: Mod 37, 36 (Mod x+1, x) ----------------------- :mod:`stdnum.iso7064.mod_37_36` .. automodule:: stdnum.iso7064.mod_37_36 :members: Mod 97, 10 ---------- :mod:`stdnum.iso7064.mod_97_10` .. automodule:: stdnum.iso7064.mod_97_10 :members: python-stdnum-1.2/docs/stdnum.my.nric.rst0000644000000000000000000000011312261262700020506 0ustar rootroot00000000000000stdnum.my.nric ============== .. automodule:: stdnum.my.nric :members: python-stdnum-1.2/docs/stdnum.mx.rfc.rst0000644000000000000000000000010712606445152020336 0ustar rootroot00000000000000stdnum.mx.rfc ============= .. automodule:: stdnum.mx.rfc :members:python-stdnum-1.2/docs/stdnum.gr.vat.rst0000644000000000000000000000011011721773163020337 0ustar rootroot00000000000000stdnum.gr.vat ============= .. automodule:: stdnum.gr.vat :members: python-stdnum-1.2/docs/stdnum.fi.alv.rst0000644000000000000000000000011011721773163020315 0ustar rootroot00000000000000stdnum.fi.alv ============= .. automodule:: stdnum.fi.alv :members: python-stdnum-1.2/docs/stdnum.ch.ssn.rst0000644000000000000000000000011012517406434020330 0ustar rootroot00000000000000stdnum.ch.ssn ============= .. automodule:: stdnum.ch.ssn :members: python-stdnum-1.2/docs/stdnum.bg.vat.rst0000644000000000000000000000011011721773163020317 0ustar rootroot00000000000000stdnum.bg.vat ============= .. automodule:: stdnum.bg.vat :members: python-stdnum-1.2/docs/stdnum.fi.ytunnus.rst0000644000000000000000000000012312606445152021261 0ustar rootroot00000000000000stdnum.fi.ytunnus ================= .. automodule:: stdnum.fi.ytunnus :members:python-stdnum-1.2/docs/stdnum.lv.pvn.rst0000644000000000000000000000011011721773163020361 0ustar rootroot00000000000000stdnum.lv.pvn ============= .. automodule:: stdnum.lv.pvn :members: python-stdnum-1.2/docs/stdnum.pl.regon.rst0000644000000000000000000000011512606445152020664 0ustar rootroot00000000000000stdnum.pl.regon =============== .. automodule:: stdnum.pl.regon :members:python-stdnum-1.2/docs/stdnum.es.nie.rst0000644000000000000000000000011011721773163020317 0ustar rootroot00000000000000stdnum.es.nie ============= .. automodule:: stdnum.es.nie :members: python-stdnum-1.2/docs/stdnum.hu.anum.rst0000644000000000000000000000011311721773163020514 0ustar rootroot00000000000000stdnum.hu.anum ============== .. automodule:: stdnum.hu.anum :members: python-stdnum-1.2/docs/stdnum.es.nif.rst0000644000000000000000000000011011721773163020320 0ustar rootroot00000000000000stdnum.es.nif ============= .. automodule:: stdnum.es.nif :members: python-stdnum-1.2/docs/stdnum.pl.nip.rst0000644000000000000000000000011011721773163020336 0ustar rootroot00000000000000stdnum.pl.nip ============= .. automodule:: stdnum.pl.nip :members: python-stdnum-1.2/docs/stdnum.cy.vat.rst0000644000000000000000000000011011721773163020342 0ustar rootroot00000000000000stdnum.cy.vat ============= .. automodule:: stdnum.cy.vat :members: python-stdnum-1.2/docs/stdnum.nl.brin.rst0000644000000000000000000000011312261262700020471 0ustar rootroot00000000000000stdnum.nl.brin ============== .. automodule:: stdnum.nl.brin :members: python-stdnum-1.2/docs/stdnum.nl.btw.rst0000644000000000000000000000011011721773163020342 0ustar rootroot00000000000000stdnum.nl.btw ============= .. automodule:: stdnum.nl.btw :members: python-stdnum-1.2/docs/stdnum.us.ein.rst0000644000000000000000000000011012261262700020325 0ustar rootroot00000000000000stdnum.us.ein ============= .. automodule:: stdnum.us.ein :members: python-stdnum-1.2/docs/stdnum.nl.postcode.rst0000644000000000000000000000012712261262700021364 0ustar rootroot00000000000000stdnum.nl.postcode ================== .. automodule:: stdnum.nl.postcode :members: python-stdnum-1.2/docs/stdnum.us.itin.rst0000644000000000000000000000011312261262700020520 0ustar rootroot00000000000000stdnum.us.itin ============== .. automodule:: stdnum.us.itin :members: python-stdnum-1.2/docs/stdnum.isbn.rst0000644000000000000000000000010211721773163020072 0ustar rootroot00000000000000stdnum.isbn =========== .. automodule:: stdnum.isbn :members: python-stdnum-1.2/docs/stdnum.isin.rst0000644000000000000000000000010112606445152020075 0ustar rootroot00000000000000stdnum.isin =========== .. automodule:: stdnum.isin :members:python-stdnum-1.2/docs/stdnum.no.mva.rst0000644000000000000000000000010712601744731020337 0ustar rootroot00000000000000stdnum.no.mva ============= .. automodule:: stdnum.no.mva :members:python-stdnum-1.2/docs/stdnum.us.ssn.rst0000644000000000000000000000011011721773163020367 0ustar rootroot00000000000000stdnum.us.ssn ============= .. automodule:: stdnum.us.ssn :members: python-stdnum-1.2/docs/stdnum.nl.onderwijsnummer.rst0000644000000000000000000000015411721773163023006 0ustar rootroot00000000000000stdnum.nl.onderwijsnummer ========================= .. automodule:: stdnum.nl.onderwijsnummer :members: python-stdnum-1.2/docs/stdnum.pt.nif.rst0000644000000000000000000000011011721773163020334 0ustar rootroot00000000000000stdnum.pt.nif ============= .. automodule:: stdnum.pt.nif :members: python-stdnum-1.2/docs/stdnum.ec.ci.rst0000644000000000000000000000010512517406434020121 0ustar rootroot00000000000000stdnum.ec.ci ============ .. automodule:: stdnum.ec.ci :members: python-stdnum-1.2/docs/stdnum.ro.cf.rst0000644000000000000000000000010511721773163020151 0ustar rootroot00000000000000stdnum.ro.cf ============ .. automodule:: stdnum.ro.cf :members: python-stdnum-1.2/docs/stdnum.be.vat.rst0000644000000000000000000000011011721773163020315 0ustar rootroot00000000000000stdnum.be.vat ============= .. automodule:: stdnum.be.vat :members: python-stdnum-1.2/docs/stdnum.is_.kennitala.rst0000644000000000000000000000013412601744731021660 0ustar rootroot00000000000000stdnum.is_.kennitala ==================== .. automodule:: stdnum.is_.kennitala :members:python-stdnum-1.2/docs/stdnum.fr.siren.rst0000644000000000000000000000011611721773163020672 0ustar rootroot00000000000000stdnum.fr.siren =============== .. automodule:: stdnum.fr.siren :members: python-stdnum-1.2/docs/stdnum.ie.vat.rst0000644000000000000000000000011011721773163020324 0ustar rootroot00000000000000stdnum.ie.vat ============= .. automodule:: stdnum.ie.vat :members: python-stdnum-1.2/docs/stdnum.ismn.rst0000644000000000000000000000010211721773163020105 0ustar rootroot00000000000000stdnum.ismn =========== .. automodule:: stdnum.ismn :members: python-stdnum-1.2/docs/stdnum.bg.pnf.rst0000644000000000000000000000011011721773163020310 0ustar rootroot00000000000000stdnum.bg.pnf ============= .. automodule:: stdnum.bg.pnf :members: python-stdnum-1.2/docs/stdnum.us.rtn.rst0000644000000000000000000000011012517406434020365 0ustar rootroot00000000000000stdnum.us.rtn ============= .. automodule:: stdnum.us.rtn :members: python-stdnum-1.2/docs/stdnum.co.nit.rst0000644000000000000000000000010712601744731020333 0ustar rootroot00000000000000stdnum.co.nit ============= .. automodule:: stdnum.co.nit :members:python-stdnum-1.2/docs/stdnum.nl.bsn.rst0000644000000000000000000000011011721773163020330 0ustar rootroot00000000000000stdnum.nl.bsn ============= .. automodule:: stdnum.nl.bsn :members: python-stdnum-1.2/docs/stdnum.hr.oib.rst0000644000000000000000000000011011721773163020317 0ustar rootroot00000000000000stdnum.hr.oib ============= .. automodule:: stdnum.hr.oib :members: python-stdnum-1.2/docs/stdnum.do.cedula.rst0000644000000000000000000000012012601744731020772 0ustar rootroot00000000000000stdnum.do.cedula ================ .. automodule:: stdnum.do.cedula :members:python-stdnum-1.2/docs/stdnum.verhoeff.rst0000644000000000000000000000011611721773163020750 0ustar rootroot00000000000000stdnum.verhoeff =============== .. automodule:: stdnum.verhoeff :members: python-stdnum-1.2/docs/stdnum.at.uid.rst0000644000000000000000000000011011721773163020322 0ustar rootroot00000000000000stdnum.at.uid ============= .. automodule:: stdnum.at.uid :members: python-stdnum-1.2/docs/stdnum.sm.coe.rst0000644000000000000000000000010712601744731020325 0ustar rootroot00000000000000stdnum.sm.coe ============= .. automodule:: stdnum.sm.coe :members:python-stdnum-1.2/docs/stdnum.luhn.rst0000644000000000000000000000010211721773163020105 0ustar rootroot00000000000000stdnum.luhn =========== .. automodule:: stdnum.luhn :members: python-stdnum-1.2/setup.cfg0000644000000000000000000000054512606445507016001 0ustar rootroot00000000000000[sdist] owner = root group = root [nosetests] with-doctest = true doctest-extension = doctest doctest-options = +IGNORE_EXCEPTION_DETAIL with-coverage = true cover-branches = true cover-package = stdnum cover-erase = true cover-html = true cover-html-dir = coverage [build_sphinx] all_files = 1 [egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 python-stdnum-1.2/stdnum/0000755000000000000000000000000012606445507015466 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/ro/0000755000000000000000000000000012606445507016106 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/ro/__init__.py0000644000000000000000000000164111720140726020210 0ustar rootroot00000000000000# __init__.py - collection of Romanian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Romanian numbers.""" # provide vat as an alias from stdnum.ro import cf as vat python-stdnum-1.2/stdnum/ro/cf.py0000644000000000000000000000526412606424566017061 0ustar rootroot00000000000000# cf.py - functions for handling Romanian CF (VAT) numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number). The Romanian CF is used for VAT purposes and can be from 2 to 10 digits long. >>> validate('RO 185 472 90') '18547290' >>> validate('185 472 91') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('1630615123457') # personal code '1630615123457' """ from stdnum.exceptions import * from stdnum.ro import cnp from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('RO'): number = number[2:] return number def calc_check_digit(number): """Calculate the check digit for organisations. The number passed should not have the check digit included.""" weights = (7, 5, 3, 2, 1, 7, 5, 3, 2) number = (9 - len(number)) * '0' + number check = 10 * sum(w * int(n) for w, n in zip(weights, number)) return str(check % 11 % 10) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit() or number[0] == '0': raise InvalidFormat() if len(number) == 13: # apparently a CNP can also be used (however, not all sources agree) cnp.validate(number) elif 2 <= len(number) <= 10: if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() else: raise InvalidLength() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ro/cnp.py0000644000000000000000000000672512606424566017254 0ustar rootroot00000000000000# cnp.py - functions for handling Romanian CNP numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """CNP (Cod Numeric Personal, Romanian Numerical Personal Code). The CNP is a 13 digit number that includes information on the person's gender, birth date and country zone. >>> validate('1630615123457') '1630615123457' >>> validate('8800101221144') # invalid first digit Traceback (most recent call last): ... InvalidFormat: ... >>> validate('1632215123457') # invalid date Traceback (most recent call last): ... InvalidComponent: ... >>> validate('1630615123458') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... """ import datetime from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').upper().strip() def calc_check_digit(number): """Calculate the check digit for personal codes. The number passed should not have the check digit included.""" # note that this algorithm has not been confirmed by an independent source weights = (2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9) check = sum(w * int(n) for w, n in zip(weights, number)) % 11 return '1' if check == 10 else str(check) def get_birth_date(number): """Split the date parts from the number and return the birth date.""" centuries = { '1': 1900, '2': 1900, '3': 1800, '4': 1800, '5': 2000, '6': 2000, } # we assume 1900 for the others in order to try to construct a date year = int(number[1:3]) + centuries.get(number[0], 1900) month = int(number[3:5]) day = int(number[5:7]) try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) # first digit should be a known one (9=foreigner) if not number.isdigit() or number[0] not in '1234569': raise InvalidFormat() if len(number) != 13: raise InvalidLength() # check if birth date is valid birth_date = get_birth_date(number) # TODO: check that the birth date is not in the future # number[7:9] is the county, we ignore it for now, just check last digit if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/luhn.py0000644000000000000000000000526212606276271017013 0ustar rootroot00000000000000# luhn.py - functions for performing the Luhn and Luhn mod N algorithms # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """The Luhn and Luhn mod N algorithms. The Luhn algorithm is used to detect most accidental errors in various identification numbers. >>> validate('7894') Traceback (most recent call last): ... InvalidChecksum: ... >>> checksum('7894') 6 >>> calc_check_digit('7894') '9' >>> validate('78949') '78949' An alternative alphabet can be provided to use the Luhn mod N algorithm. The default alphabet is '0123456789'. >>> validate('1234', alphabet='0123456789abcdef') Traceback (most recent call last): ... InvalidChecksum: ... >>> checksum('1234', alphabet='0123456789abcdef') 14 """ from stdnum.exceptions import * def checksum(number, alphabet='0123456789'): """Calculate the Luhn checksum over the provided number. The checksum is returned as an int. Valid numbers should have a checksum of 0.""" n = len(alphabet) number = tuple(alphabet.index(i) for i in reversed(str(number))) return (sum(number[::2]) + sum(sum(divmod(i * 2, n)) for i in number[1::2])) % n def validate(number, alphabet='0123456789'): """Checks to see if the number provided passes the Luhn checksum.""" if not bool(number): raise InvalidFormat() try: valid = checksum(number, alphabet) == 0 except Exception: raise InvalidFormat() if not valid: raise InvalidChecksum() return number def is_valid(number, alphabet='0123456789'): """Checks to see if the number provided passes the Luhn checksum.""" try: return bool(validate(number, alphabet)) except ValidationError: return False def calc_check_digit(number, alphabet='0123456789'): """With the provided number, calculate the extra digit that should be appended to make it pass the Luhn checksum.""" ck = checksum(str(number) + alphabet[0], alphabet) return alphabet[-ck] python-stdnum-1.2/stdnum/dk/0000755000000000000000000000000012606445507016064 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/dk/cpr.py0000644000000000000000000000670112606424566017230 0ustar rootroot00000000000000# cpr.py - functions for handling Danish CPR numbers # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """CPR (personnummer, the Danish citizen number). The CPR is the national number to identify Danish citizens. The number consists of 10 digits in the format DDMMYY-SSSS where the first part represents the birth date and the second a sequence number. The first digit of the sequence number indicates the century. The numbers used to validate using a checksum but since the sequence numbers ran out this was abandoned in 2007. >>> validate('211062-5629') '2110625629' >>> checksum('2110625629') 0 >>> validate('511062-5629') # invalid date Traceback (most recent call last): ... InvalidComponent: ... >>> get_birth_date('2110620629') datetime.date(1962, 10, 21) >>> get_birth_date('2110525629') datetime.date(2052, 10, 21) >>> format('2110625629') '211062-5629' """ import datetime from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').strip() def checksum(number): """Calculate the checksum. Note that the checksum isn't actually used any more. Valid numbers used to have a checksum of 0.""" weights = (4, 3, 2, 7, 6, 5, 4, 3, 2, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 11 def get_birth_date(number): """Split the date parts from the number and return the birth date.""" day = int(number[0:2]) month = int(number[2:4]) year = int(number[4:6]) if number[6] in '5678' and year >= 58: year += 1800 elif number[6] in '0123' or (number[6] in '49' and year >= 37): year += 1900 else: year += 2000 try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def validate(number): """Checks to see if the number provided is a valid CPR number. This checks the length, formatting, embedded date and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 10: raise InvalidLength() # check if birth date is valid birth_date = get_birth_date(number) # TODO: check that the birth date is not in the future return number def is_valid(number): """Checks to see if the number provided is a valid CPR number. This checks the length, formatting, embedded date and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return '-'.join((number[:6], number[6:])) python-stdnum-1.2/stdnum/dk/__init__.py0000644000000000000000000000163611720140741020167 0ustar rootroot00000000000000# __init__.py - collection of Danish numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Danish numbers.""" # provide vat as an alias from stdnum.dk import cvr as vat python-stdnum-1.2/stdnum/dk/cvr.py0000644000000000000000000000435212606424566017236 0ustar rootroot00000000000000# cvr.py - functions for handling Danish CVR numbers # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """CVR (Momsregistreringsnummer, Danish VAT number). The CVR (Momsregistreringsnummer, VAT) is an 8 digit number with a straightforward check mechanism. >>> validate('DK 13585628') '13585628' >>> validate('DK 13585627') Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.,/:').upper().strip() if number.startswith('DK'): number = number[2:] return number def checksum(number): """Calculate the checksum.""" weights = (2, 7, 6, 5, 4, 3, 2, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 11 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit() or number[0] == '0': raise InvalidFormat() if len(number) != 8: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/cz/0000755000000000000000000000000012606445507016102 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/cz/rc.py0000644000000000000000000000740712154624370017063 0ustar rootroot00000000000000# rc.py - functions for handling Czech birth numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """RČ (Rodné číslo, the Czech birth number). The birth number (RČ, Rodné číslo) is the Czech national identifier. The number can be 9 or 10 digits long. Numbers given out after January 1st 1954 should have 10 digits. The number includes the birth date of the person and their gender. This number is identical to the Slovak counterpart. >>> validate('710319/2745') '7103192745' >>> validate('991231123') '991231123' >>> validate('7103192746') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('1103492745') # invalid date Traceback (most recent call last): ... InvalidComponent: ... >>> validate('590312/123') # 9 digit number in 1959 Traceback (most recent call last): ... InvalidLength: ... >>> format('7103192745') '710319/2745' """ import datetime from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' /').upper().strip() def get_birth_date(number): """Split the date parts from the number and return the birth date.""" year = 1900 + int(number[0:2]) # females have 50 added to the month value, 20 is added when the serial # overflows (since 2004) month = int(number[2:4]) % 50 % 20 day = int(number[4:6]) # 9 digit numbers were used until January 1st 1954 if len(number) == 9: if year >= 1980: year -= 100 if year > 1953: raise InvalidLength('No 9 digit birth numbers after 1953.') elif year < 1954: year += 100 try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def validate(number): """Checks to see if the number provided is a valid birth number. This checks the length, formatting, embedded date and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) not in (9, 10): raise InvalidLength() # check if birth date is valid birth_date = get_birth_date(number) # TODO: check that the birth date is not in the future # check the check digit (10 digit numbers only) if len(number) == 10: check = int(number[:-1]) % 11 # before 1985 the checksum could be 0 or 10 if birth_date < datetime.date(1985, 1, 1): check = check % 10 if number[-1] != str(check): raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid birth number. This checks the length, formatting, embedded date and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:6] + '/' + number[6:] python-stdnum-1.2/stdnum/cz/__init__.py0000644000000000000000000000163411720140731020202 0ustar rootroot00000000000000# __init__.py - collection of Czech numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Czech numbers.""" # provide vat as an alias from stdnum.cz import dic as vat python-stdnum-1.2/stdnum/cz/dic.py0000644000000000000000000000673212604235623017215 0ustar rootroot00000000000000# dic.py - functions for handling Czech VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """DIČ (Daňové identifikační číslo, Czech VAT number). The number is an 8, 9 or 10 digit code that includes a check digit and is used to uniquely identify taxpayers for VAT (DPH in Czech). The number can refer to legal entities (8 digit numbers), individuals with a RČ (the 9 or 10 digit Czech birth number) or individuals without a RČ (9 digit numbers that begin with a 6). >>> compact('CZ 25123891') '25123891' >>> validate('25123891') # legal entity '25123891' >>> validate('25123890') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('7103192745') # RČ '7103192745' >>> validate('640903926') # special case '640903926' """ from stdnum.cz import rc from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' /').upper().strip() if number.startswith('CZ'): number = number[2:] return number def calc_check_digit_legal(number): """Calculate the check digit for 8 digit legal entities. The number passed should not have the check digit included.""" check = (11 - sum((8 - i) * int(n) for i, n in enumerate(number))) % 11 return str((check or 1) % 10) def calc_check_digit_special(number): """Calculate the check digit for special cases. The number passed should not have the first and last digits included.""" check = (11 - sum((8 - i) * int(n) for i, n in enumerate(number))) % 11 return str(9 - check % 10) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) == 8: # legal entities if number.startswith('9'): raise InvalidComponent() if calc_check_digit_legal(number[:-1]) != number[-1]: raise InvalidChecksum() elif len(number) == 9 and number.startswith('6'): # special cases (skip first digit in calculation) if calc_check_digit_special(number[1:-1]) != number[-1]: raise InvalidChecksum() elif len(number) in (9, 10): # 9 or 10 digit individual rc.validate(number) else: raise InvalidLength() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/imsi.dat0000644000000000000000000101052112606431702017111 0ustar rootroot00000000000000# generated from various sources # https://en.wikipedia.org/w/index.php?title=Mobile_country_code&action=raw 001 01 bands="GSM 900 / GSM 1800" brand="TEST" country="Test networks" operator="Test Network" status="Operational" 00-99 202 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Cosmote" cc="gr" country="Greece" operator="COSMOTE - Mobile Telecommunications S.A." status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Cosmote" cc="gr" country="Greece" operator="COSMOTE - Mobile Telecommunications S.A." status="Operational" 03 bands="" cc="gr" country="Greece" operator="OTE" status="" 04 bands="" cc="gr" country="Greece" operator="EDISY" status="" 05 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Vodafone" cc="gr" country="Greece" operator="Vodafone Greece" status="Operational" 06 bands="" cc="gr" country="Greece" operator="Cosmoline" status="" 07 bands="" cc="gr" country="Greece" operator="AMD Telecom" status="" 09 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Wind" cc="gr" country="Greece" operator="Wind Hellas Telecommunications S.A." status="Operational" 10 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Wind" cc="gr" country="Greece" operator="Wind Hellas Telecommunications S.A." status="Operational" 14 bands="MVNO" brand="Cyta Hellas" cc="gr" country="Greece" operator="CYTA" status="Operational" 00-99 204 01 bands="" cc="nl" country="Netherlands" operator="RadioAccess Network Services BV" status="" 02 bands="LTE 800 / LTE 2600" brand="Tele2" cc="nl" country="Netherlands" operator="Tele2 Nederland B.V." status="Operational" 03 bands="MVNE / PrivateGSM 1800" brand="Voiceworks" cc="nl" country="Netherlands" operator="Voiceworks B.V." status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Vodafone" cc="nl" country="Netherlands" operator="Vodafone Libertel B.V." status="Operational" 05 bands="" cc="nl" country="Netherlands" operator="Elephant Talk Communications Premium Rate Services" status="" 06 bands="MVNO" brand="Vectone Mobile / Delight Mobile" cc="nl" country="Netherlands" operator="Mundio Mobile (Netherlands) Ltd" status="Operational" 07 bands="MVNE" cc="nl" country="Netherlands" operator="Teleena (MVNE)" status="Operational" 08 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="KPN" cc="nl" country="Netherlands" operator="KPN Mobile The Netherlands B.V." status="Operational" 09 bands="MVNO" brand="Lycamobile" cc="nl" country="Netherlands" operator="Lycamobile Netherlands Limited" status="Operational" 10 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="KPN" cc="nl" country="Netherlands" operator="KPN B.V." status="Operational" 11 bands="" cc="nl" country="Netherlands" operator="VoipIT B.V." status="" 12 brand="Telfort" cc="nl" country="Netherlands" operator="KPN Mobile The Netherlands B.V." status="Operational" 13 bands="" cc="nl" country="Netherlands" operator="Unica Installatietechniek B.V." status="" 14 cc="nl" country="Netherlands" operator="6GMOBILE B.V." status="Reserved" 15 bands="LTE 2600" brand="Ziggo" cc="nl" country="Netherlands" operator="Ziggo B.V." status="Operational" 16 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="T-Mobile (BEN)" cc="nl" country="Netherlands" operator="T-Mobile Netherlands B.V" status="Operational" 17 bands="MVNE" brand="Intercity Zakelijk" cc="nl" country="Netherlands" operator="Intercity Mobile Communications B.V." status="Operational" 18 bands="MVNO" cc="nl" country="Netherlands" operator="UPC Nederland B.V." status="Operational" 19 bands="" cc="nl" country="Netherlands" operator="Mixe Communication Solutions B.V." status="" 20 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="T-Mobile" cc="nl" country="Netherlands" operator="T-Mobile Netherlands B.V" status="Operational" 21 bands="GSM-R 900" cc="nl" country="Netherlands" operator="ProRail B.V." status="Operational" 22 bands="" cc="nl" country="Netherlands" operator="Ministerie van Defensie" status="" 23 bands="MVNE" cc="nl" country="Netherlands" operator="ASPIDER Solutions Nederland B.V." status="Operational" 24 bands="" cc="nl" country="Netherlands" operator="Private Mobility Nederland B.V." status="" 25 bands="PrivateGSM 1800" cc="nl" country="Netherlands" operator="CapX B.V." status="Operational" 26 bands="" cc="nl" country="Netherlands" operator="SpeakUp B.V." status="" 27 bands="" cc="nl" country="Netherlands" operator="Breezz Nederland B.V." status="" 28 bands="" cc="nl" country="Netherlands" operator="Lancelot B.V." status="" 29 bands="" cc="nl" country="Netherlands" operator="Private Mobile Ltd" status="" 60 bands="" cc="nl" country="Netherlands" operator="Nextgen Mobile Ltd" status="" 61 bands="MVNO" cc="nl" country="Netherlands" operator="BodyTrace Netherlands B.V." status="Operational" 62 bands="MVNO" brand="Voxbone" cc="nl" country="Netherlands" operator="Voxbone mobile" status="Operational" 64 bands="" cc="nl" country="Netherlands" operator="Zetacom B.V." status="" 65 bands="" cc="nl" country="Netherlands" operator="AGMS Netherlands B.V." status="" 66 bands="CDMA 450" cc="nl" country="Netherlands" operator="Utility Connect B.V." status="Operational" 67 bands="PrivateGSM 1800" cc="nl" country="Netherlands" operator="RadioAccess B.V." status="Operational" 68 bands="" cc="nl" country="Netherlands" operator="Roamware (Netherlands) B.V." status="" 69 cc="nl" country="Netherlands" operator="KPN Mobile The Netherlands B.V." status="" 00-99 206 00 bands="" brand="Proximus" cc="be" country="Belgium" operator="Belgacom Mobile" status="" 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Proximus" cc="be" country="Belgium" operator="Belgacom Mobile" status="Operational" 02 bands="GSM-R" cc="be" country="Belgium" operator="N.M.B.S." status="Operational" 05 bands="MVNO" brand="Telenet" cc="be" country="Belgium" operator="Telenet" status="Operational" 06 bands="MVNO" brand="Lycamobile" cc="be" country="Belgium" operator="Lycamobile sprl" status="Operational" 07 bands="MVNO" brand="Vectone Mobile" cc="be" country="Belgium" operator="Mundio Mobile Belgium nv" status="Reserved" 09 bands="MVNO" brand="Voxbone" cc="be" country="Belgium" operator="Voxbone mobile" status="Operational" 10 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800" brand="Mobistar" cc="be" country="Belgium" operator="Orange S.A." status="Operational" 15 bands="" cc="be" country="Belgium" operator="Elephant Talk Communications Schweiz GmbH" status="Not operational" 20 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="BASE" cc="be" country="Belgium" operator="KPN Group Belgium" status="Operational" 40 bands="MVNO" cc="be" country="Belgium" operator="JOIN Experience (Belgium)" status="Operational" 00-99 208 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 2600" brand="Orange" cc="fr" country="France" operator="Orange S.A." status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Orange" cc="fr" country="France" operator="Orange S.A." status="Operational" 03 bands="MVNO" brand="MobiquiThings" cc="fr" country="France" operator="MobiquiThings" status="Operational" 04 bands="MVNO" brand="Sisteer" cc="fr" country="France" operator="Societe d'ingenierie systeme telecom et reseaux" status="Operational" 05 bands="Satellite" cc="fr" country="France" operator="Globalstar Europe" status="Operational" 06 bands="Satellite" cc="fr" country="France" operator="Globalstar Europe" status="Operational" 07 bands="Satellite" cc="fr" country="France" operator="Globalstar Europe" status="Operational" 08 bands="MVNO" brand="Completel Mobile" cc="fr" country="France" operator="Completel" status="Operational" 09 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 2600" brand="SFR" cc="fr" country="France" operator="Vivendi" status="Operational" 10 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 2600" brand="SFR" cc="fr" country="France" operator="Vivendi" status="Operational" 11 bands="UMTS 2100" brand="SFR" cc="fr" country="France" operator="Vivendi" status="Operational" 12 bands="" cc="fr" country="France" operator="Hewlett-Packard France" status="" 13 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="SFR" cc="fr" country="France" operator="Vivendi" status="Operational" 14 bands="GSM-R" brand="RFF" cc="fr" country="France" operator="RFF" status="Operational" 15 bands="UMTS 900 / UMTS 2100 / LTE 2600" brand="Free Mobile" cc="fr" country="France" operator="Iliad" status="Operational" 16 bands="UMTS 900 / UMTS 2100 / LTE 2600" brand="Free Mobile" cc="fr" country="France" operator="Iliad" status="Operational" 17 bands="" brand="LEGOS" cc="fr" country="France" operator="Local Exchange Global Operation Services" status="" 18 bands="MVNO" brand="Voxbone" cc="fr" country="France" operator="Voxbone mobile" status="Operational" 20 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Bouygues" cc="fr" country="France" operator="Bouygues Telecom" status="Operational" 21 bands="GSM 900 / GSM 1800 / UMTS 2100 / UMTS 900" brand="Bouygues" cc="fr" country="France" operator="Bouygues Telecom" status="" 22 bands="" brand="Transatel Mobile" cc="fr" country="France" operator="Transatel" status="" 23 bands="MVNO" cc="fr" country="France" operator="Omea Telecom" status="Operational" 24 bands="MVNO" brand="MobiquiThings" cc="fr" country="France" operator="MobiquiThings" status="Operational" 25 bands="MVNO" brand="LycaMobile" cc="fr" country="France" operator="LycaMobile" status="Operational" 26 bands="MVNO" brand="NRJ Mobile" cc="fr" country="France" operator="Euro-Information Telecom SAS" status="Operational" 27 bands="" cc="fr" country="France" operator="Afone" status="" 28 bands="" cc="fr" country="France" operator="Airbus Defence and Space SAS" status="" 29 bands="" cc="fr" country="France" operator="Société International Mobile Communication" status="Not operational" 30 bands="" cc="fr" country="France" operator="Symacom" status="" 31 bands="MVNO" brand="Vectone Mobile" cc="fr" country="France" operator="Mundio Mobile" status="Operational" 88 bands="GSM 900 / GSM 1800" brand="Bouygues" cc="fr" country="France" operator="Bouygues Telecom" status="Operational" 89 bands="" cc="fr" country="France" operator="Omer Telecom Ltd" status="Not operational" 90 bands="" cc="fr" country="France" operator="Images & Réseaux" status="" 91 bands="" cc="fr" country="France" operator="Orange S.A." status="" 92 bands="TD-LTE 2300 / LTE 2600" brand="Com4Innov" cc="fr" country="France" operator="Association Plate-forme Télécom" status="Operational" 93 bands="" cc="fr" country="France" operator="TDF" status="" 94 bands="" cc="fr" country="France" operator="Halys" status="" 00-99 212 01 bands="GSM 1800 / UMTS 2100 / LTE 2600" brand="Office des Telephones" cc="mc" country="Monaco" operator="Monaco Telecom" status="Operational" 00-99 213 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Mobiland" cc="ad" country="Andorra" operator="Servei De Tele. DAndorra" status="Operational" 00-99 214 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Vodafone" cc="es" country="Spain" operator="Vodafone Spain" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Orange" cc="es" country="Spain" operator="France Telecom España SA" status="Operational" 04 bands="GSM 1800 / UMTS 2100 / LTE 1800" brand="Yoigo" cc="es" country="Spain" operator="Xfera Moviles SA" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="TME" cc="es" country="Spain" operator="Telefónica Móviles España" status="Operational" 06 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Vodafone" cc="es" country="Spain" operator="Vodafone Spain" status="Operational" 07 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="movistar" cc="es" country="Spain" operator="Telefónica Móviles España" status="Operational" 08 bands="MVNO" brand="Euskaltel" cc="es" country="Spain" status="Operational" 09 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Orange" cc="es" country="Spain" operator="France Telecom España SA" status="Operational" 10 bands="" cc="es" country="Spain" operator="Operadora de Telecomunicaciones Opera SL" status="" 11 bands="" brand="Orange" cc="es" country="Spain" operator="France Telecom España SA" status="" 12 bands="" cc="es" country="Spain" operator="Contacta Servicios Avanzados de Telecomunicaciones SL" status="" 13 bands="" cc="es" country="Spain" operator="Incotel Ingeniera y Consultaria SL" status="" 14 bands="" cc="es" country="Spain" operator="Incotel Servicioz Avanzados SL" status="" 15 bands="MVNO" brand="BT" cc="es" country="Spain" operator="BT Group España Compañia de Servicios Globales de Telecomunicaciones S.A.U." status="Operational" 16 bands="MVNO" brand="TeleCable" cc="es" country="Spain" operator="Telecable de Asturias S.A.U." status="Operational" 17 bands="MVNO" brand="Móbil R" cc="es" country="Spain" operator="R Cable y Telecomunicaciones Galicia S.A." status="Operational" 18 bands="MVNO" brand="ONO" cc="es" country="Spain" operator="Cableuropa S.A.U." status="Operational" 19 bands="MVNO" brand="Simyo" cc="es" country="Spain" operator="E-PLUS Moviles Virtuales España S.L.U." status="Operational" 20 bands="MVNO" brand="Fonyou" cc="es" country="Spain" operator="Fonyou Telecom S.L." status="Operational" 21 bands="MVNO" brand="Jazztel" cc="es" country="Spain" operator="Jazz Telecom S.A.U." status="Operational" 22 bands="MVNO" brand="DigiMobil" cc="es" country="Spain" operator="Best Spain Telecom" status="Operational" 23 bands="MVNO" brand="Barablu" cc="es" country="Spain" operator="Barablu Móvil España" status="" 24 bands="MVNO" brand="Eroski" cc="es" country="Spain" operator="Eroski Móvil España" status="Operational" 25 bands="MVNO" brand="Lycamobile" cc="es" country="Spain" operator="LycaMobile S.L." status="Operational" 26 bands="" cc="es" country="Spain" operator="Lleida Networks Serveis Telemátics, SL" status="" 27 bands="MVNO" brand="Truphone" cc="es" country="Spain" operator="SCN Truphone, S.L." status="Operational" 28 bands="TD-LTE 2600" brand="Murcia4G" cc="es" country="Spain" operator="Consorcio de Telecomunicaciones Avanzadas, S.A." status="Operational" 29 bands="TD-LTE 3500" cc="es" country="Spain" operator="NEO-SKY 2002, S.A." status="Operational" 30 bands="" cc="es" country="Spain" operator="Compatel Limited" status="" 31 bands="" cc="es" country="Spain" operator="Red Digital De Telecomunicaciones de las Islas Baleares, S.L." status="" 32 bands="MVNO" brand="Tuenti" cc="es" country="Spain" operator="Tuenti Technologies S.L." status="Operational" 33 bands="WiMAX" cc="es" country="Spain" operator="EURONA WIRELESS TELECOM, S.A." status="Operational" 34 bands="LTE 2600" cc="es" country="Spain" operator="Aire Networks del Mediterráneo, S.L.U." status="Operational" 51 bands="GSM-R" brand="ADIF" cc="es" country="Spain" operator="Administrador de Infraestructuras Ferroviarias" status="Operational" 00-99 216 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Telenor" cc="hu" country="Hungary" operator="Telenor Magyarország Zrt." status="Operational" 02 bands="" cc="hu" country="Hungary" operator="MVM Net Ltd." status="" 30 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="T-Mobile" cc="hu" country="Hungary" operator="Magyar Telekom Plc" status="Operational" 70 bands="GSM 900 / GSM 1800 / UMTS 2100 / UMTS 900" brand="Vodafone" cc="hu" country="Hungary" operator="Vodafone Magyarország Zrt." status="Operational" 71 bands="MVNO" brand="UPC Hungary" cc="hu" country="Hungary" operator="UPC Hungary Ltd." status="Operational" 99 bands="GSM-R 900" brand="MAV GSM-R" cc="hu" country="Hungary" operator="Magyar Államvasutak" status="Planned" 00-99 218 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="HT-ERONET" cc="ba" country="Bosnia and Herzegovina" operator="Public Enterprise Croatian Telecom Ltd." status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="m:tel" cc="ba" country="Bosnia and Herzegovina" operator="RS Telecommunications JSC Banja Luka" status="Operational" 90 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="BH Mobile" cc="ba" country="Bosnia and Herzegovina" operator="BH Telecom" status="Operational" 00-99 219 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="T-Mobile" cc="hr" country="Croatia" operator="T-Mobile Croatia" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Tele2" cc="hr" country="Croatia" operator="Tele2" status="Operational" 10 bands="GSM 900 / UMTS 2100 / LTE 1800" brand="Vip" cc="hr" country="Croatia" operator="Vipnet" status="Operational" 12 bands="MVNO" cc="hr" country="Croatia" operator="TELE FOCUS d.o.o." status="" 00-99 220 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Telenor" cc="rs" country="Serbia" operator="Telenor Serbia" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Telenor" cc="rs" country="Serbia" operator="Telenor Montenegro" status="Not operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="mt:s" cc="rs" country="Serbia" operator="Telekom Srbija" status="Operational" 04 bands="GSM" brand="T-Mobile" cc="rs" country="Serbia" operator="T-Mobile Montenegro LLC" status="Not operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="VIP" cc="rs" country="Serbia" operator="VIP Mobile" status="Operational" 07 bands="CDMA 450" cc="rs" country="Serbia" operator="Orion Telekom" status="Operational" 00-99 222 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="TIM" cc="it" country="Italy" operator="Telecom Italia SpA" status="Operational" 02 bands="Satellite (Globalstar)" brand="Elsacom" cc="it" country="Italy" status="Not operational" 04 bands="" brand="Intermatica" cc="it" country="Italy" status="" 05 bands="" brand="Telespazio" cc="it" country="Italy" status="" 06 bands="" brand="Vodafone" cc="it" country="Italy" operator="Vodafone Omnitel B.V." status="" 07 bands="MVNO" brand="Nòverca" cc="it" country="Italy" operator="Nòverca Italia" status="Not operational" 10 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Vodafone" cc="it" country="Italy" operator="Vodafone Omnitel B.V." status="Operational" 30 bands="GSM-R 900" brand="RFI" cc="it" country="Italy" operator="Rete Ferroviaria Italiana" status="Operational" 33 bands="MVNO" brand="Poste Mobile" cc="it" country="Italy" operator="Poste Mobile SpA" status="Operational" 34 bands="MVNO" brand="BT Italia" cc="it" country="Italy" operator="British Telecom Italia" status="Reserved" 35 bands="MVNO" brand="Lyca Italy" cc="it" country="Italy" operator="Lycamobile" status="Operational" 36 bands="" brand="Digi Mobil" cc="it" country="Italy" operator="Digi Italy S.r.l." status="" 37 bands="" brand="3 Italia" cc="it" country="Italy" operator="Hutchison 3G" status="" 38 bands="" brand="LINKEM" cc="it" country="Italy" operator="Linkem SpA" status="" 39 bands="" brand="SMS Italia" cc="it" country="Italy" operator="SMS Italia S.r.l." status="" 43 bands="" brand="TIM" cc="it" country="Italy" operator="Telecom Italia SpA" status="" 48 bands="" brand="TIM" cc="it" country="Italy" operator="Telecom Italia SpA" status="" 77 bands="UMTS 2100" brand="IPSE 2000" cc="it" country="Italy" status="Not operational" 88 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 2600" brand="Wind" cc="it" country="Italy" operator="Wind Telecomunicazioni SpA" status="Operational" 98 bands="GSM 900" brand="BLU s.p.a" cc="it" country="Italy" operator="BLU s.p.a" status="Not operational" 99 bands="UMTS 900 / UMTS 2100 / LTE 1800" brand="3 Italia" cc="it" country="Italy" operator="Hutchison 3G" status="Operational" 00-99 226 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / TD-LTE 2600" brand="Vodafone" cc="ro" country="Romania" operator="Vodafone România" status="Operational" 02 bands="CDMA 420" brand="Clicknet Mobile" cc="ro" country="Romania" operator="Telekom Romania" status="Not operational" 03 bands="GSM 900 / GSM 1800 / LTE 800 / LTE 1800 / LTE 2600" brand="Telekom" cc="ro" country="Romania" operator="Telekom Romania" status="Operational" 04 bands="CDMA 450" brand="Cosmote/Zapp" cc="ro" country="Romania" operator="Telekom Romania" status="Not operational" 05 bands="UMTS 900 / UMTS 2100 / TD-LTE 2600" brand="Digi.Mobil" cc="ro" country="Romania" operator="RCS&RDS" status="Operational" 06 bands="UMTS 2100" brand="Telekom/Zapp" cc="ro" country="Romania" operator="Telekom Romania" status="Operational" 10 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Orange" cc="ro" country="Romania" operator="Orange România" status="Operational" 11 bands="MVNO" cc="ro" country="Romania" operator="Enigma-System" status="" 15 bands="WiMAX" brand="Idilis" cc="ro" country="Romania" operator="Idilis" status="Operational" 16 bands="MVNO" brand="Lycamobile" cc="ro" country="Romania" operator="Lycamobile Romania" status="Operational" 00-99 228 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Swisscom" cc="ch" country="Switzerland" operator="Swisscom Ltd" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Sunrise" cc="ch" country="Switzerland" operator="Sunrise Communications AG" status="Operational" 03 bands="GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Salt" cc="ch" country="Switzerland" operator="Salt Mobile SA" status="Operational" 05 bands="" cc="ch" country="Switzerland" operator="Comfone AG" status="Not operational" 06 bands="GSM-R 900" brand="SBB-CFF-FFS" cc="ch" country="Switzerland" operator="SBB AG" status="Operational" 07 bands="GSM 1800" brand="IN&Phone" cc="ch" country="Switzerland" operator="IN&Phone SA" status="Not operational" 08 bands="GSM 1800" brand="Tele4u" cc="ch" country="Switzerland" operator="TelCommunication Services AG" status="Operational" 09 bands="" cc="ch" country="Switzerland" operator="Comfone AG" status="" 12 cc="ch" country="Switzerland" operator="Sunrise" status="Inactive" 50 bands="UMTS 2100" cc="ch" country="Switzerland" operator="3G Mobile AG" status="Not operational" 51 bands="MVNO" cc="ch" country="Switzerland" operator="BebbiCell AG" status="Operational" 52 brand="Barablu" cc="ch" country="Switzerland" operator="Barablu" status="Not operational" 53 bands="MVNO" cc="ch" country="Switzerland" operator="UPC Cablecom GmbH" status="Operational" 54 bands="MVNO" cc="ch" country="Switzerland" operator="Lycamobile AG" status="Operational" 55 bands="" cc="ch" country="Switzerland" operator="WeMobile SA" status="" 56 bands="" cc="ch" country="Switzerland" operator="SMSRelay AG" status="" 57 bands="" cc="ch" country="Switzerland" operator="Mitto AG" status="" 99 cc="ch" country="Switzerland" operator="Swisscom" status="" 00-99 230 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="T-Mobile" cc="cz" country="Czech Republic" operator="T-Mobile Czech Republic" status="Operational" 02 bands="CDMA 450 / GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="O2" cc="cz" country="Czech Republic" operator="O2 Czech Republic" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 900 / LTE 1800 / LTE 2100" brand="Vodafone" cc="cz" country="Czech Republic" operator="Vodafone Czech Republic" status="Operational" 04 bands="CDMA2000 410 - 430" brand="U:fon" cc="cz" country="Czech Republic" operator="Air Telecom a. s." status="Operational" 05 bands="" cc="cz" country="Czech Republic" operator="TRAVEL TELEKOMMUNIKATION, s.r.o." status="Not operational" 06 bands="" cc="cz" country="Czech Republic" operator="OSNO TELECOMUNICATION, s.r.o." status="" 07 bands="MVNO" cc="cz" country="Czech Republic" operator="ASTELNET, s.r.o." status="Operational" 08 bands="" cc="cz" country="Czech Republic" operator="Compatel s.r.o." status="" 09 bands="MVNO" cc="cz" country="Czech Republic" operator="Mundio Distribution Czech Republic s.r.o." status="" 98 bands="GSM-R 900" cc="cz" country="Czech Republic" operator="Správa železniční dopravní cesty, s.o." status="Operational" 99 bands="GSM 1800" brand="Vodafone" cc="cz" country="Czech Republic" operator="Vodafone Czech Republic" status="Operational" 00-99 231 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 2600" brand="Orange" cc="sk" country="Slovakia" operator="Orange Slovensko" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Telekom" cc="sk" country="Slovakia" operator="Slovak Telekom" status="Operational" 03 bands="LTE 1800" brand="Swan" cc="sk" country="Slovakia" operator="Unient Communications" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Telekom" cc="sk" country="Slovakia" operator="Slovak Telekom" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Orange" cc="sk" country="Slovakia" operator="Orange Slovensko" status="Operational" 06 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="O2" cc="sk" country="Slovakia" operator="Telefónica O2 Slovakia" status="Operational" 99 bands="GSM-R" brand="ŽSR" cc="sk" country="Slovakia" operator="Železnice Slovenskej Republiky" status="Operational" 00-99 232 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 2600" brand="A1.net" cc="at" country="Austria" operator="A1 Telekom Austria" status="Operational" 02 cc="at" country="Austria" operator="A1 Telekom Austria" status="Reserved" 03 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="T-Mobile AT" cc="at" country="Austria" operator="T-Mobile Austria" status="Operational" 04 bands="" brand="T-Mobile AT" cc="at" country="Austria" operator="T-Mobile Austria Gmbh" status="" 05 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Orange AT" cc="at" country="Austria" operator="Hutchison Drei Austria" status="Operational" 06 bands="" brand="Orange AT" cc="at" country="Austria" operator="Orange Austria GmbH" status="Not operational" 07 bands="MVNO" brand="tele.ring" cc="at" country="Austria" operator="T-Mobile Austria" status="Operational" 08 bands="MVNO" brand="Lycamobile" cc="at" country="Austria" operator="Lycamobile Austria" status="Operational" 09 bands="MVNO" brand="Tele2Mobil" cc="at" country="Austria" operator="A1 Telekom Austria" status="Operational" 10 bands="UMTS 2100 / LTE 1800 / LTE 2600" brand="3AT" cc="at" country="Austria" operator="Hutchison Drei Austria" status="Operational" 11 bands="MVNO" brand="bob" cc="at" country="Austria" operator="A1 Telekom Austria" status="Operational" 12 bands="MVNO" brand="yesss!" cc="at" country="Austria" operator="A1 Telekom Austria" status="Operational" 13 bands="MVNO" brand="UPC Mobile" cc="at" country="Austria" operator="UPC Austria" status="Operational" 14 bands="" cc="at" country="Austria" operator="Hutchison Drei Austria" status="Reserved" 15 bands="MVNO" brand="Vectone Mobile" cc="at" country="Austria" operator="Mundio Mobile Austria" status="Operational" 16 bands="" cc="at" country="Austria" operator="Hutchison Drei Austria" status="Reserved" 17 bands="" cc="at" country="Austria" operator="MASS Response Service GmbH" status="" 18 bands="" cc="at" country="Austria" operator="smartspace GmbH" status="" 19 bands="" cc="at" country="Austria" operator="Tele2 Telecommunication GmbH" status="" 20 bands="" cc="at" country="Austria" operator="MTEL Austrija GmbH" status="" 91 bands="GSM-R" brand="GSM-R A" cc="at" country="Austria" operator="ÖBB" status="Operational" 92 bands="" cc="at" country="Austria" operator="ArgoNET GmbH" status="" 00-99 234 00 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="BT" cc="gb" country="United Kingdom" operator="BT Group" status="Operational" 01 bands="GSM 1800" brand="Vectone Mobile" cc="gb" country="United Kingdom" operator="Mundio Mobile Limited" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800" brand="O2 (UK)" cc="gb" country="United Kingdom" operator="Telefónica Europe" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Airtel-Vodafone" cc="gb" country="United Kingdom" operator="Jersey Airtel Limited" status="Operational" 04 bands="GSM 1800" brand="FMS Solutions Ltd" cc="gb" country="United Kingdom" operator="FMS Solutions Ltd" status="Reserved" 05 cc="gb" country="United Kingdom" operator="COLT Mobile Telecommunications Limited" status="" 06 cc="gb" country="United Kingdom" operator="Internet Computer Bureau Limited" status="" 07 bands="GSM 1800" cc="gb" country="United Kingdom" operator="Cable & Wireless Worldwide" status="Operational" 08 cc="gb" country="United Kingdom" operator="OnePhone (UK) Ltd" status="" 09 cc="gb" country="United Kingdom" operator="Tismi BV" status="" 10 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800" brand="O2 (UK)" cc="gb" country="United Kingdom" operator="Telefónica Europe" status="Operational" 11 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800" brand="O2 (UK)" cc="gb" country="United Kingdom" operator="Telefónica Europe" status="Operational" 12 bands="GSM-R" brand="Railtrack" cc="gb" country="United Kingdom" operator="Network Rail Infrastructure Ltd" status="Operational" 13 bands="GSM-R" brand="Railtrack" cc="gb" country="United Kingdom" operator="Network Rail Infrastructure Ltd" status="Operational" 14 bands="GSM 1800" brand="Hay Systems Ltd" cc="gb" country="United Kingdom" operator="Hay Systems Ltd" status="Operational" 15 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800" brand="Vodafone UK" cc="gb" country="United Kingdom" operator="Vodafone" status="Operational" 16 bands="MVNO" brand="Talk Talk" cc="gb" country="United Kingdom" operator="TalkTalk Communications Limited" status="Operational" 17 cc="gb" country="United Kingdom" operator="FleXtel Limited" status="" 18 bands="MVNO" brand="Cloud9" cc="gb" country="United Kingdom" operator="Cloud9" status="Operational" 19 bands="GSM 1800" brand="Private Mobile Networks PMN" cc="gb" country="United Kingdom" operator="Teleware plc" status="Operational" 20 bands="UMTS 2100 / LTE 1800" brand="3" cc="gb" country="United Kingdom" operator="Hutchison 3G UK Ltd" status="Operational" 21 bands="" cc="gb" country="United Kingdom" operator="LogicStar Ltd" status="Not operational" 22 bands="" cc="gb" country="United Kingdom" operator="Telesign Mobile Limited" status="" 23 bands="" cc="gb" country="United Kingdom" operator="Icron Network Limited" status="" 24 bands="" brand="Greenfone" cc="gb" country="United Kingdom" operator="Stour Marine Limited" status="Operational" 25 bands="MVNO" brand="Truphone" cc="gb" country="United Kingdom" operator="Truphone" status="Operational" 26 bands="MVNO" brand="Lycamobile" cc="gb" country="United Kingdom" operator="Lycamobile UK Limited" status="Operational" 27 bands="MVNE" cc="gb" country="United Kingdom" operator="Teleena UK Limited" status="Operational" 28 bands="MVNO" cc="gb" country="United Kingdom" operator="Marathon Telecom Limited" status="Operational" 29 bands="" brand="aql" cc="gb" country="United Kingdom" operator="(aq) Limited" status="" 30 bands="GSM 1800 / UMTS 2100 / LTE 1800 / LTE 2600" brand="T-Mobile UK" cc="gb" country="United Kingdom" operator="EE" status="Operational" 31 bands="MVNO" brand="Virgin Mobile UK" cc="gb" country="United Kingdom" operator="Virgin Media" status="Operational" 32 bands="MVNO" brand="Virgin Mobile UK" cc="gb" country="United Kingdom" operator="Virgin Media" status="Operational" 33 bands="GSM 1800 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Orange (UK)" cc="gb" country="United Kingdom" operator="EE" status="Operational" 34 bands="GSM 1800 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Orange (UK)" cc="gb" country="United Kingdom" operator="EE" status="Operational" 35 bands="" cc="gb" country="United Kingdom" operator="JSC Ingenium (UK) Limited" status="Not operational" 36 bands="GSM 900 / GSM 1800 / LTE" brand="Sure Mobile" cc="gb" country="United Kingdom" operator="Sure (Isle of Man) Limited" status="Operational" 37 bands="" cc="gb" country="United Kingdom" operator="Synectiv Ltd" status="" 38 bands="" brand="Virgin Mobile UK" cc="gb" country="United Kingdom" operator="Virgin Media" status="" 39 bands="" cc="gb" country="United Kingdom" operator="SSE Energy Supply Limited" status="" 50 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="JT" cc="gb" country="United Kingdom" operator="JT Group Limited" status="Operational" 51 bands="TD-LTE 3500 / TD-LTE 3700" brand="UK Broadband" cc="gb" country="United Kingdom" operator="UK Broadband Limited" status="Operational" 52 bands="" cc="gb" country="United Kingdom" operator="Shyam Telecom UK Ltd" status="" 53 bands="" cc="gb" country="United Kingdom" operator="Limitless Mobile Ltd" status="" 54 bands="" cc="gb" country="United Kingdom" operator="The Carphone Warehouse Limited" status="" 55 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Sure Mobile" cc="gb" country="United Kingdom" operator="Sure (Guernsey) Limited" status="Operational" 58 bands="GSM 900 / UMTS 2100 / LTE 800 / LTE 1800" brand="Pronto GSM" cc="gb" country="United Kingdom" operator="Manx Telecom" status="Operational" 76 bands="GSM 900 / GSM 1800" brand="BT" cc="gb" country="United Kingdom" operator="BT Group" status="Operational" 78 bands="TETRA" brand="Airwave" cc="gb" country="United Kingdom" operator="Airwave Solutions Ltd" status="Operational" 86 bands="" cc="gb" country="United Kingdom" operator="EE" status="" 00-99 235 00 cc="gb" country="United Kingdom" operator="Mundio Mobile Limited" status="" 01 bands="" cc="gb" country="United Kingdom" operator="EE" status="" 02 bands="" cc="gb" country="United Kingdom" operator="EE" status="" 03 bands="" brand="UK Broadband" cc="gb" country="United Kingdom" operator="UK Broadband Limited" status="" 77 brand="BT" cc="gb" country="United Kingdom" operator="BT Group" status="" 91 cc="gb" country="United Kingdom" operator="Vodafone United Kingdom" status="" 92 cc="gb" country="United Kingdom" operator="Cable & Wireless UK" status="" 94 cc="gb" country="United Kingdom" operator="Hutchison 3G UK Ltd" status="" 95 cc="gb" country="United Kingdom" operator="Network Rail Infrastructure Limited" status="" 00-99 238 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="TDC" cc="dk" country="Denmark" operator="TDC A/S" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Telenor" cc="dk" country="Denmark" operator="Telenor Denmark" status="Operational" 03 bands="" cc="dk" country="Denmark" operator="MACH Connectivity" status="" 04 bands="" cc="dk" country="Denmark" operator="NextGen Mobile Ltd T/A CardBoardFish" status="" 05 bands="TETRA" brand="TetraNet" cc="dk" country="Denmark" operator="ApS KBUS 38 nr. 4418" status="Operational" 06 bands="UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="3" cc="dk" country="Denmark" operator="Hi3G Denmark ApS" status="Operational" 07 bands="MVNO" brand="Vectone Mobile" cc="dk" country="Denmark" operator="Mundio Mobile (Denmark) Limited" status="Operational" 08 bands="MVNO" brand="Voxbone" cc="dk" country="Denmark" operator="Voxbone mobile" status="Operational" 09 bands="TETRA" brand="SINE" cc="dk" country="Denmark" operator="Dansk Beredskabskommunikation A/S" status="Operational" 10 bands="" brand="TDC" cc="dk" country="Denmark" operator="TDC A/S" status="Operational" 11 bands="TETRA" brand="SINE" cc="dk" country="Denmark" operator="Dansk Beredskabskommunikation A/S" status="Operational" 12 bands="MVNO" brand="Lycamobile" cc="dk" country="Denmark" operator="Lycamobile Denmark Ltd" status="Operational" 13 bands="" cc="dk" country="Denmark" operator="Compatel Limited" status="" 15 bands="" cc="dk" country="Denmark" operator="Ice Danmark ApS" status="" 16 bands="" cc="dk" country="Denmark" operator="Tismi B.V." status="" 17 bands="MVNO" cc="dk" country="Denmark" operator="Naka AG" status="" 20 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Telia" cc="dk" country="Denmark" operator="Telia" status="Operational" 23 bands="GSM-R" brand="GSM-R DK" cc="dk" country="Denmark" operator="Banedanmark" status="Operational" 28 bands="" cc="dk" country="Denmark" operator="CoolTEL ApS" status="" 30 bands="" cc="dk" country="Denmark" operator="Interactive digital media GmbH" status="" 40 bands="" cc="dk" country="Denmark" operator="Ericsson Danmark A/S" status="" 43 bands="" cc="dk" country="Denmark" operator="MobiWeb Limited" status="" 66 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" cc="dk" country="Denmark" operator="TT-Netværket P/S" status="" 77 bands="GSM 900 / GSM 1800" brand="Telenor" cc="dk" country="Denmark" operator="Telenor Denmark" status="Operational" 00-99 240 01 bands="GSM 900 / GSM 1800 / UMTS 900 / LTE 800 / LTE 1800 / LTE 2600" brand="Telia" cc="se" country="Sweden" operator="TeliaSonera Sverige AB" status="Operational" 02 bands="UMTS 900 / UMTS 2100 / LTE 800 / LTE 2600 / TD-LTE 2600" brand="3" cc="se" country="Sweden" operator="HI3G Access AB" status="Operational" 03 bands="CDMA 450" brand="Net 1" cc="se" country="Sweden" operator="Netett Sverige AB" status="Operational" 04 bands="UMTS 2100" brand="SWEDEN" cc="se" country="Sweden" operator="3G Infrastructure Services AB" status="Operational" 05 bands="UMTS 2100" brand="Sweden 3G" cc="se" country="Sweden" operator="Svenska UMTS-Nät AB" status="Operational" 06 bands="UMTS 2100" brand="Telenor" cc="se" country="Sweden" operator="Telenor Sverige AB" status="Operational" 07 bands="UMTS 2100 / LTE 800 / LTE 900 / LTE 1800 / LTE 2600" brand="Tele2" cc="se" country="Sweden" operator="Tele2 Sverige AB" status="Operational" 08 bands="GSM 900 / GSM 1800" brand="Telenor" cc="se" country="Sweden" operator="Telenor Sverige AB" status="Not operational" 09 bands="MVNO" brand="djuice" cc="se" country="Sweden" operator="Telenor Mobile Sweden AS" status="Not operational" 10 brand="Spring Mobil" cc="se" country="Sweden" operator="Spring Mobil AB" status="Operational" 11 bands="" cc="se" country="Sweden" operator="Lindholmen Science Park AB" status="Not operational" 12 bands="MVNO" brand="Lycamobile" cc="se" country="Sweden" operator="Lycamobile Sweden Limited" status="Operational" 13 bands="" cc="se" country="Sweden" operator="Alltele Företag Sverige AB" status="" 14 bands="MVNO" cc="se" country="Sweden" operator="TDC Sverige AB" status="Not operational" 15 bands="GSM 900 / GSM 1800 / UMTS 2100" cc="se" country="Sweden" operator="Wireless Maingate Nordic AB" status="Operational" 16 bands="GSM" cc="se" country="Sweden" operator="42 Telecom AB" status="Operational" 17 bands="MVNO" brand="Gotanet" cc="se" country="Sweden" operator="Götalandsnätet AB" status="Operational" 18 bands="" cc="se" country="Sweden" operator="Generic Mobile Systems Sweden AB" status="" 19 bands="MVNO" brand="Vectone Mobile / Delight Mobile" cc="se" country="Sweden" operator="Mundio Mobile (Sweden) Limited" status="Operational" 20 bands="GSM" cc="se" country="Sweden" operator="Wireless Maingate Messaging Services AB" status="Operational" 21 bands="GSM-R 900" brand="MobiSir" cc="se" country="Sweden" operator="Trafikverket ICT" status="Operational" 22 bands="" cc="se" country="Sweden" operator="EuTel AB" status="" 23 bands="" cc="se" country="Sweden" operator="Infobip Limited" status="Operational" 24 bands="GSM 900 / LTE 800 / LTE 900 / LTE 1800 / LTE 2600" brand="Sweden 2G" cc="se" country="Sweden" operator="Net4Mobility HB" status="Operational" 25 bands="" cc="se" country="Sweden" operator="Digitel Mobile Srl" status="Not operational" 26 bands="GSM" cc="se" country="Sweden" operator="Beepsend AB" status="Operational" 27 bands="MVNO" cc="se" country="Sweden" operator="Fogg Mobile AB" status="Operational" 28 bands="" cc="se" country="Sweden" operator="CoolTEL Aps" status="" 29 bands="" cc="se" country="Sweden" operator="Mercury International Carrier Services" status="" 30 bands="" cc="se" country="Sweden" operator="NextGen Mobile Ltd." status="" 31 bands="" cc="se" country="Sweden" operator="RebTel Network AB" status="" 32 bands="" cc="se" country="Sweden" operator="Compatel Limited" status="" 33 bands="" cc="se" country="Sweden" operator="Mobile Arts AB" status="" 34 bands="" cc="se" country="Sweden" operator="Pro Net Telecommunications Services Ltd." status="" 35 bands="" cc="se" country="Sweden" operator="42 Telecom LTD" status="" 36 bands="" cc="se" country="Sweden" operator="interactive digital media GmbH" status="" 37 bands="" cc="se" country="Sweden" operator="CLX Networks AB" status="Operational" 38 bands="MVNO" brand="Voxbone" cc="se" country="Sweden" operator="Voxbone mobile" status="Operational" 39 bands="" cc="se" country="Sweden" operator="Borderlight AB" status="" 40 bands="" cc="se" country="Sweden" operator="ReWiCom Scandinavia AB" status="" 41 bands="" cc="se" country="Sweden" operator="Shyam Telecom UK Ltd." status="" 42 bands="" cc="se" country="Sweden" operator="Telenor Connexion AB" status="" 43 bands="" cc="se" country="Sweden" operator="MobiWeb Ltd." status="" 44 bands="" cc="se" country="Sweden" operator="Limitless Mobile AB" status="" 45 bands="" cc="se" country="Sweden" operator="Spirius AB" status="" 00-99 242 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Telenor" cc="no" country="Norway" operator="Telenor Norge AS" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="NetCom" cc="no" country="Norway" operator="TeliaSonera Norge AS" status="Operational" 03 brand="Teletopia" cc="no" country="Norway" operator="Teletopia Gruppen AS" status="Not operational" 04 bands="MVNO" brand="Tele2" cc="no" country="Norway" operator="Tele2 (Mobile Norway AS)" status="Operational" 05 bands="GSM 900 / UMTS 900 / UMTS 2100" brand="Network Norway" cc="no" country="Norway" operator="Tele2 (Mobile Norway AS)" status="Operational" 06 bands="CDMA2000 450" brand="ICE" cc="no" country="Norway" operator="ICE Norge AS" status="Operational" 07 bands="MVNO" brand="Phonero" cc="no" country="Norway" operator="Phonero AS" status="Operational" 08 bands="MVNO" brand="TDC" cc="no" country="Norway" operator="TDC Mobil AS" status="Operational" 09 bands="MVNO" brand="Com4" cc="no" country="Norway" operator="Com4 AS" status="Operational" 10 bands="" cc="no" country="Norway" operator="Nasjonal kommunikasjonsmyndighet" status="" 11 bands="Test" brand="SystemNet" cc="no" country="Norway" operator="SystemNet AS" status="" 12 bands="" brand="Telenor" cc="no" country="Norway" operator="Telenor Norge AS" status="" 14 bands="" cc="no" country="Norway" operator="ICE Communication Norge AS" status="" 20 bands="GSM-R 900" cc="no" country="Norway" operator="Jernbaneverket AS" status="Operational" 21 bands="GSM-R 900" cc="no" country="Norway" operator="Jernbaneverket AS" status="Operational" 23 bands="MVNO" brand="Lyca" cc="no" country="Norway" operator="Lyca Mobile Ltd" status="Operational" 24 bands="" cc="no" country="Norway" operator="Mobile Norway AS" status="" 25 bands="" cc="no" country="Norway" operator="Forsvarets kompetansesenter KKIS" status="" 00-99 244 03 bands="GSM 1800" brand="DNA" cc="fi" country="Finland" operator="DNA Oy" status="Operational" 04 bands="MVNO" brand="AINA" cc="fi" country="Finland" operator="DNA Oy / Aina Oyj" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Elisa" cc="fi" country="Finland" operator="Elisa Oyj" status="Operational" 07 bands="GSM 900 / GSM 1800" brand="Nokia" cc="fi" country="Finland" operator="Nokia Test Network" status="Not operational" 08 bands="GSM 1800 / UMTS 2100" brand="Nokia" cc="fi" country="Finland" operator="Nokia Test Network" status="Not operational" 09 bands="GSM 900" cc="fi" country="Finland" operator="Nokia Solutions and Networks Oy" status="Not operational" 10 bands="" cc="fi" country="Finland" operator="Viestintävirasto" status="" 11 bands="MVNO" brand="Vectone Mobile" cc="fi" country="Finland" operator="Mundio Mobile Oy" status="Operational" 12 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="DNA" cc="fi" country="Finland" operator="DNA Oy" status="Operational" 13 bands="GSM 900 / GSM 1800" brand="DNA" cc="fi" country="Finland" operator="DNA Oy" status="Not operational" 14 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Ålcom" cc="fi" country="Finland" operator="Ålands Telekommunikation Ab" status="Operational" 15 bands="GSM 1800" brand="SAMK" cc="fi" country="Finland" operator="Satakunta University of Applied Sciences" status="Not operational" 16 bands="MVNO" brand="Tele2" cc="fi" country="Finland" operator="Oy Finland Tele2 AB" status="Not operational" 17 bands="GSM-R" brand="RHK" cc="fi" country="Finland" operator="Finnish Transport Agency" status="Operational" 21 bands="MVNO" brand="Elisa- Saunalahti" cc="fi" country="Finland" operator="Elisa Oyj" status="Operational" 25 bands="CDMA" brand="Datame" cc="fi" country="Finland" operator="Datame Oy" status="Not operational" 26 bands="MVNO" brand="Compatel" cc="fi" country="Finland" operator="Compatel Ltd" status="Operational" 27 bands="" cc="fi" country="Finland" operator="VTT Technical Research Centre of Finland" status="" 29 bands="MVNO" cc="fi" country="Finland" operator="SCNL Truphone" status="Not operational" 30 bands="MVNO" brand="Vectone Mobile" cc="fi" country="Finland" operator="Mundio Mobile Oy" status="Operational" 31 bands="MVNO" brand="Kuiri" cc="fi" country="Finland" operator="Ukko Mobile Oy" status="Operational" 32 bands="MVNO" brand="Voxbone" cc="fi" country="Finland" operator="Voxbone SA" status="Operational" 33 bands="TETRA" brand="VIRVE" cc="fi" country="Finland" operator="Virve Tuotteet ja Palvelut Oy" status="Operational" 34 bands="" brand="Elektrobit Wireless" cc="fi" country="Finland" operator="Elektrobit Wireless Communications Oy" status="Operational" 35 bands="LTE 450" brand="Ukko Mobile" cc="fi" country="Finland" operator="Ukkoverkot Oy" status="Operational" 36 bands="" brand="Sonera" cc="fi" country="Finland" operator="TeliaSonera Finland Oyj" status="" 91 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Sonera" cc="fi" country="Finland" operator="TeliaSonera Finland Oyj" status="Operational" 00-99 246 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Omnitel" cc="lt" country="Lithuania" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="BITĖ" cc="lt" country="Lithuania" operator="UAB Bitė Lietuva" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Tele 2" cc="lt" country="Lithuania" status="Operational" 04 bands="" cc="lt" country="Lithuania" operator="Ministry of the Interior)" status="" 05 bands="GSM-R 900" brand="LitRail" cc="lt" country="Lithuania" operator="Lietuvos geležinkeliai (Lithuanian Railways)" status="Operational" 06 bands="GSM 1800" brand="Mediafon" cc="lt" country="Lithuania" operator="UAB Mediafon" status="Operational" 07 bands="" cc="lt" country="Lithuania" operator="Compatel Ltd." status="" 08 bands="WiMAX 3500" brand="MEZON" cc="lt" country="Lithuania" operator="Lietuvos radijo ir televizijos centras" status="Operational" 00-99 247 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="LMT" cc="lv" country="Latvia" operator="Latvian Mobile Telephone" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Tele2" cc="lv" country="Latvia" operator="Tele2" status="Operational" 03 bands="CDMA 450" brand="TRIATEL" cc="lv" country="Latvia" operator="Telekom Baltija" status="Operational" 04 bands="" cc="lv" country="Latvia" operator="Beta Telecom" status="" 05 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Bite" cc="lv" country="Latvia" operator="Bite Latvija" status="Operational" 06 bands="" cc="lv" country="Latvia" operator="Rigatta" status="Reserved" 07 bands="MVNO" brand="MTS" cc="lv" country="Latvia" operator="Master Telecom" status="Operational" 08 bands="MVNO" brand="IZZI" cc="lv" country="Latvia" operator="IZZI" status="Operational" 09 bands="MVNO" brand="Camel Mobile" cc="lv" country="Latvia" operator="Camel Mobile" status="Operational" 00-99 248 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="EMT" cc="ee" country="Estonia" operator="Estonian Mobile Telecom" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Elisa" cc="ee" country="Estonia" operator="Elisa Eesti" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Tele 2" cc="ee" country="Estonia" operator="Tele 2 Eesti" status="Operational" 04 bands="MVNO" cc="ee" country="Estonia" operator="OY Top Connect" status="Operational" 05 bands="" cc="ee" country="Estonia" operator="AS Bravocom Mobiil" status="" 06 bands="UMTS 2100" cc="ee" country="Estonia" operator="Progroup Holding" status="Operational" 07 bands="" cc="ee" country="Estonia" operator="Televõrgu AS" status="" 08 bands="MVNO" brand="VIVEX" cc="ee" country="Estonia" operator="VIVEX OU" status="Operational" 09 bands="" cc="ee" country="Estonia" operator="Bravo Telecom" status="" 10 bands="" cc="ee" country="Estonia" operator="Telcotrade OÜ" status="" 71 bands="" cc="ee" country="Estonia" operator="Siseministeerium (Ministry of Interior)" status="" 00-99 250 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600 / TD-LTE 2600" brand="MTS" cc="ru" country="Russian Federation" operator="Mobile TeleSystems" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 2600" brand="MegaFon" cc="ru" country="Russian Federation" operator="MegaFon OJSC - previously known as North-West GSM" status="Operational" 03 bands="GSM 900 / GSM 1800" brand="NCC" cc="ru" country="Russian Federation" operator="Nizhegorodskaya Cellular Communications" status="Operational" 04 bands="GSM 900" brand="Sibchallenge" cc="ru" country="Russian Federation" operator="Sibchallenge" status="Not operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100 / CDMA2000 450" brand="ETK" cc="ru" country="Russian Federation" operator="Yeniseytelecom" status="Operational" 06 bands="CDMA2000 450" brand="Skylink" cc="ru" country="Russian Federation" operator="CJSC Saratov System of Cellular Communications" status="Operational" 07 bands="GSM 900 / GSM 1800" brand="SMARTS" cc="ru" country="Russian Federation" operator="Zao SMARTS" status="Operational" 09 bands="CDMA2000 450" brand="Skylink" cc="ru" country="Russian Federation" operator="Khabarovsky Cellular Phone" status="Operational" 10 bands="GSM 900" brand="DTC" cc="ru" country="Russian Federation" operator="Dontelekom" status="Not operational" 11 bands="LTE 2600" brand="Yota" cc="ru" country="Russian Federation" operator="Scartel" status="Operational" 12 bands="GSM 1800" brand="Akos" cc="ru" country="Russian Federation" operator="Baykal Westcom / New Telephone Company / Far Eastern Cellular" status="Operational" 13 bands="GSM 900 / GSM 1800" brand="KUGSM" cc="ru" country="Russian Federation" operator="Kuban GSM" status="Not operational" 14 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / TD-LTE 2600" brand="MegaFon" cc="ru" country="Russian Federation" operator="MegaFon OJSC" status="Operational" 15 bands="GSM 1800" brand="SMARTS" cc="ru" country="Russian Federation" operator="SMARTS Ufa, SMARTS Uljanovsk" status="Operational" 16 bands="GSM 900 / GSM 1800" brand="NTC" cc="ru" country="Russian Federation" operator="New Telephone Company" status="Operational" 17 bands="GSM 900 / GSM 1800" brand="Utel" cc="ru" country="Russian Federation" operator="JSC Uralsvyazinform" status="Operational" 18 bands="TD-LTE 2300" brand="Osnova Telecom" cc="ru" country="Russian Federation" status="Not operational" 19 bands="GSM 1800" brand="INDIGO" cc="ru" country="Russian Federation" operator="INDIGO" status="Not operational" 20 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Tele2" cc="ru" country="Russian Federation" operator="Tele2" status="Operational" 22 bands="TD-LTE 2300" cc="ru" country="Russian Federation" operator="Vainakh Telecom" status="Operational" 23 bands="GSM 900 / GSM 1800" brand="Mobicom - Novosibirsk" cc="ru" country="Russian Federation" operator="Mobicom - Novosibirsk" status="Not operational" 28 bands="GSM 900" brand="Beeline" cc="ru" country="Russian Federation" operator="Beeline" status="Not operational" 32 bands="GSM 900 / GSM 1800" brand="Win Mobile" cc="ru" country="Russian Federation" operator="K-Telecom" status="Operational" 35 bands="GSM 1800 / LTE 1800" brand="MOTIV" cc="ru" country="Russian Federation" operator="EKATERINBURG-2000" status="Operational" 38 bands="GSM 900 / GSM 1800" brand="Tambov GSM" cc="ru" country="Russian Federation" operator="Central Telecommunication Company" status="Operational" 39 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / TD-LTE 2300 / LTE 2600" brand="Rostelecom" cc="ru" country="Russian Federation" operator="ROSTELECOM" status="Operational" 44 bands="" cc="ru" country="Russian Federation" operator="Stavtelesot / North Caucasian GSM" status="Not operational" 50 bands="GSM 900 / GSM 1800" brand="MTS" cc="ru" country="Russian Federation" operator="Bezlimitno.ru" status="Operational" 54 bands="LTE 1800" brand="TTK" cc="ru" country="Russian Federation" operator="Tattelecom" status="Operational" 811 cc="ru" country="Russian Federation" operator="Votek Mobile" status="" 91 bands="GSM 1800" brand="Sonic Duo" cc="ru" country="Russian Federation" operator="Sonic Duo CJSC" status="Not operational" 92 bands="" cc="ru" country="Russian Federation" operator="Primtelefon" status="Not operational" 93 bands="" cc="ru" country="Russian Federation" operator="Telecom XXI" status="Not operational" 99 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 2600" brand="Beeline" cc="ru" country="Russian Federation" operator="OJSC Vimpel-Communications" status="Operational" 00-99 255 01 bands="GSM 900 / GSM 1800 / CDMA 450 / UMTS 2100" brand="MTS" cc="ua" country="Ukraine" operator="MTS Ukraine" status="Operational" 02 bands="GSM 900 / GSM 1800" brand="Beeline" cc="ua" country="Ukraine" operator="Kyivstar GSM JSC" status="Not operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Kyivstar" cc="ua" country="Ukraine" operator="Kyivstar GSM JSC" status="Operational" 04 bands="CDMA 800" brand="IT" cc="ua" country="Ukraine" operator="Intertelecom" status="Operational" 05 bands="GSM 1800" brand="Golden Telecom" cc="ua" country="Ukraine" operator="Kyivstar GSM JSC" status="Not operational" 06 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="life:)" cc="ua" country="Ukraine" operator="Astelit" status="Operational" 07 bands="UMTS 2100" brand="3Mob" cc="ua" country="Ukraine" operator="3Mob (Ukrtelecom UMTS )" status="Operational" 21 bands="CDMA 800" brand="PEOPLEnet" cc="ua" country="Ukraine" operator="Telesystems of Ukraine" status="Operational" 23 bands="CDMA 800" brand="CDMA Ukraine" cc="ua" country="Ukraine" operator="Intertelecom" status="Not operational" 25 bands="CDMA 800" brand="NEWTONE" cc="ua" country="Ukraine" operator="CST Invest" status="Operational" 00-99 257 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="velcom" cc="by" country="Belarus" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="MTS" cc="by" country="Belarus" operator="Mobile TeleSystems" status="Operational" 03 bands="CDMA 450" brand="DIALLOG" cc="by" country="Belarus" operator="BelCel" status="Not operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="life:)" cc="by" country="Belarus" operator="Belarusian Telecommunications Network" status="Operational" 05 bands="" cc="by" country="Belarus" operator="Beltelecom" status="" 06 bands="" cc="by" country="Belarus" operator="Belorussian Cloud Technologies" status="" 501 bands="" brand="BelCel JV" cc="by" country="Belarus" status="" 00-99 259 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Orange" cc="md" country="Moldova" operator="Orange Moldova" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800 / LTE 2600" brand="Moldcell" cc="md" country="Moldova" status="Operational" 03 bands="CDMA 450" brand="Unité" cc="md" country="Moldova" operator="Moldtelecom" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="Eventis" cc="md" country="Moldova" operator="Eventis Telecom" status="Not operational" 05 bands="UMTS 900 / UMTS 2100" brand="Unité" cc="md" country="Moldova" operator="Moldtelecom" status="Operational" 99 bands="UMTS 2100" brand="Unité" cc="md" country="Moldova" operator="Moldtelecom" status="Operational" 00-99 260 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Plus" cc="pl" country="Poland" operator="Polkomtel Sp. z o.o." status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="T-Mobile" cc="pl" country="Poland" operator="T-Mobile Polska S.A." status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / CDMA2000 450" brand="Orange" cc="pl" country="Poland" operator="Polska Telefonia Komórkowa Centertel Sp. z o.o." status="Operational" 04 bands="" brand="Aero2" cc="pl" country="Poland" operator="Aero 2 Sp. z o.o." status="Not operational" 05 bands="UMTS 2100" brand="Orange" cc="pl" country="Poland" operator="Polska Telefonia Komórkowa Centertel Sp. z o.o." status="Not operational" 06 bands="GSM 900 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Play" cc="pl" country="Poland" operator="P4 Sp. z o.o." status="Operational" 07 bands="MVNO" brand="Netia" cc="pl" country="Poland" operator="Netia S.A." status="Operational" 08 bands="" cc="pl" country="Poland" operator="E-Telko Sp. z o.o." status="Not operational" 09 bands="MVNO" brand="Lycamobile" cc="pl" country="Poland" operator="Lycamobile Sp. z o.o." status="Operational" 10 bands="LTE 800" brand="Sferia" cc="pl" country="Poland" operator="Sferia S.A." status="Operational" 11 bands="CDMA2000 420" brand="Nordisk Polska" cc="pl" country="Poland" operator="Nordisk Polska Sp. z o.o." status="Operational" 12 bands="MVNO" brand="Cyfrowy Polsat" cc="pl" country="Poland" operator="Cyfrowy Polsat S.A." status="Operational" 13 brand="Sferia" cc="pl" country="Poland" operator="Sferia S.A." status="Not operational" 14 brand="Sferia" cc="pl" country="Poland" operator="Sferia S.A." status="Not operational" 15 bands="LTE 1800" brand="Aero2" cc="pl" country="Poland" operator="Aero 2 Sp. z o.o." status="Operational" 16 bands="LTE 1800" brand="Mobyland" cc="pl" country="Poland" operator="Mobyland Sp. z o.o." status="Operational" 17 bands="UMTS 900 / TD-LTE 2600" brand="Aero2" cc="pl" country="Poland" operator="Aero 2 Sp. z o.o." status="Operational" 18 bands="" brand="AMD Telecom" cc="pl" country="Poland" operator="AMD Telecom S.A." status="" 19 bands="" brand="Teleena" cc="pl" country="Poland" operator="Teleena Holding BV" status="" 20 bands="" brand="Mobile.Net" cc="pl" country="Poland" operator="Mobile.Net Sp. z o.o." status="" 21 bands="" brand="Exteri" cc="pl" country="Poland" operator="Exteri Sp. z o.o." status="" 22 bands="" brand="Arcomm" cc="pl" country="Poland" operator="Arcomm Sp. z o.o." status="" 23 bands="" brand="Amicomm" cc="pl" country="Poland" operator="Amicomm Sp. z o.o." status="" 24 bands="" brand="WideNet" cc="pl" country="Poland" operator="WideNet Sp. z o.o." status="" 25 bands="" brand="BS&T" cc="pl" country="Poland" operator="Best Solutions & Technology Experience Sp. z o.o." status="" 26 bands="" brand="ATE" cc="pl" country="Poland" operator="Advanced Technology & Experience Sp. z o.o." status="" 27 bands="" brand="Intertelcom" cc="pl" country="Poland" operator="Intertelcom Sp. z o.o." status="" 28 bands="" brand="PhoneNet" cc="pl" country="Poland" operator="PhoneNet Sp. z o.o." status="" 29 bands="" brand="Interfonica" cc="pl" country="Poland" operator="Interfonica Sp. z o.o." status="" 30 bands="" brand="GrandTel" cc="pl" country="Poland" operator="GrandTel Sp. z o.o." status="" 31 bands="" brand="Phone IT" cc="pl" country="Poland" operator="Phone IT Sp. z o.o." status="" 32 bands="" cc="pl" country="Poland" operator="Compatel Limited" status="" 33 bands="MVNO" brand="Truphone" cc="pl" country="Poland" operator="Truphone Poland Sp. z o.o." status="Operational" 34 bands="UMTS 900" brand="NetWorkS!" cc="pl" country="Poland" operator="T-Mobile Polska S.A." status="Operational" 35 bands="GSM-R" cc="pl" country="Poland" operator="PKP Polskie Linie Kolejowe S.A." status="Operational" 36 bands="MVNO" brand="Vectone Mobile" cc="pl" country="Poland" operator="Mundio Mobile" status="Operational" 37 bands="" cc="pl" country="Poland" operator="NEXTGEN MOBILE LTD" status="" 38 bands="" cc="pl" country="Poland" operator="CALLFREEDOM Sp. z o.o." status="" 39 bands="MVNO" brand="Voxbone" cc="pl" country="Poland" operator="VOXBONE SA" status="Operational" 40 bands="" cc="pl" country="Poland" operator="Interactive Digital Media GmbH" status="" 41 bands="" cc="pl" country="Poland" operator="EZ PHONE MOBILE Sp. z o.o." status="" 98 bands="LTE 1800" brand="Play" cc="pl" country="Poland" operator="P4 Sp. z o.o." status="Not Operational" 00-99 262 01 bands="GSM 900 / GSM 1800/ / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Telekom" cc="de" country="Germany" operator="Telekom Deutschland GmbH" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 2600" brand="Vodafone" cc="de" country="Germany" operator="Vodafone D2 GmbH" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="E-Plus" cc="de" country="Germany" operator="E-Plus Mobilfunk" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Vodafone" cc="de" country="Germany" operator="Vodafone D2 GmbH" status="Reserved" 05 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="E-Plus" cc="de" country="Germany" operator="E-Plus Mobilfunk" status="Reserved" 06 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Telekom" cc="de" country="Germany" operator="Telekom Deutschland GmbH" status="Reserved" 07 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 2600" brand="O2" cc="de" country="Germany" operator="Telefónica Germany GmbH & Co. oHG" status="Operational" 08 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="O2" cc="de" country="Germany" operator="Telefónica Germany GmbH & Co. oHG" status="Reserved" 09 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="Vodafone" cc="de" country="Germany" operator="Vodafone D2 GmbH" status="Operational" 10 bands="GSM-R" cc="de" country="Germany" operator="DB Netz AG" status="Operational" 11 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="O2" cc="de" country="Germany" operator="Telefónica Germany GmbH & Co. oHG" status="Reserved" 12 bands=""full" MVNO / MVNE" brand="Dolphin Telecom" cc="de" country="Germany" operator="sipgate GmbH" status="Operational" 13 bands="UMTS 2100" cc="de" country="Germany" operator="Mobilcom Multimedia" status="Not operational" 14 bands="UMTS 2100" cc="de" country="Germany" operator="Group 3G UMTS" status="Not operational" 15 bands="TD-SCDMA" brand="Airdata" cc="de" country="Germany" status="Operational" 16 bands="MVNO" cc="de" country="Germany" operator="Telogic Germany GmbH" status="Not operational" 17 bands="" brand="E-Plus" cc="de" country="Germany" operator="E-Plus Mobilfunk" status="" 18 bands="MVNO" cc="de" country="Germany" operator="NetCologne" status="Operational" 19 bands="" cc="de" country="Germany" operator="Inquam Deutschland" status="" 20 bands="GSM" brand="OnePhone" cc="de" country="Germany" operator="E-Plus Mobilfunk" status="Operational" 33 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="simquadrat" cc="de" country="Germany" operator="sipgate GmbH" status="Operational" 41 bands="" cc="de" country="Germany" operator="First Telecom GmbH" status="" 42 bands="GSM 1800" brand="CCC Event" cc="de" country="Germany" operator="Chaos Computer Club" status="Temporary operational" 43 bands="" brand="LYCA" cc="de" country="Germany" operator="Lycamobile" status="Operational" 60 bands="GSM-R 900" cc="de" country="Germany" operator="DB Telematik" status="Operational" 76 bands="GSM 900" cc="de" country="Germany" operator="Siemens AG" status="Not operational" 77 bands="GSM 900" brand="E-Plus" cc="de" country="Germany" operator="E-Plus Mobilfunk" status="Operational" 78 bands="" brand="Telekom" cc="de" country="Germany" operator="Telekom Deutschland GmbH" status="" 79 bands="" cc="de" country="Germany" operator="ng4T GmbH" status="" 901 bands="" brand="Debitel" cc="de" country="Germany" status="Operational" 92 bands="GSM 1800 / UMTS 2100" cc="de" country="Germany" operator="Nash Technologies" status="Operational" 00-99 266 01 bands="GSM 900" brand="GibTel" cc="gi" country="Gibraltar (United Kingdom)" operator="Gibtelecom" status="Operational" 06 bands="UMTS 2100" brand="CTS Mobile" cc="gi" country="Gibraltar (United Kingdom)" operator="CTS Gibraltar" status="Not operational" 09 bands="GSM 1800 / UMTS 2100" brand="Shine" cc="gi" country="Gibraltar (United Kingdom)" operator="Eazitelecom" status="Operational" 00-99 268 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Vodafone" cc="pt" country="Portugal" operator="Vodafone Portugal" status="Operational" 02 bands="" brand="MEO" cc="pt" country="Portugal" operator="Telecomunicações Móveis Nacionais" status="" 03 bands="GSM 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="NOS" cc="pt" country="Portugal" operator="NOS Comunicações" status="Operational" 04 bands="MVNO" brand="LycaMobile" cc="pt" country="Portugal" operator="LycaMobile" status="Operational" 05 bands="UMTS 2100" cc="pt" country="Portugal" operator="Oniway - Inforcomunicaçôes, S.A." status="Not operational" 06 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="MEO" cc="pt" country="Portugal" operator="Telecomunicações Móveis Nacionais" status="Operational" 07 bands="MVNO" brand="Vectone Mobile / Delight Mobile" cc="pt" country="Portugal" operator="Mundio Mobile (Portugal) Limited" status="Operational" 11 bands="" cc="pt" country="Portugal" operator="Compatel, Limited" status="" 12 bands="GSM-R" cc="pt" country="Portugal" operator="Refer Telecom - Serviços de Telecomunicações, S.A." status="Operational" 21 bands="CDMA2000 450" brand="Zapp" cc="pt" country="Portugal" operator="Zapp Portugal" status="Not operational" 80 bands="" brand="MEO" cc="pt" country="Portugal" operator="Telecomunicações Móveis Nacionais" status="" 00-99 270 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="POST" cc="lu" country="Luxembourg" operator="POST Luxembourg" status="Operational" 02 bands="" cc="lu" country="Luxembourg" operator="MTX Connect S.a.r.l." status="" 10 bands="" cc="lu" country="Luxembourg" operator="Blue Communications" status="" 77 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Tango" cc="lu" country="Luxembourg" operator="Tango SA" status="Operational" 78 bands="" cc="lu" country="Luxembourg" operator="Interactive digital media GmbH" status="" 99 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Orange" cc="lu" country="Luxembourg" operator="Orange S.A." status="Operational" 00-99 272 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="Vodafone" cc="ie" country="Ireland" operator="Vodafone Ireland" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="3" cc="ie" country="Ireland" operator="Hutchison 3G Ireland limited" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="Meteor" cc="ie" country="Ireland" operator="Meteor Mobile Communications" status="Operational" 04 bands="" cc="ie" country="Ireland" operator="Access Telecom" status="" 05 bands="UMTS 2100 / LTE 1800" brand="3" cc="ie" country="Ireland" operator="Hutchison 3G Ireland limited" status="Operational" 07 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="eMobile" cc="ie" country="Ireland" operator="Eircom Mobile" status="Operational" 09 bands="" cc="ie" country="Ireland" operator="Clever Communications" status="" 11 bands="MVNO" brand="Tesco Mobile" cc="ie" country="Ireland" operator="Liffey Telecom" status="Operational" 13 bands="MVNO" brand="Lycamobile" cc="ie" country="Ireland" operator="Lycamobile" status="Operational" 15 bands="MVNO" brand="UPC Mobile" cc="ie" country="Ireland" operator="UPC" status="Operational" 16 bands="MVNO" brand="Carphone Warehouse" cc="ie" country="Ireland" operator="Carphone Warehouse" status="Operational" 00-99 274 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Síminn" cc="is" country="Iceland" operator="Iceland Telecom" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="Vodafone" cc="is" country="Iceland" operator="Og fjarskipti hf" status="Operational" 03 bands="" brand="Vodafone" cc="is" country="Iceland" operator="Og fjarskipti hf" status="Operational" 04 bands="GSM 1800" brand="Viking" cc="is" country="Iceland" operator="IMC Island ehf" status="Operational" 05 bands="GSM 1800" cc="is" country="Iceland" operator="Halló Frjáls fjarskipti hf." status="Not operational" 06 bands="" cc="is" country="Iceland" operator="Núll níu ehf" status="" 07 bands="GSM 1800" brand="IceCell" cc="is" country="Iceland" operator="IceCell ehf" status="Not operational" 08 bands="GSM 900 / GSM 1800" brand="On-waves" cc="is" country="Iceland" operator="Iceland Telecom" status="Operational" 11 bands="UMTS 2100 / LTE 1800" brand="Nova" cc="is" country="Iceland" operator="Nova ehf" status="Operational" 12 bands="MVNO" brand="Tal" cc="is" country="Iceland" operator="IP fjarskipti" status="Operational" 22 bands="" cc="is" country="Iceland" operator="Landhelgisgæslan (Icelandic Coast Guard)" status="" 00-99 276 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="AMC" cc="al" country="Albania" operator="Albanian Mobile Communications" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 /LTE 1800 / LTE 2600" brand="Vodafone" cc="al" country="Albania" operator="Vodafone Albania" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Eagle Mobile" cc="al" country="Albania" operator="Eagle Mobile" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="Plus Communication" cc="al" country="Albania" operator="Plus Communication" status="Operational" 00-99 278 01 bands="GSM 900 / UMTS 2100" brand="Vodafone" cc="mt" country="Malta" operator="Vodafone Malta" status="Operational" 11 bands="MVNO" cc="mt" country="Malta" operator="YOM Ltd." status="Operational" 21 bands="GSM 1800 / UMTS 2100" brand="GO" cc="mt" country="Malta" operator="Mobile Communications Limited" status="Operational" 30 bands="" brand="GO" cc="mt" country="Malta" operator="Mobile Communications Limited" status="" 77 bands="UMTS 2100" brand="Melita" cc="mt" country="Malta" operator="Melita Plc" status="Operational" 00-99 280 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Cytamobile-Vodafone" cc="cy" country="Cyprus" operator="Cyprus Telecommunications Authority" status="Operational" 10 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="MTN" cc="cy" country="Cyprus" operator="MTN Group" status="Operational" 20 bands="LTE 1800" brand="PrimeTel" cc="cy" country="Cyprus" operator="PrimeTel PLC" status="Operational" 22 bands="MVNO" brand="lemontel" cc="cy" country="Cyprus" operator="Lemontel Ltd" status="Operational" 23 bands="MVNO" cc="cy" country="Cyprus" operator="Mundio Mobile Cyprus Ltd." status="" 00-99 282 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Geocell" cc="ge" country="Georgia" operator="Geocell Limited" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="MagtiCom" cc="ge" country="Georgia" operator="Magticom GSM" status="Operational" 03 bands="CDMA 450" brand="MagtiCom" cc="ge" country="Georgia" operator="Magtifix" status="Operational" 04 bands="GSM 1800 / LTE 800" brand="Beeline" cc="ge" country="Georgia" operator="Mobitel LLC" status="Operational" 05 bands="CDMA 800" brand="Silknet" cc="ge" country="Georgia" operator="JSC Silknet" status="Operational" 06 bands="" cc="ge" country="Georgia" operator="JSC Compatel" status="" 07 bands="MVNO" brand="GlobalCell" cc="ge" country="Georgia" operator="GlobalCell Ltd" status="Operational" 08 bands="TD-LTE 2300" brand="Silk LTE" cc="ge" country="Georgia" operator="JSC Silknet" status="Operational" 09 bands="" cc="ge" country="Georgia" operator="Gmobile Ltd" status="" 00-99 283 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Beeline" cc="am" country="Armenia" operator="ArmenTel" status="Operational" 04 bands="GSM 900 / UMTS 900" brand="Karabakh Telecom" cc="am" country="Armenia" operator="Karabakh Telecom" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="VivaCell-MTS" cc="am" country="Armenia" operator="K Telecom CJSC" status="Operational" 10 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Orange" cc="am" country="Armenia" operator="Orange S.A." status="Operational" 00-99 284 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="M-Tel" cc="bg" country="Bulgaria" operator="Mobiltel" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Vivacom" cc="bg" country="Bulgaria" operator="BTC" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Telenor" cc="bg" country="Bulgaria" operator="Telenor (Bulgaria)" status="Operational" 07 bands="GSM-R" brand="НКЖИ" cc="bg" country="Bulgaria" operator="НАЦИОНАЛНА КОМПАНИЯ ЖЕЛЕЗОПЪТНА ИНФРАСТРУКТУРА" status="Operational" 09 bands="" cc="bg" country="Bulgaria" operator="COMPATEL LIMITED" status="Not operational" 11 bands="LTE 1800" cc="bg" country="Bulgaria" operator="Bulsatcom" status="Not operational" 13 bands="LTE 1800" brand="MAX" cc="bg" country="Bulgaria" operator="Max Telecom LTD" status="Operational" 00-99 286 01 bands="GSM 900 / UMTS 2100" brand="Turkcell" cc="tr" country="Turkey" operator="Turkcell Iletisim Hizmetleri A.S." status="Operational" 02 bands="GSM 900 / UMTS 2100" brand="Vodafone" cc="tr" country="Turkey" operator="Vodafone Turkey" status="Operational" 03 bands="GSM 1800 / UMTS 2100" brand="Avea" cc="tr" country="Turkey" status="Operational" 04 bands="GSM 1800" cc="tr" country="Turkey" operator="Aycell" status="Not operational" 00-99 288 01 bands="GSM 900 / UMTS 900 / UMTS 2100" brand="Faroese Telecom" cc="fo" country="Faroe Islands (Denmark)" operator="Faroese Telecom" status="Operational" 02 bands="GSM 900 / UMTS 2100" brand="Vodafone" cc="fo" country="Faroe Islands (Denmark)" operator="Vodafone Faroe Islands" status="Operational" 03 bands="GSM 1800" cc="fo" country="Faroe Islands (Denmark)" operator="Edge Mobile Sp/F" status="Not operational" 00-99 289 67 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Aquafon" country="Abkhazia - GE-AB" operator="Aquafon JSC" status="Operational" 88 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="A-Mobile" country="Abkhazia - GE-AB" operator="A-Mobile LLSC" status="Operational" 00-99 290 01 bands="GSM 900 / UMTS 900 / LTE 800" cc="gl" country="Greenland (Denmark)" operator="TELE Greenland A/S" status="Operational" 02 bands="" cc="gl" country="Greenland (Denmark)" operator="inu:it a/s" status="" 00-99 292 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="PRIMA" cc="sm" country="San Marino" operator="San Marino Telecom" status="Operational" 00-99 293 10 bands="GSM-R" cc="si" country="Slovenia" operator="SŽ - Infrastruktura, d.o.o." status="Not operational" 20 bands="" cc="si" country="Slovenia" operator="COMPATEL Ltd" status="" 40 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800" brand="Si.mobil" cc="si" country="Slovenia" operator="SI.MOBIL d.d." status="Operational" 41 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 900 / LTE 1800" brand="Mobitel" cc="si" country="Slovenia" operator="Telekom Slovenije" status="Operational" 64 bands="UMTS 2100" brand="T-2" cc="si" country="Slovenia" operator="T-2 d.o.o." status="Operational" 70 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Tušmobil" cc="si" country="Slovenia" operator="Tušmobil d.o.o." status="Operational" 00-99 294 01 bands="GSM 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Telekom.mk" cc="mk" country="Macedonia" operator="Makedonski Telekom" status="Operational" 02 bands="GSM 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="ONE" cc="mk" country="Macedonia" operator="One" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 800 / LTE 1800 / LTE 2600" brand="Vip MK" cc="mk" country="Macedonia" operator="VIP Operator" status="Operational" 10 bands="" cc="mk" country="Macedonia" operator="WTI Macedonia" status="" 11 bands="" cc="mk" country="Macedonia" operator="MOBIK TELEKOMUNIKACII DOOEL Skopje" status="" 00-99 295 01 bands="GSM 900 / GSM 1800" brand="Swisscom" cc="li" country="Liechtenstein" operator="Swisscom Schweiz AG" status="Operational" 02 bands="GSM 1800 / UMTS 2100 / LTE 1800 / LTE 2600" brand="7acht" cc="li" country="Liechtenstein" operator="Salt Liechtenstein AG" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800" brand="FL1" cc="li" country="Liechtenstein" operator="Telecom Liechtenstein AG" status="Operational" 06 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Cubic Telecom" cc="li" country="Liechtenstein" operator="Cubic Telecom AG" status="Operational" 07 bands="" cc="li" country="Liechtenstein" operator="First Mobile AG" status="" 09 bands="MVNO" cc="li" country="Liechtenstein" operator="EMnify GmbH" status="" 77 bands="GSM 900" brand="Alpmobil" cc="li" country="Liechtenstein" operator="Alpcom AG" status="Not operational" 00-99 297 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Telenor" cc="me" country="Montenegro" operator="Telenor Montenegro" status="Operational" 02 bands="GSM 900 / UMTS 2100 / LTE 1800" brand="T-Mobile" cc="me" country="Montenegro" operator="T-Mobile Montenegro LLC" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="m:tel CG" cc="me" country="Montenegro" operator="MTEL CG" status="Operational" 00-99 302 220 bands="UMTS 850 / UMTS 1900 / LTE 1700" brand="Telus Mobility, Koodo Mobile, Public Mobile" cc="ca" country="Canada" operator="Telus Mobility" status="Operational" 221 bands="" brand="Telus" cc="ca" country="Canada" operator="Telus Mobility" status="" 222 bands="" brand="Telus" cc="ca" country="Canada" operator="Telus Mobility" status="" 250 bands="" brand="ALO" cc="ca" country="Canada" operator="ALO Mobile Inc." status="" 270 bands="UMTS 1700 / LTE 1700" brand="EastLink" cc="ca" country="Canada" operator="Bragg Communications" status="Operational" 290 bands="iDEN 900" brand="Airtel Wireless" cc="ca" country="Canada" operator="Airtel Wireless" status="Operational" 320 bands="UMTS 1700" brand="Mobilicity" cc="ca" country="Canada" operator="DAVE Wireless" status="Operational" 340 bands="MVNO" brand="Execulink" cc="ca" country="Canada" operator="Execulink" status="Operational" 350 bands="GSM 850" brand="FIRST" cc="ca" country="Canada" operator="FIRST Networks Operations" status="Not operational" 360 bands="iDEN 800" brand="MiKe" cc="ca" country="Canada" operator="Telus Mobility" status="Operational" 361 bands="CDMA 800 / CDMA 1900" brand="Telus" cc="ca" country="Canada" operator="Telus Mobility" status="Operational" 370 bands="MVNO" brand="Fido" cc="ca" country="Canada" operator="Fido Solutions (Rogers Wireless)" status="Operational" 380 bands="UMTS 850 / UMTS 1900" brand="Keewaytinook Mobile" cc="ca" country="Canada" operator="Keewaytinook Okimakanak Mobile" status="Operational" 390 bands="" brand="DMTS" cc="ca" country="Canada" operator="Dryden Mobility" status="Not operational" 480 bands="" brand="SSi Connexions" cc="ca" country="Canada" operator="SSi Connexions" status="" 490 bands="UMTS 1700" brand="Wind Mobile" cc="ca" country="Canada" operator="Mid-Bowline Holdings Corp." status="Operational" 500 bands="UMTS 1700" brand="Videotron" cc="ca" country="Canada" operator="Videotron" status="Operational" 510 bands="UMTS 1700" brand="Videotron" cc="ca" country="Canada" operator="Videotron" status="Operational" 520 bands="" brand="Videotron" cc="ca" country="Canada" operator="Videotron" status="" 530 bands="GSM" brand="Keewaytinook Mobile" cc="ca" country="Canada" operator="Keewaytinook Okimakanak Mobile" status="Operational" 560 bands="CDMA / GSM" brand="Lynx Mobility" cc="ca" country="Canada" operator="Lynx Mobility" status="Operational" 570 bands="" brand="LightSquared" cc="ca" country="Canada" operator="LightSquared" status="" 590 bands="" brand="Quadro Mobility" cc="ca" country="Canada" operator="Quadro Communications Co-op" status="Operational" 610 bands="UMTS 850 / UMTS 1900 / LTE 1700 / LTE 2600" brand="Bell Mobility, Virgin Mobile Canada" cc="ca" country="Canada" operator="Bell Mobility" status="Operational" 620 bands="UMTS 850 / GSM 1900" brand="ICE Wireless" cc="ca" country="Canada" operator="ICE Wireless" status="Operational" 630 bands="" brand="Aliant Mobility" cc="ca" country="Canada" operator="Bell Aliant" status="" 640 bands="CDMA 800 / CDMA 1900" brand="Bell" cc="ca" country="Canada" operator="Bell Mobility" status="Operational" 652 bands="CDMA2000" cc="ca" country="Canada" operator="BC Tel Mobility (Telus)" status="Operational" 653 bands="CDMA 800 / CDMA 1900" brand="Telus" cc="ca" country="Canada" operator="Telus Mobility" status="Operational" 655 bands="CDMA 800 / 850 / CDMA 1900" brand="MTS" cc="ca" country="Canada" operator="MTS Mobility" status="Operational" 656 bands="CDMA2000 / UMTS 850 / UMTS 1900 / LTE 1700 / LTE 2600" brand="TBay" cc="ca" country="Canada" operator="Thunder Bay Telephone Mobility" status="Operational" 657 bands="CDMA 800 / CDMA 1900" brand="Telus" cc="ca" country="Canada" operator="Telus Mobility" status="Operational" 660 bands="UMTS 850 / UMTS 1900 / LTE 1700" brand="MTS" cc="ca" country="Canada" operator="MTS Mobility" status="Operational" 670 bands="" brand="CityTel Mobility" cc="ca" country="Canada" operator="CityWest" status="" 680 bands="CDMA 850 / TD-LTE 2600" brand="SaskTel" cc="ca" country="Canada" operator="SaskTel Mobility" status="Operational" 690 bands="UMTS 850 / UMTS 1900" brand="Bell" cc="ca" country="Canada" operator="Bell Mobility" status="Operational" 701 bands="CDMA2000" cc="ca" country="Canada" operator="MB Tel Mobility" status="Operational" 702 bands="CDMA2000" cc="ca" country="Canada" operator="MT&T Mobility (Aliant)" status="Operational" 703 bands="CDMA2000" cc="ca" country="Canada" operator="New Tel Mobility (Aliant)" status="Operational" 710 bands="Satellite CDMA" brand="Globalstar" cc="ca" country="Canada" status="Operational" 720 bands="GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900 / LTE 1700 / LTE 2600" brand="Rogers Wireless" cc="ca" country="Canada" operator="Rogers Communications" status="Operational" 730 bands="" brand="TerreStar Solutions" cc="ca" country="Canada" operator="TerreStar Networks" status="" 740 bands="" brand="Shaw Telecom" cc="ca" country="Canada" operator="Shaw Communications" status="Not operational" 750 bands="" brand="SaskTel" cc="ca" country="Canada" operator="SaskTel Mobility" status="" 760 bands="MVNO" brand="Public Mobile" cc="ca" country="Canada" operator="Telus Mobility" status="Operational" 770 bands="" brand="Rural Com" cc="ca" country="Canada" operator="Rural Com" status="" 780 bands="UMTS 850 / UMTS 1900 / LTE 2100" brand="SaskTel" cc="ca" country="Canada" operator="SaskTel Mobility" status="Operational" 790 bands="WiMAX" cc="ca" country="Canada" operator="NetSet Communications" status="Operational" 820 bands="" brand="Rogers Wireless" cc="ca" country="Canada" operator="Rogers Communications" status="" 860 bands="" brand="Telus" cc="ca" country="Canada" operator="Telus Mobility" status="" 880 bands="UMTS 850 / UMTS 1900" brand="Bell / Telus / SaskTel" cc="ca" country="Canada" operator="Shared Telus, Bell, and SaskTel" status="Operational" 920 bands="" brand="Rogers Wireless" cc="ca" country="Canada" operator="Rogers Communications" status="" 940 bands="" brand="Wightman Mobility" cc="ca" country="Canada" operator="Wightman Telecom" status="Operational" 000-999 308 01 bands="GSM 900" brand="Ameris" cc="pm" country="Saint Pierre and Miquelon (France)" operator="St. Pierre-et-Miquelon Télécom" status="Operational" 02 bands="GSM 900" brand="GLOBALTEL" cc="pm" country="Saint Pierre and Miquelon (France)" operator="GLOBALTEL" status="Operational" 00-99 310 004 bands="" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="Operational" 005 bands="CDMA2000 850 / CDMA2000 1900" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="Operational" 006 bands="" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="Operational" 010 bands="" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="Not operational" 012 bands="LTE 700 / LTE 1700 / LTE 1900" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="Operational" 013 bands="" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="" 014 bands="" cc="us" country="United States of America" status="" 015 bands="iDEN" brand="Southern LINC" cc="us" country="United States of America" operator="Southern Communications" status="" 016 bands="CDMA2000 1900 / CDMA2000 1700" brand="Cricket Wireless" cc="us" country="United States of America" operator="Cricket Communications" status="Operational" 017 bands="iDEN" brand="ProxTel" cc="us" country="United States of America" operator="North Sight Communications Inc." status="" 020 bands="GSM 850 / GSM 1900 / UMTS" brand="Union Wireless" cc="us" country="United States of America" operator="Union Telephone Company" status="Operational" 030 bands="GSM 850" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Operational" 032 bands="CDMA 1900 / GSM 1900 / LTE 700" brand="IT&E Wireless" cc="us" country="United States of America" operator="IT&E Overseas, Inc" status="Operational" 033 bands="" cc="us" country="United States of America" operator="Guam Telephone Authority" status="" 034 bands="iDEN" brand="Airpeak" cc="us" country="United States of America" operator="Airpeak" status="Operational" 035 bands="" brand="ETEX Wireless" cc="us" country="United States of America" operator="ETEX Communications, LP" status="" 040 bands="CDMA" brand="MTA" cc="us" country="United States of America" operator="Matanuska Telephone Association, Inc." status="Operational" 050 bands="CDMA" brand="GCI" cc="us" country="United States of America" operator="Alaska Communications" status="Operational" 053 bands="CDMA2000 1900" cc="us" country="United States of America" operator="Virgin Mobile US" status="Operational" 054 bands="" cc="us" country="United States of America" operator="Alltel US" status="Operational" 060 bands="" brand="CTEL" cc="us" country="United States of America" operator="Consolidated Telcom" status="" 066 bands="GSM / CDMA" brand="U.S. Cellular" cc="us" country="United States of America" operator="U.S. Cellular" status="Operational" 070 bands="GSM 850" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Operational" 080 bands="GSM 1900" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Operational" 090 bands="GSM 1900" brand="Cricket Wireless" cc="us" country="United States of America" operator="Cricket Communications" status="Operational" 100 bands="GSM 850 / UMTS 850 / UMTS AWS" brand="Plateau Wireless" cc="us" country="United States of America" operator="New Mexico RSA 4 East LP" status="Operational" 110 bands="CDMA / GSM 850 / LTE 700" brand="IT&E Wireless" cc="us" country="United States of America" operator="PTI Pacifica Inc." status="Operational" 120 bands="CDMA2000 1900 / LTE 850 / LTE 1900" brand="Sprint" cc="us" country="United States of America" operator="Sprint Corporation" status="Operational" 130 bands="CDMA2000 1900" brand="Carolina West Wireless" cc="us" country="United States of America" operator="Carolina West Wireless" status="Operational" 140 bands="GSM 850 / GSM 1900 / UMTS 850 / LTE 1700" brand="GTA Wireless" cc="us" country="United States of America" operator="Teleguam Holdings, LLC" status="Operational" 150 bands="GSM 850 / UMTS 850 / UMTS 1900" brand="Cricket Wireless" cc="us" country="United States of America" operator="AT&T Mobility" status="Operational" 160 bands="GSM 1900" brand="T-Mobile" cc="us" country="United States of America" operator="T-Mobile US" status="Operational" 170 bands="GSM 1900" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Operational" 180 bands="GSM 850 / UMTS 850 / UMTS 1900" brand="West Central" cc="us" country="United States of America" operator="West Central Wireless" status="Operational" 190 bands="GSM 850" brand="GCI" cc="us" country="United States of America" operator="Alaska Wireless Communications, LLC" status="Operational" 200 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 210 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 220 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 230 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 240 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 250 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 260 bands="GSM 1900 / UMTS 1900 / UMTS 1700 / LTE 700 / LTE 1900 / LTE 1700" brand="T-Mobile USA" cc="us" country="United States of America" operator="T-Mobile USA" status="Operational" 270 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 280 bands="GSM 1900" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Not Operational" 290 bands="GSM 1900" brand="nep" cc="us" country="United States of America" operator="NEP Cellcorp Inc." status="Operational" 300 bands="GSM 1900" brand="Big Sky Mobile" cc="us" country="United States of America" operator="iSmart Mobile, LLC" status="Operational" 310 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 311 bands="GSM 1900" cc="us" country="United States of America" operator="Farmers Wireless" status="Operational" 320 bands="GSM 850 / GSM 1900" brand="Cellular One" cc="us" country="United States of America" operator="Smith Bagley, Inc." status="Operational" 330 bands="CDMA" brand="Alltel" cc="us" country="United States of America" operator="Allied Wireless Communications Corporation (AWCC)" status="Not operational" 340 bands="GSM 1900" brand="Westlink Communications" cc="us" country="United States of America" operator="High Plains Midwest LLC" status="Not operational" 350 bands="CDMA" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="Not operational" 360 bands="CDMA" brand="Pioneer Cellular" cc="us" country="United States of America" operator="Cellular Network Partnership" status="Operational" 370 bands="GSM 1900 / UMTS 850 / LTE 700" brand="Docomo" cc="us" country="United States of America" operator="NTT Docomo Pacific" status="Operational" 380 bands="GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Not operational" 390 bands="GSM 850" brand="Cellular One of East Texas" cc="us" country="United States of America" operator="TX-11 Acquisition, LLC" status="Operational" 400 bands="GSM 1900" brand="i CAN_GSM" cc="us" country="United States of America" operator="Wave Runner LLC (Guam)" status="Operational" 410 bands="GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Operational" 420 bands="GSM 1900 / UMTS 1700" brand="Cincinnati Bell" cc="us" country="United States of America" operator="Cincinnati Bell Wireless" status="Not operational" 430 bands="GSM 1900" cc="us" country="United States of America" operator="Alaska Digitel" status="Operational" 440 bands="GSM 1900" brand="Cellular One" cc="us" country="United States of America" status="" 450 bands="GSM 850 / GSM 1900" brand="Viaero" cc="us" country="United States of America" operator="Viaero Wireless" status="Operational" 460 bands="GSM 1900" brand="Simmetry" cc="us" country="United States of America" operator="TMP Corporation" status="Not operational" 470 bands="CDMA2000 1900" brand="nTelos" cc="us" country="United States of America" operator="nTelos Communications, Inc." status="Operational" 480 bands="" cc="us" country="United States of America" operator="Choice Phone" status="Operational" 490 bands="GSM 850 / GSM 1900" brand="T-Mobile" cc="us" country="United States of America" status="Operational" 500 bands="CDMA2000 800 / CDMA2000 1900" brand="Alltel" cc="us" country="United States of America" status="Operational" 510 bands="" brand="Airtel" cc="us" country="United States of America" operator="Airtel Wireless" status="Operational" 520 bands="" brand="VeriSign" cc="us" country="United States of America" status="" 530 bands="" cc="us" country="United States of America" operator="West Virginia Wireless" status="Operational" 540 bands="GSM 1900" brand="Oklahoma Western" cc="us" country="United States of America" operator="Oklahoma Western Telephone Company" status="Operational" 560 bands="GSM 850" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Operational" 570 bands="GSM 850 / LTE 700" brand="Cellular One" cc="us" country="United States of America" operator="TX-10, LLC and Central Louisiana Cellular, LLC (MTPCS)" status="Operational" 580 bands="" brand="T-Mobile" cc="us" country="United States of America" status="Not operational" 59 bands="CDMA" brand="Cellular One" cc="bm" country="Bermuda" status="Operational" 590 bands="GSM 850 / GSM 1900" brand="Alltel" cc="us" country="United States of America" operator="Alltel Communications Inc" status="Operational" 600 bands="CDMA 850 / CDMA 1900 / LTE 700" brand="Cellcom" cc="us" country="United States of America" operator="New-Cell Inc." status="Operational" 610 bands="GSM 1900" brand="Epic Touch" cc="us" country="United States of America" operator="Elkhart Telephone Co." status="Operational" 620 bands="GSM 1900" brand="Coleman County Telecom" cc="us" country="United States of America" operator="Coleman County Telecommunications" status="Operational" 630 bands="LTE 700" brand="miSpot" cc="us" country="United States of America" operator="Agri-Valley Communications" status="Not operational" 640 bands="GSM 1900" brand="AirFire" cc="us" country="United States of America" operator="Airadigm Communications" status="Not Operational" 650 bands="GSM 850" brand="Jasper" cc="us" country="United States of America" operator="Jasper Wireless, Inc." status="Operational" 660 bands="GSM 1900" brand="T-Mobile" cc="us" country="United States of America" status="Not operational" 670 bands="" brand="Northstar" cc="us" country="United States of America" status="Operational" 680 bands="GSM 850 / GSM 1900" brand="AT&T" cc="us" country="United States of America" operator="AT&T Mobility" status="Operational" 690 bands="GSM 1900" brand="Limitless Mobile" cc="us" country="United States of America" operator="Limitless Mobile, LLC" status="Operational" 730 bands="" brand="U.S. Cellular" cc="us" country="United States of America" operator="U.S. Cellular" status="" 740 bands="" brand="Convey" cc="us" country="United States of America" operator="Convey Communications Inc." status="Operational" 750 bands="CDMA2000 850 / CDMA2000 1900" brand="Appalachian Wireless" cc="us" country="United States of America" operator="East Kentucky Network, LLC" status="Operational" 760 bands="" cc="us" country="United States of America" operator="Lynch 3G Communications Corporation" status="Not operational" 770 bands="GSM 1900" brand="i wireless" cc="us" country="United States of America" operator="Iowa Wireless Services" status="Operational" 780 bands="GSM 1900" cc="us" country="United States of America" operator="Airlink PCS" status="Not operational" 790 bands="GSM 1900" brand="PinPoint" cc="us" country="United States of America" operator="PinPoint Communications" status="Operational" 800 bands="GSM 1900" cc="us" country="United States of America" operator="T-Mobile" status="Not operational" 830 bands="GSM 850" brand="Caprock" cc="us" country="United States of America" operator="Caprock Cellular" status="Operational" 840 bands="GSM 1900" brand="telna Mobile" cc="us" country="United States of America" operator="Telecom North America Mobile, Inc." status="Operational" 850 bands="CDMA2000 850 / CDMA2000 1900 / GSM 850 / GSM 1900" brand="Aeris" cc="us" country="United States of America" operator="Aeris Communications, Inc." status="Operational" 860 bands="CDMA" brand="Five Star Wireless" cc="us" country="United States of America" operator="TX RSA 15B2, LP" status="Operational" 870 bands="GSM 850" brand="PACE" cc="us" country="United States of America" operator="Kaplan Telephone Company" status="Operational" 880 bands="GSM 850" brand="DTC Wireless" cc="us" country="United States of America" operator="Advantage Cellular Systems" status="Operational" 890 bands="GSM 850 / GSM 1900" brand="Unicel" cc="us" country="United States of America" operator="Rural Cellular Corporation" status="Operational" 900 bands="CDMA2000 850 / CDMA2000 1900" brand="Mid-Rivers Wireless" cc="us" country="United States of America" operator="Cable & Communications Corporation" status="Operational" 910 bands="GSM 850" brand="First Cellular" cc="us" country="United States of America" operator="First Cellular of Southern Illinois" status="Operational" 930 bands="CDMA" cc="us" country="United States of America" operator="Copper Valley Wireless" status="Operational" 940 bands="" cc="us" country="United States of America" operator="Iris Wireless LLC" status="Operational" 950 bands="GSM 850" brand="XIT Wireless" cc="us" country="United States of America" operator="Texas RSA 1 dba XIT Cellular" status="Operational" 960 bands="CDMA / LTE 700" cc="us" country="United States of America" operator="Strata Networks" status="Operational" 970 bands="Satellite" brand="Telemedicine Wireless" cc="us" country="United States of America" operator="Telemedicine Wireless (USA) Telecommunications,Inc" status="Operational" 980 bands="CDMA / LTE 700" brand="Peoples Telephone Cooperative, Inc." cc="us" country="United States of America" operator="Texas RSA 7B3" status="Operational" 990 bands="LTE 700" brand="Evolve Broadband" cc="us" country="United States of America" operator="Worldcall Interconnect Inc." status="Operational" 000-999 311 000 bands="CDMA2000 850 / CDMA2000 1900" cc="us" country="United States of America" operator="Mid-Tex Cellular" status="Operational" 010 bands="GSM 1900" brand="Chariton Valley" cc="us" country="United States of America" operator="Chariton Valley Communications" status="Operational" 012 bands="CDMA2000 850 / CDMA2000 1900" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="Operational" 020 bands="GSM 850" cc="us" country="United States of America" operator="Missouri RSA 5 Partnership" status="Operational" 030 bands="GSM 1900" cc="us" country="United States of America" operator="Indigo Wireless" status="Operational" 040 bands="GSM 850 / GSM 1900" cc="us" country="United States of America" operator="Commnet Wireless" status="Operational" 050 bands="CDMA" cc="us" country="United States of America" operator="Thumb Cellular LP" status="Operational" 060 bands="GSM 850 / GSM 1900" brand="Farmers Cellular" cc="us" country="United States of America" operator="Farmers Cellular Telephone" status="Operational" 070 bands="GSM 850" brand="Easterbrooke" cc="us" country="United States of America" operator="Easterbrooke Cellular Corporation" status="Operational" 080 bands="GSM 850 / LTE" brand="Pine Cellular" cc="us" country="United States of America" operator="Pine Telephone Company" status="Operational" 090 bands="GSM 1900" brand="Long Lines Wireless" cc="us" country="United States of America" operator="Long Lines Wireless LLC" status="Operational" 100 bands="GSM 1900" cc="us" country="United States of America" operator="High Plains Wireless" status="Operational" 110 bands="GSM 1900" cc="us" country="United States of America" operator="High Plains Wireless" status="Operational" 120 bands="" cc="us" country="United States of America" operator="Choice Phone" status="Operational" 130 bands="GSM 850" cc="us" country="United States of America" operator="Cell One Amarillo" status="Operational" 140 bands="CDMA" brand="Sprocket Wireless" cc="us" country="United States of America" operator="Cross Telephone / MBO Wireless" status="Operational" 150 bands="GSM 850" cc="us" country="United States of America" operator="Wilkes Cellular" status="Operational" 160 bands="" cc="us" country="United States of America" operator="Endless Mountains Wireless" status="Operational" 170 bands="GSM 850" brand="PetroCom" cc="us" country="United States of America" operator="Broadpoint Inc" status="Operational" 180 bands="GSM 850 / UMTS 850 / UMTS 1900" cc="us" country="United States of America" operator="Cingular Wireless" status="Not operational" 190 bands="" cc="us" country="United States of America" operator="Cellular Properties" status="" 210 bands="GSM 1900 / UMTS 2100" cc="us" country="United States of America" operator="Emery Telcom Wireless" status="Operational" 220 bands="CDMA" brand="U.S. Cellular" cc="us" country="United States of America" operator="U.S. Cellular" status="Operational" 230 bands="CDMA 850 / CDMA 1900 / LTE 1900 / LTE 1700" brand="C Spire Wireless" cc="us" country="United States of America" operator="Cellular South Inc." status="Operational" 250 bands="iDEN / GSM 1900 / LTE 700" brand="iConnect" cc="gu" country="Guam (United States of America)" operator="Wave Runner LLC / Choice Phone LLC" status="Operational" 330 bands="" brand="Bug Tussel Wireless" cc="us" country="United States of America" operator="Bug Tussel Wireless" status="Operational" 360 bands="UMTS 1700" cc="us" country="United States of America" operator="Stelera Wireless" status="Not operational" 370 bands="LTE 1700" brand="GCI Wireless" cc="us" country="United States of America" operator="General Communication Inc." status="Operational" 410 bands="LTE 700" brand="Chat Mobility" cc="us" country="United States of America" operator="Iowa RSA No. 2 LP" status="Operational" 420 bands="CDMA / LTE 700" brand="NorthwestCell" cc="us" country="United States of America" operator="Northwest Missouri Cellular LP" status="Operational" 450 bands="GSM 1900 / LTE 700" brand="PTCI" cc="us" country="United States of America" operator="Panhandle Telecommunication Systems Inc." status="Operational" 480 bands="LTE 700" brand="Verizon" cc="us" country="United States of America" operator="Verizon Wireless" status="Operational" 481 cc="us" country="United States of America" 490 bands="LTE 850 / LTE 1900 / TD-LTE 2500" brand="Sprint Corporation" cc="us" country="United States of America" operator="Sprint" status="Operational" 500 bands="UMTS / LTE 700 / LTE 1700" cc="us" country="United States of America" operator="Mosaic Telecom" status="Operational" 530 bands="" cc="us" country="United States of America" operator="Newcore Wireless" status="Operational" 570 bands="UMTS 1700 / LTE 1700" cc="us" country="United States of America" operator="BendBroadband" status="Not operational" 580 bands="LTE 700 / LTE 850" brand="U.S. Cellular" cc="us" country="United States of America" operator="U.S. Cellular" status="Operational" 630 bands="" brand="C Spire Wireless" cc="us" country="United States of America" operator="Cellular South Inc." status="" 640 bands="LTE 700" brand="Rock Wireless" cc="us" country="United States of America" operator="Standing Rock Telecommunications" status="Operational" 650 bands="CDMA / LTE 700 / WiMAX 3700" brand="United Wireless" cc="us" country="United States of America" operator="United Wireless" status="Operational" 660 bands="CDMA2000 1900 / CDMA 2000 1700 / LTE 1700" brand="metroPCS" cc="us" country="United States of America" operator="metroPCS" status="Operational" 750 bands="LTE" cc="us" country="United States of America" operator="NetAmerica Alliance" status="Operational" 810 bands="CDMA / LTE 700" brand="Bluegrass Wireless" cc="us" country="United States of America" operator="Bluegrass Wireless" status="Operational" 830 bands="LTE 700" cc="us" country="United States of America" operator="Thumb Cellular LP" status="Operational" 870 bands="MVNO" brand="Boost" cc="us" country="United States of America" operator="Boost Mobile" status="Operational" 910 bands="LTE" brand="Mobile Nation" cc="us" country="United States of America" operator="SI Wireless LLC" status="Operational" 930 bands="LTE 700" cc="us" country="United States of America" operator="Syringa Wireless" status="Operational" 950 bands="LTE 700" brand="ETC" cc="us" country="United States of America" operator="Enhanced Telecommmunications Corp. (Sunman Telecom)" status="Operational" 960 bands="MVNO" brand="Lycamobile" cc="us" country="United States of America" operator="Lyca Technology Solutions" status="Operational" 970 bands="LTE 1700" brand="Big River Broadband" cc="us" country="United States of America" operator="Big River Broadband, LLC" status="Operational" 990 bands="LTE 700 / LTE 1700" cc="us" country="United States of America" operator="VTel Wireless" status="Operational" 000-999 312 020 bands="LTE 700" cc="us" country="United States of America" operator="Infrastructure Networks, LLC" status="Operational" 030 bands="LTE 700" brand="Sprocket Wireless" cc="us" country="United States of America" operator="Cross Telephone / MBO Wireless" status="Operational" 040 bands="LTE 700" cc="us" country="United States of America" operator="Custer Telephone Co-op (CTCI)" status="Operational" 050 bands="LTE 700" cc="us" country="United States of America" operator="Fuego Wireless" status="Operational" 070 bands="LTE 700" cc="us" country="United States of America" operator="Adams Networks Inc" status="Operational" 080 bands="UMTS-TDD 700" brand="SyncSouth" cc="us" country="United States of America" operator="South Georgia Regional Information Technology Authority" status="Operational" 120 bands="LTE 700" brand="Appalachian Wireless" cc="us" country="United States of America" operator="East Kentucky Network, LLC" status="Operational" 130 bands="LTE 700" brand="Appalachian Wireless" cc="us" country="United States of America" operator="East Kentucky Network, LLC" status="Operational" 180 bands="" cc="us" country="United States of America" operator="Limiteless Mobile LLC" status="" 220 bands="LTE 700" cc="us" country="United States of America" operator="Chariton Valley Telephone" status="Operational" 270 bands="LTE 700" brand="Pioneer Cellular" cc="us" country="United States of America" operator="Cellular Network Partnership" status="Operational" 280 bands="LTE 700" brand="Pioneer Cellular" cc="us" country="United States of America" operator="Cellular Network Partnership" status="Operational" 330 bands="LTE 700" brand="Nemont" cc="us" country="United States of America" operator="Sagebrush Cellular" status="Operational" 340 bands="LTE 700" brand="MTA" cc="us" country="United States of America" operator="Matanuska Telephone Association, Inc." status="Operational" 350 bands="LTE" cc="us" country="United States of America" operator="Triangle Communications" status="Operational" 370 bands="LTE" cc="us" country="United States of America" operator="Choice Wireless" status="Operational" 380 bands="LTE 700" cc="us" country="United States of America" operator="Copper Valley Wireless" status="Operational" 400 bands="LTE 700" brand="Mid-Rivers Wireless" cc="us" country="United States of America" operator="Mid-Rivers Telephone Cooperative" status="Operational" 420 bands="LTE 700" cc="us" country="United States of America" operator="Nex-Tech Wireless" status="Operational" 460 bands="LTE 700" cc="us" country="United States of America" operator="Ketchikan Public Utilities (KPU)" status="Operational" 470 bands="LTE 700" brand="Carolina West Wireless" cc="us" country="United States of America" operator="Carolina West Wireless" status="Operational" 530 bands="" cc="us" country="United States of America" operator="Sprint Spectrum" status="Operational" 590 bands="LTE 2600" brand="NMU" cc="us" country="United States of America" operator="Northern Michigan University" status="Operational" 610 bands="LTE 1900" brand="nTelos" cc="us" country="United States of America" operator="nTelos Licenses, Inc." status="Operational" 660 bands="LTE 1900" brand="nTelos" cc="us" country="United States of America" operator="nTelos Wireless" status="Operational" 780 bands="TD-LTE 2500" cc="us" country="United States of America" operator="Redzone Wireless" status="Operational" 860 bands="CDMA / LTE 1900 / LTE 1700" brand="ClearTalk" cc="us" country="United States of America" operator="Flat Wireless, LLC" status="Operational" 900 bands="CDMA / LTE 1900 / LTE 1700" brand="ClearTalk" cc="us" country="United States of America" operator="Flat West Wireless, LLC" status="Operational" 000-999 313 100 bands="LTE 700" brand="FirstNet" cc="us" country="United States of America" operator="700 MHz Public Safety Broadband" status="" 101 cc="us" country="United States of America" 000-999 316 010 bands="iDEN 800" brand="Nextel" cc="us" country="United States of America" operator="Nextel Communications" status="Not operational" 011 bands="iDEN 800" brand="Southern LINC" cc="us" country="United States of America" operator="Southern Communications Services" status="Operational" 000-999 330 00 bands="PCS 1900" brand="Open Mobile" cc="pr" country="Puerto Rico" operator="PR Wireless" status="Operational" 110 bands="GSM 850 / GSM 1900 / UMTS 850 / LTE 700" brand="Claro Puerto Rico" cc="pr" country="Puerto Rico" operator="América Móvil" status="Operational" 120 bands="LTE 700" brand="tmobile" cc="pr" country="Puerto Rico" operator="PR Wireless" status="Operational" 00-99 334 001 bands="" cc="mx" country="Mexico" operator="Comunicaciones Digitales Del Norte, S.A. de C.V." status="" 010 bands="iDEN 800" brand="Nextel" cc="mx" country="Mexico" operator="Nextel México" status="Operational" 020 bands="TDMA 850 / GSM 1900 / UMTS 850 / LTE 1700" brand="Telcel" cc="mx" country="Mexico" operator="América Móvil" status="Operational" 030 bands="CDMA2000 800 / CDMA2000 1900 / GSM 1900 / UMTS 850 / LTE 1900" brand="movistar" cc="mx" country="Mexico" operator="Movistar - Telefónica Moviles" status="Operational" 040 bands="CDMA2000 800 / CDMA2000 1900" brand="Iusacell / Unefon" cc="mx" country="Mexico" operator="Iusacell / Unefon" status="Operational" 050 bands="GSM 850 / GSM 1900" brand="Iusacell" cc="mx" country="Mexico" operator="Iusacell" status="Operational" 060 bands="" cc="mx" country="Mexico" operator="Servicios de Acceso Inalambrico, S.A. de C.V." status="" 066 bands="" cc="mx" country="Mexico" operator="Telefonos de México, S.A.B. de C.V." status="" 070 bands="" cc="mx" country="Mexico" operator="Unefon" status="" 080 bands="" cc="mx" country="Mexico" operator="Unefon" status="" 090 bands="UMTS 1700" brand="Nextel" cc="mx" country="Mexico" operator="Nextel México" status="Operational" 000-999 338 020 bands="" brand="LIME" cc="jm" country="Jamaica" operator="LIME (Cable & Wireless)" status="Not operational" 050 bands="GSM 900 / GSM 1800 / GSM 1900" brand="Digicel" cc="tc" country="Turks and Caicos Islands" operator="Digicel (Turks & Caicos) Limited" status="Operational" 070 bands="GSM / UMTS / CDMA" brand="Claro" cc="jm" country="Jamaica" operator="Oceanic Digital Jamaica Limited" status="Not operational" 110 bands="" brand="LIME" cc="jm" country="Jamaica" operator="LIME (Cable & Wireless)" status="Operational" 180 bands="GSM 850 / GSM 1900 / UMTS 850" brand="LIME" cc="jm" country="Jamaica" operator="LIME (Cable & Wireless)" status="Operational" 000-999 340 01 bands="GSM 900 / UMTS 2100" brand="Orange" country="French Antilles (France) - BL/GF/GP/MF/MQ" operator="Orange Caraïbe Mobiles" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS" brand="Only" country="French Antilles (France) - BL/GF/GP/MF/MQ" operator="Outremer Telecom" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS" brand="Chippie" country="French Antilles (France) - BL/GF/GP/MF/MQ" operator="UTS Caraïbe" status="Operational" 08 bands="GSM 900 / GSM 1800 / UMTS" brand="Dauphin" country="French Antilles (France) - BL/GF/GP/MF/MQ" operator="Dauphin Telecom" status="Operational" 10 bands="" country="French Antilles (France) - BL/GF/GP/MF/MQ" operator="Guadeloupe Téléphone Mobile" status="Not operational" 11 bands="" country="French Antilles (France) - BL/GF/GP/MF/MQ" operator="Guyane Téléphone Mobile" status="Not operational" 12 bands="" country="French Antilles (France) - BL/GF/GP/MF/MQ" operator="Martinique Téléphone Mobile" status="Not operational" 20 bands="GSM 900 / UMTS 2100" brand="Digicel" country="French Antilles (France) - BL/GF/GP/MF/MQ" operator="DIGICEL Antilles Française Guyane" status="Operational" 00-99 342 600 bands="GSM 1900 / UMTS" brand="LIME" cc="bb" country="Barbados" operator="LIME (formerly known as Cable & Wireless)" status="Operational" 750 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Digicel" cc="bb" country="Barbados" operator="Digicel (Barbados) Limited" status="Operational" 820 bands="" cc="bb" country="Barbados" operator="Sunbeach Communications" status="Reserved" 000-999 344 030 bands="GSM 1900" brand="APUA" cc="ag" country="Antigua and Barbuda" operator="Antigua Public Utilities Authority" status="Operational" 050 bands="GSM 900 / GSM 1900 / UMTS 850 / LTE 700" brand="Digicel" cc="ag" country="Antigua and Barbuda" operator="Antigua Wireless Ventures Limited" status="Operational" 920 bands="GSM 850 / GSM 1800 / GSM 1900 / UMTS / LTE 1700" brand="LIME" cc="ag" country="Antigua and Barbuda" operator="Cable & Wireless Caribbean Cellular (Antigua) Limited" status="Operational" 930 bands="" cc="ag" country="Antigua and Barbuda" operator="AT&T Wireless" status="" 000-999 346 050 bands="GSM 900 / GSM 1800 / UMTS / LTE 1800" brand="Digicel" cc="ky" country="Cayman Islands (United Kingdom)" operator="Digicel Cayman Ltd." status="Operational" 140 bands="GSM 850 / GSM 1900 / UMTS / LTE 700" brand="LIME" cc="ky" country="Cayman Islands (United Kingdom)" operator="Cable & Wireless (Cayman Islands) Limited" status="Operational" 000-999 348 170 bands="GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900" brand="LIME" cc="vg" country="British Virgin Islands" operator="Cable & Wireless" status="Operational" 370 bands="" cc="vg" country="British Virgin Islands" operator="BVI Cable TV Ltd" status="" 570 bands="GSM 900 / GSM 1900" brand="CCT Boatphone" cc="vg" country="British Virgin Islands" operator="Caribbean Cellular Telephone" status="Operational" 770 bands="GSM 1800 / GSM 1900 / UMTS" brand="Digicel" cc="vg" country="British Virgin Islands" operator="Digicel (BVI) Limited" status="Operational" 000-999 350 00 bands="GSM 1900 / UMTS 850" brand="CellOne" cc="bm" country="Bermuda" operator="Bermuda Digital Communications Ltd." status="Operational" 01 bands="GSM 1900" brand="Digicel Bermuda" cc="bm" country="Bermuda" operator="Telecommunications (Bermuda & West Indies) Ltd" status="Reserved" 02 bands="GSM 1900 / UMTS" brand="Mobility" cc="bm" country="Bermuda" operator="M3 Wireless" status="Operational" 00-99 352 030 bands="GSM 900 / GSM 1800" brand="Digicel" cc="gd" country="Grenada" operator="Digicel Grenada Ltd." status="Operational" 110 bands="GSM 850" brand="Cable & Wireless" cc="gd" country="Grenada" operator="Cable & Wireless Grenada Ltd." status="Operational" 000-999 354 860 bands="GSM 850" brand="Cable & Wireless" cc="ms" country="Montserrat (United Kingdom)" operator="Cable & Wireless" status="Operational" 000-999 356 050 bands="GSM 900 / GSM 1800" brand="Digicel" cc="kn" country="Saint Kitts and Nevis" operator="Wireless Ventures (St Kitts-Nevis) Limited" status="Operational" 070 brand="Chippie" cc="kn" country="Saint Kitts and Nevis" operator="UTS" status="Operational" 110 bands="GSM 850 / GSM 1900" brand="LIME" cc="kn" country="Saint Kitts and Nevis" operator="Cable & Wireless St. Kitts & Nevis Ltd" status="Operational" 000-999 358 050 bands="GSM 900 / GSM 1800 / GSM 1900" brand="Digicel" cc="lc" country="Saint Lucia" status="" 110 bands="GSM 850" cc="lc" country="Saint Lucia" operator="Cable & Wireless" status="" 000-999 360 070 bands="GSM 900 / GSM 1800 / GSM 1900" brand="Digicel" cc="vc" country="Saint Vincent and the Grenadines" operator="Digicel (St. Vincent and the Grenadines) Limited" status="Operational" 100 bands="GSM 850" brand="Cingular Wireless" cc="vc" country="Saint Vincent and the Grenadines" status="" 110 bands="GSM 850" brand="Lime" cc="vc" country="Saint Vincent and the Grenadines" operator="Cable & Wireless (St. Vincent & the Grenadines) Ltd" status="Operational" 000-999 362 31 bands="GSM" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="Eutel N.V." status="" 33 bands="GSM" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="WICC N.V." status="" 51 bands="GSM 900 / UMTS 2100" brand="Telcell" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="Telcell N.V." status="Operational" 54 bands="GSM 900 / GSM 1800" brand="ECC" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="East Caribbean Cellular" status="Operational" 59 bands="GSM 900 / GSM 1800" brand="Chippie" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="United Telecommunication Service N.V. (UTS)" status="Operational" 60 bands="UMTS 2100" brand="Chippie" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="United Telecommunication Service N.V. (UTS)" status="Operational" 63 bands="" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="CSC N.V." status="" 68 bands="UMTS 2100" brand="Digicel" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="Curaçao Telecom N.V." status="Operational" 69 bands="GSM 900 / GSM 1800" brand="Digicel" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="Curaçao Telecom N.V." status="Operational" 74 bands="" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="PCS N.V." status="" 76 bands="GSM 900 / UMTS" brand="Digicel" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="Antiliano Por N.V." status="Operational" 78 bands="UMTS 900 / LTE 1800" brand="Telbo" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="Telefonia Bonairiano N.V." status="Operational" 91 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 1800" brand="Chippie" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="United Telecommunication Service N.V. (UTS)" status="Operational" 94 bands="TDMA PCS" brand="Bayòs" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="Bòbò Frus N.V." status="Operational" 95 bands="CDMA2000 850" brand="MIO" country="Former Netherlands Antilles (Kingdom of the Netherlands) - BQ/CW/SX" operator="E.O.C.G. Wireless" status="Not operational" 00-99 363 01 bands="GSM 900 / GSM 1800 / GSM 1900 / UMTS 2100 / LTE 1800 / TDMA 800" brand="SETAR" cc="aw" country="Aruba (Kingdom of the Netherlands)" operator="Servicio di Telecomunicacion di Aruba" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Digicel" cc="aw" country="Aruba (Kingdom of the Netherlands)" operator="Digicel Aruba" status="Operational" 00-99 364 390 bands="GSM 850 / GSM 1900 / UMTS 850 / LTE 700" brand="BTC" cc="bs" country="Bahamas" operator="The Bahamas Telecommunications Company Ltd (BaTelCo)" status="Operational" 000-999 365 010 bands="" cc="ai" country="Anguilla" operator="Weblinks Limited" status="Operational" 840 bands="GSM 850 / UMTS" brand="LIME" cc="ai" country="Anguilla" operator="Cable & Wireless" status="Operational" 000-999 366 020 bands="GSM 900 / GSM 1900 / UMTS" brand="Digicel" cc="dm" country="Dominica" operator="Digicel Group Limited" status="Operational" 110 bands="GSM 850 / UMTS" brand="LIME" cc="dm" country="Dominica" operator="Cable & Wireless" status="Operational" 000-999 368 01 bands="GSM 900 / GSM 850" brand="CUBACEL" cc="cu" country="Cuba" operator="Empresa de Telecomunicaciones de Cuba, SA" status="Operational" 00-99 370 01 bands="GSM 900 / GSM 1800 / GSM 1900 / UMTS 900 / LTE 1800" brand="Orange" cc="do" country="Dominican Republic" operator="Orange Dominicana" status="Operational" 02 bands="GSM 850 / GSM 1900 / UMTS 850 / LTE 1700" brand="Claro" cc="do" country="Dominican Republic" operator="Compañía Dominicana de Teléfonos" status="Operational" 03 bands="AMPS / IS-95A 800 / CDMA 1900 / LTE 1900" brand="Tricom" cc="do" country="Dominican Republic" operator="Tricom, S.A" status="Operational" 04 bands="CDMA 1900 / GSM 1900" brand="Viva" cc="do" country="Dominican Republic" operator="Trilogy Dominicana, S.A." status="Operational" 05 bands="TD-LTE 2600" brand="Wind" cc="do" country="Dominican Republic" operator="WIND Telecom, S.A" status="Operational" 00-99 372 01 bands="GSM 850" brand="Voila" cc="ht" country="Haiti" operator="Communication Cellulaire d'Haiti S.A." status="Operational" 02 bands="GSM 1800" brand="Digicel" cc="ht" country="Haiti" operator="Unigestion Holding S.A." status="Operational" 03 bands="GSM 900 / GSM 1800 / UTMS 2100" brand="Natcom" cc="ht" country="Haiti" operator="NATCOM S.A." status="Operational" 00-99 374 12 bands="GSM 850 / GSM 1900 / UMTS 1900" brand="bmobile" cc="tt" country="Trinidad and Tobago" operator="TSTT" status="Operational" 130 bands="GSM 850 / GSM 1900 / UMTS 1900" brand="Digicel" cc="tt" country="Trinidad and Tobago" operator="Digicel (Trinidad & Tobago) Limited" status="Operational" 140 bands="CDMA" cc="tt" country="Trinidad and Tobago" operator="LaqTel Ltd." status="Not operational" 00-99 376 350 bands="GSM 850" brand="C&W" cc="tc" country="Turks and Caicos Islands" operator="Cable & Wireless West Indies Ltd (Turks & Caicos)" status="Operational" 352 bands="UMTS 850" brand="IslandCom" cc="tc" country="Turks and Caicos Islands" operator="IslandCom Telecommunications" status="Operational" 360 bands="" brand="IslandCom" cc="tc" country="Turks and Caicos Islands" operator="IslandCom Telecommunications" status="" 000-999 400 01 bands="GSM 900 / GSM 1800/ UMTS 2100 / LTE 1800" brand="Azercell" cc="az" country="Azerbaijan" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Bakcell" cc="az" country="Azerbaijan" status="Operational" 03 bands="CDMA 450" brand="FONEX" cc="az" country="Azerbaijan" operator="CATEL" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Nar Mobile" cc="az" country="Azerbaijan" operator="Azerfon" status="Operational" 05 bands="TETRA?" cc="az" country="Azerbaijan" operator="Special State Protection Service of the Republic of Azerbaijan" status="" 06 bands="CDMA 800" brand="Naxtel" cc="az" country="Azerbaijan" operator="Nakhtel LLC" status="Operational" 00-99 401 01 bands="GSM 900 / GSM 1800" brand="Beeline" cc="kz" country="Kazakhstan" operator="KaR-Tel LLP" status="Operational" 02 bands="GSM 900 / GSM 1800" brand="Kcell" cc="kz" country="Kazakhstan" operator="Kcell JSC" status="Operational" 07 bands="UMTS 850 / GSM 1800 / LTE 1800" brand="Altel" cc="kz" country="Kazakhstan" operator="Altel" status="Operational" 08 bands="CDMA2000 800 / CDMA2000 450" brand="Kazakhtelecom" cc="kz" country="Kazakhstan" status="Operational" 77 bands="GSM 900 / GSM 1800 / UMTS 900" brand="Tele2.kz" cc="kz" country="Kazakhstan" operator="MTS" status="Operational" 00-99 402 11 bands="GSM 900 / UMTS 850 / UMTS 2100 / LTE 1800" brand="B-Mobile" cc="bt" country="Bhutan" operator="B-Mobile / Bhutan Telecom Ltd." status="Operational" 77 bands="GSM 900 / GSM 1800 / UMTS" brand="TashiCell" cc="bt" country="Bhutan" operator="Tashi InfoComm Limited" status="Operational" 00-99 404 01 bands="GSM 900" brand="Vodafone IN" cc="in" country="India" operator="Haryana" status="Operational" 02 bands="GSM 900" brand="AirTel" cc="in" country="India" operator="Punjab" status="Operational" 03 bands="GSM 900" brand="AirTel" cc="in" country="India" operator="Himachal Pradesh" status="Operational" 04 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Delhi & NCR" status="Operational" 05 bands="GSM 900" brand="Vodafone IN" cc="in" country="India" operator="Gujarat" status="Operational" 07 bands="GSM 900" brand="IDEA" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 09 bands="GSM 900" brand="Reliance" cc="in" country="India" operator="Assam" status="Operational" 10 bands="GSM 900" brand="AirTel" cc="in" country="India" operator="Delhi & NCR" status="Operational" 11 bands="GSM 900 / GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Delhi & NCR" status="Operational" 12 bands="GSM 900" brand="IDEA" cc="in" country="India" operator="Haryana" status="Operational" 13 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 14 bands="GSM 900 / GSM 1800" brand="IDEA" cc="in" country="India" operator="Punjab" status="Operational" 15 bands="GSM 900" brand="Vodafone IN" cc="in" country="India" operator="Uttar Pradesh (East)" status="Operational" 16 bands="GSM 900" brand="Airtel" cc="in" country="India" operator="North East" status="Operational" 17 bands="GSM 900 / GSM 1800" brand="AIRCEL" cc="in" country="India" operator="West Bengal" status="Operational" 18 bands="GSM 900" brand="Reliance" cc="in" country="India" operator="Himachal Pradesh" status="Operational" 19 bands="GSM 900 / GSM 1800" brand="IDEA" cc="in" country="India" operator="Kerala" status="Operational" 20 bands="GSM 900 / UMTS 2100" brand="Vodafone IN" cc="in" country="India" operator="Mumbai" status="Operational" 21 bands="GSM 900" brand="Loop Mobile" cc="in" country="India" operator="Mumbai" status="Operational" 22 bands="GSM 900" brand="IDEA" cc="in" country="India" operator="Maharashtra & Goa" status="Operational" 24 bands="GSM 900" brand="IDEA" cc="in" country="India" operator="Gujarat" status="Operational" 25 bands="GSM 900 / GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Bihar" status="Operational" 27 bands="GSM 900" brand="Vodafone IN" cc="in" country="India" operator="Maharashtra & Goa" status="Operational" 28 bands="GSM 900" brand="AIRCEL" cc="in" country="India" operator="Orissa" status="Operational" 29 bands="GSM 900" brand="AIRCEL" cc="in" country="India" operator="Assam" status="Operational" 30 bands="GSM 900 / GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Kolkata" status="Operational" 31 bands="GSM 900" brand="AirTel" cc="in" country="India" operator="Kolkata" status="Operational" 34 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Haryana" status="Operational" 36 bands="GSM 900" brand="Reliance" cc="in" country="India" operator="Bihar & Jharkhand" status="Operational" 37 bands="GSM 900 / UMTS 2100" brand="Aircel" cc="in" country="India" operator="Jammu & Kashmir" status="Operational" 38 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Assam" status="Operational" 40 bands="" brand="AirTel" cc="in" country="India" operator="Chennai" status="Operational" 41 bands="GSM 900" brand="Aircel" cc="in" country="India" operator="Chennai" status="Operational" 42 bands="GSM 900" brand="Aircel" cc="in" country="India" operator="Tamil Nadu" status="Operational" 43 bands="GSM 900" brand="Vodafone IN" cc="in" country="India" operator="Tamil Nadu" status="Operational" 44 bands="GSM 900" brand="IDEA" cc="in" country="India" operator="Karnataka" status="Operational" 45 bands="GSM" brand="Airtel" cc="in" country="India" operator="Karnataka" status="Operational" 46 bands="GSM 900" brand="Vodafone IN" cc="in" country="India" operator="Kerala" status="Operational" 48 bands="GSM 900" brand="Dishnet Wireless" cc="in" country="India" operator="" status="Operational" 49 bands="GSM 900" brand="Airtel" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 50 bands="GSM 900" brand="Reliance" cc="in" country="India" operator="North East" status="Operational" 51 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Himachal Pradesh" status="Operational" 52 bands="GSM 900" brand="Reliance" cc="in" country="India" operator="Orissa" status="Operational" 53 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Punjab" status="Operational" 54 bands="GSM 900 / UTMS 2100" brand="CellOne" cc="in" country="India" operator="Uttar Pradesh (West)" status="Operational" 55 bands="GSM 900 / UTMS 2100" brand="CellOne" cc="in" country="India" operator="Uttar Pradesh (East)" status="Operational" 56 bands="GSM 900" brand="IDEA" cc="in" country="India" operator="Uttar Pradesh (West)" status="Operational" 57 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Gujarat" status="Operational" 58 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Madhya Pradesh & Chhattisgarh" status="Operational" 59 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Rajasthan" status="Operational" 60 bands="GSM 900" brand="Vodafone IN" cc="in" country="India" operator="Rajasthan" status="Operational" 62 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Jammu & Kashmir" status="Operational" 64 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Chennai" status="Operational" 66 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Maharashtra & Goa" status="Operational" 67 bands="GSM 900 / UMTS 2100" brand="Reliance" cc="in" country="India" operator="Madhya Pradesh & Chhattisgarh" status="Operational" 68 bands="GSM 900 / UMTS 2100" brand="DOLPHIN" cc="in" country="India" operator="Delhi & NCR" status="Operational" 69 bands="GSM 900 / UMTS 2100" brand="DOLPHIN" cc="in" country="India" operator="Mumbai" status="Operational" 70 bands="" brand="AirTel" cc="in" country="India" operator="Rajasthan" status="Operational" 71 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Karnataka (Bangalore)" status="Operational" 72 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Kerala" status="Operational" 73 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 74 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="West Bengal" status="Operational" 75 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Bihar" status="Operational" 76 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Orissa" status="Operational" 77 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="North East" status="Operational" 78 bands="GSM 900 / UMTS 2100" brand="Idea Cellular Ltd" cc="in" country="India" operator="Madhya Pradesh & Chattishgarh" status="Operational" 79 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Andaman Nicobar" status="Operational" 80 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Tamil Nadu" status="Operational" 81 bands="GSM 900 / UMTS 2100" brand="CellOne" cc="in" country="India" operator="Kolkata" status="Operational" 82 bands="" brand="Idea" cc="in" country="India" operator="Himachal Pradesh" status="Operational" 83 bands="GSM 1800" brand="Reliance" cc="in" country="India" operator="Kolkata" status="Operational" 84 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Chennai" status="Operational" 85 bands="GSM 1800" brand="Reliance" cc="in" country="India" operator="West Bengal" status="Operational" 86 bands="GSM 900 / UMTS 2100" brand="Vodafone IN" cc="in" country="India" operator="Karnataka" status="Operational" 87 bands="" brand="IDEA" cc="in" country="India" operator="Rajasthan" status="Operational" 88 bands="" brand="Vodafone IN" cc="in" country="India" operator="Vodafone Punjab" status="Operational" 89 bands="" brand="Idea" cc="in" country="India" operator="Uttar Pradesh (East)" status="Operational" 90 bands="GSM 1800" brand="AirTel" cc="in" country="India" operator="Maharashtra" status="Operational" 91 bands="GSM 900" brand="AIRCEL" cc="in" country="India" operator="Kolkata" status="Operational" 92 bands="GSM 1800 / UMTS 2100" brand="AirTel" cc="in" country="India" operator="Mumbai" status="Operational" 93 bands="GSM 1800" brand="AirTel" cc="in" country="India" operator="Madhya Pradesh" status="Operational" 94 bands="" brand="AirTel" cc="in" country="India" operator="Tamil Nadu" status="Operational" 95 bands="GSM 1800" brand="AirTel" cc="in" country="India" operator="Kerala" status="Operational" 96 bands="GSM 1800" brand="AirTel" cc="in" country="India" operator="Haryana" status="Operational" 97 bands="" brand="AirTel" cc="in" country="India" operator="Uttar Pradesh (West)" status="Operational" 98 bands="" brand="AirTel" cc="in" country="India" operator="Gujarat" status="Operational" 00-99 405 01 bands="GSM 1800" brand="Reliance" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 025 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 026 bands="CDMA 2000" brand="TATA DOCOMO" cc="in" country="India" operator="Assam" status="Operational" 027 bands="CDMA 2000 / GSM 1800" brand="TATA DOCOMO" cc="in" country="India" operator="Bihar/Jharkhand" status="Operational" 028 bands="CDMA 2000 / GSM 1800" brand="TATA DOCOMO" cc="in" country="India" operator="Chennai" status="Operational" 029 bands="CDMA 2000" brand="TATA DOCOMO" cc="in" country="India" operator="Delhi" status="Operational" 03 bands="GSM 1800" brand="Reliance" cc="in" country="India" operator="Bihar" status="Operational" 030 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Gujarat" status="Operational" 031 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Haryana" status="Operational" 032 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Himachal Pradesh" status="Operational" 033 bands="CDMA 2000" brand="TATA DOCOMO" cc="in" country="India" operator="Jammu & Kashmir" status="Operational" 034 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Karnataka" status="Operational" 035 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Kerala" status="Operational" 036 bands="CDMA 2000 / GSM 1800" brand="TATA DOCOMO" cc="in" country="India" operator="Kolkata" status="Operational" 037 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Maharashtra & Goa" status="Operational" 038 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Madhya Pradesh" status="Operational" 039 bands="CDMA 2000 / GSM 1800" brand="TATA DOCOMO" cc="in" country="India" operator="Mumbai" status="Operational" 04 bands="GSM 1800" brand="Reliance" cc="in" country="India" operator="Chennai" status="Operational" 041 bands="CDMA 2000 / GSM 1800" brand="TATA DOCOMO" cc="in" country="India" operator="Orissa" status="Operational" 042 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Punjab" status="Operational" 043 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Rajasthan" status="Operational" 044 bands="CDMA 2000 / GSM 1800" brand="TATA DOCOMO" cc="in" country="India" operator="Tamil Nadu including Chennai" status="Operational" 045 bands="CDMA 2000 / GSM 1800" brand="TATA DOCOMO" cc="in" country="India" operator="Uttar Pradesh (E)" status="Operational" 046 bands="CDMA 2000 / GSM 1800 / UMTS 2100" brand="TATA DOCOMO" cc="in" country="India" operator="Uttar Pradesh (W) & Uttarkhand" status="Operational" 047 bands="CDMA 2000 / GSM 1800" brand="TATA DOCOMO" cc="in" country="India" operator="West Bengal" status="Operational" 05 bands="GSM 1800" brand="Reliance" cc="in" country="India" operator="Delhi & NCR" status="Operational" 06 bands="GSM 1800" brand="Reliance" cc="in" country="India" operator="Gujarat" status="Operational" 07 bands="GSM" brand="Reliance" cc="in" country="India" operator="Haryana" status="Operational" 08 bands="GSM" brand="Reliance" cc="in" country="India" operator="Himachal Pradesh" status="Operational" 09 bands="GSM 1800 / UMTS 2100" brand="Reliance" cc="in" country="India" operator="Jammu & Kashmir" status="Operational" 10 bands="GSM" brand="Reliance" cc="in" country="India" operator="Karnataka" status="Operational" 11 bands="GSM" brand="Reliance" cc="in" country="India" operator="Kerala" status="Operational" 12 bands="GSM" brand="Reliance" cc="in" country="India" operator="Kolkata" status="Operational" 13 bands="GSM" brand="Reliance" cc="in" country="India" operator="Maharashtra & Goa" status="Operational" 14 bands="GSM" brand="Reliance" cc="in" country="India" operator="Madhya Pradesh" status="Operational" 15 bands="GSM 1800 / UMTS 2100" brand="Reliance" cc="in" country="India" operator="Mumbai" status="Operational" 17 bands="GSM" brand="Reliance" cc="in" country="India" operator="Orissa" status="Operational" 18 bands="GSM" brand="Reliance" cc="in" country="India" operator="Punjab" status="Operational" 19 bands="GSM" brand="Reliance" cc="in" country="India" operator="Rajasthan" status="Operational" 20 bands="GSM" brand="Reliance" cc="in" country="India" operator="Tamil Nadu" status="Operational" 21 bands="GSM" brand="Reliance" cc="in" country="India" operator="Uttar Pradesh (East)" status="Operational" 22 bands="GSM" brand="Reliance" cc="in" country="India" operator="Uttar Pradesh (West)" status="Operational" 23 bands="GSM" brand="Reliance" cc="in" country="India" operator="West Bengal" status="Operational" 51 bands="GSM 900" brand="AirTel" cc="in" country="India" operator="West Bengal" status="Operational" 52 bands="GSM 900" brand="AirTel" cc="in" country="India" operator="Bihar & Jharkhand" status="Operational" 53 bands="GSM" brand="AirTel" cc="in" country="India" operator="Orissa" status="Operational" 54 bands="GSM 900" brand="AirTel" cc="in" country="India" operator="Uttar Pradesh (East)" status="Operational" 55 bands="GSM 900 / UTMS 2100" brand="Airtel" cc="in" country="India" operator="Jammu & Kashmir" status="Operational" 56 bands="GSM 900 / GSM 1800" brand="AirTel" cc="in" country="India" operator="Assam" status="Operational" 66 bands="GSM 900 / GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Uttar Pradesh (West)" status="Operational" 67 bands="" brand="Vodafone IN" cc="in" country="India" operator="West Bengal" status="Operational" 70 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Bihar & Jharkhand" status="Operational" 750 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Jammu & Kashmir" status="Operational" 751 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Assam" status="Operational" 752 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Bihar & Jharkhand" status="Operational" 753 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Orissa" status="Operational" 754 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Himachal Pradesh" status="Operational" 755 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="North East" status="Operational" 756 bands="GSM 1800" brand="Vodafone IN" cc="in" country="India" operator="Madhya Pradesh & Chhattisgarh" status="Operational" 799 bands="GSM 900 / GSM 1800" brand="IDEA" cc="in" country="India" operator="Mumbai" status="Operational" 800 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Delhi & NCR" status="Operational" 801 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 802 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Gujarat" status="Not operational" 803 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Karnataka" status="Operational" 804 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Maharashtra & Goa" status="Operational" 805 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Mumbai" status="Operational" 806 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Rajasthan" status="Operational" 807 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Haryana" status="Not operational" 808 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Madhya Pradesh" status="Not operational" 809 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Kerala" status="Operational" 810 bands="GSM 1800" brand="AIRCEL" cc="in" country="India" operator="Uttar Pradesh (East)" status="Operational" 811 bands="GSM" brand="AIRCEL" cc="in" country="India" operator="Uttar Pradesh (West)" status="Operational" 812 bands="GSM" brand="AIRCEL" cc="in" country="India" operator="Punjab" status="Not operational" 818 bands="GSM" brand="Uninor" cc="in" country="India" operator="Uttar Pradesh (West)" status="Operational" 819 bands="GSM" brand="Uninor" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 820 bands="GSM 1800" brand="Uninor" cc="in" country="India" operator="Karnataka" status="Operational" 821 bands="GSM 1800" brand="Uninor" cc="in" country="India" operator="Kerala" status="Operational" 822 bands="GSM" brand="Uninor" cc="in" country="India" operator="Kolkata" status="Operational" 824 bands="GSM 1800" brand="Videocon Datacom" cc="in" country="India" operator="Assam" status="Reserved" 827 bands="GSM 1800" brand="Videocon Datacom" cc="in" country="India" operator="Gujarat" status="Operational" 834 bands="GSM 1800" brand="Videocon Datacom" cc="in" country="India" operator="Madhya Pradesh" status="Reserved" 840 bands="" brand="Jio" cc="in" country="India" operator="West Bengal" status="Reserved" 844 bands="GSM" brand="Uninor" cc="in" country="India" operator="Delhi & NCR" status="Not operational" 845 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Assam" status="Operational" 846 bands="GSM 1800 / UTMS 2100" brand="IDEA" cc="in" country="India" operator="Jammu & Kashmir" status="Operational" 847 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Karnataka" status="Operational" 848 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Kolkata" status="Operational" 849 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="North East" status="Operational" 850 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Orissa" status="Operational" 851 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Punjab" status="Operational" 852 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Tamil Nadu" status="Operational" 853 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="West Bengal" status="Operational" 854 bands="" brand="Jio" cc="in" country="India" operator="Andra Pradesh" status="Reserved" 855 bands="" brand="Jio" cc="in" country="India" operator="Assam" status="Reserved" 856 bands="" brand="Jio" cc="in" country="India" operator="Bihar" status="Reserved" 857 bands="" brand="Jio" cc="in" country="India" operator="Gujarat" status="Reserved" 858 bands="" brand="Jio" cc="in" country="India" operator="Haryana" status="Reserved" 859 bands="" brand="Jio" cc="in" country="India" operator="Himachal Pradesh" status="Reserved" 860 bands="" brand="Jio" cc="in" country="India" operator="Jammu Kashmir" status="Reserved" 861 bands="" brand="Jio" cc="in" country="India" operator="Karnataka" status="Reserved" 862 bands="" brand="Jio" cc="in" country="India" operator="Kerala" status="Reserved" 863 bands="" brand="Jio" cc="in" country="India" operator="Madhyya Pradesh" status="Reserved" 864 bands="" brand="Jio" cc="in" country="India" operator="Maharashtra" status="Reserved" 865 bands="" brand="Jio" cc="in" country="India" operator="North East" status="Reserved" 866 bands="" brand="Jio" cc="in" country="India" operator="Orissa" status="Reserved" 867 bands="" brand="Jio" cc="in" country="India" operator="Punjab" status="Reserved" 868 bands="" brand="Jio" cc="in" country="India" operator="Rajasthan" status="Reserved" 869 bands="" brand="Jio" cc="in" country="India" operator="Tamil Nadu Chennai" status="Reserved" 870 bands="" brand="Jio" cc="in" country="India" operator="Uttar Pradesh West" status="Reserved" 871 bands="" brand="Jio" cc="in" country="India" operator="Uttar Pradesh East" status="Reserved" 872 bands="" brand="Jio" cc="in" country="India" operator="Delhi" status="Reserved" 873 bands="" brand="Jio" cc="in" country="India" operator="Kolkatta" status="Reserved" 874 bands="" brand="Jio" cc="in" country="India" operator="Mumbai" status="Reserved" 875 bands="GSM 1800" brand="Uninor" cc="in" country="India" operator="Assam" status="Reserved" 880 bands="GSM 1800" brand="Uninor" cc="in" country="India" operator="West Bengal" status="Operational" 881 bands="GSM 1800" brand="S Tel" cc="in" country="India" operator="Assam" status="Reserved" 908 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Operational" 909 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Delhi" status="Operational" 910 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Haryana" status="Operational" 911 bands="GSM 1800" brand="IDEA" cc="in" country="India" operator="Maharashtra" status="Operational" 912 bands="GSM 1800" brand="Etisalat DB(cheers)" cc="in" country="India" operator="Andhra Pradesh and Telangana" status="Not operational" 913 bands="GSM 1800" brand="Etisalat DB(cheers)" cc="in" country="India" operator="Delhi & NCR" status="Not operational" 914 bands="GSM 1800" brand="Etisalat DB(cheers)" cc="in" country="India" operator="Gujarat" status="Not operational" 917 bands="GSM 1800" brand="Etisalat DB(cheers)" cc="in" country="India" operator="Kerala" status="Not operational" 927 bands="" brand="Uninor" cc="in" country="India" operator="Gujarat" status="Operational" 929 bands="GSM 1800" brand="Uninor" cc="in" country="India" operator="Maharashtra" status="Operational" 00-99 410 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Mobilink" cc="pk" country="Pakistan" operator="Mobilink-PMCL" status="Operational" 02 bands="CDMA2000 1900" brand="PTCL" cc="pk" country="Pakistan" operator="PTCL" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Ufone" cc="pk" country="Pakistan" operator="Pakistan Telecommunication Mobile Ltd" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Zong" cc="pk" country="Pakistan" operator="China Mobile" status="Operational" 05 bands="GSM 900 / GSM 1800" brand="SCO Mobile" cc="pk" country="Pakistan" operator="SCO Mobile Ltd" status="Operational" 06 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Telenor" cc="pk" country="Pakistan" operator="Telenor Pakistan" status="Operational" 07 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Warid Pakistan" cc="pk" country="Pakistan" operator="WaridTel" status="Operational" 08 bands="GSM 900 / GSM 1800" brand="SCO Mobile" cc="pk" country="Pakistan" operator="SCO Mobile Ltd" status="Operational" 00-99 412 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="AWCC" cc="af" country="Afghanistan" operator="Afghan Wireless Communication Company" status="Operational" 20 bands="GSM 900 / UMTS" brand="Roshan" cc="af" country="Afghanistan" operator="Telecom Development Company Afghanistan Ltd." status="Operational" 40 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="MTN" cc="af" country="Afghanistan" operator="MTN Group Afghanistan" status="Operational" 50 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Etisalat" cc="af" country="Afghanistan" operator="Etisalat Afghanistan" status="Operational" 55 bands="CDMA 800" brand="WASEL" cc="af" country="Afghanistan" operator="WASEL Afghanistan" status="Operational" 80 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Salaam" cc="af" country="Afghanistan" operator="Afghan Telecom" status="Operational" 88 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Salaam" cc="af" country="Afghanistan" operator="Afghan Telecom" status="Operational" 00-99 413 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Mobitel" cc="lk" country="Sri Lanka" operator="Mobitel (Pvt) Ltd" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Dialog" cc="lk" country="Sri Lanka" operator="Dialog Axiata PLC" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Etisalat" cc="lk" country="Sri Lanka" operator="Etisalat Lanka (Pvt) Ltd" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Airtel" cc="lk" country="Sri Lanka" operator="Bharti Airtel Lanka (Pvt) Ltd" status="Operational" 08 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Hutch" cc="lk" country="Sri Lanka" operator="Hutchison Telecommunications Lanka (Pvt) Ltd" status="Operational" 00-99 414 01 bands="GSM 900 / UMTS 2100" brand="MPT" cc="mm" country="Myanmar" operator="Myanmar Post and Telecommunication" status="Operational" 05 bands="UMTS 900 / UMTS 2100" brand="Ooredoo" cc="mm" country="Myanmar" operator="Ooredoo Myanmar" status="Operational" 06 bands="GSM 900 / UMTS 2100" brand="Telenor Myanmar" cc="mm" country="Myanmar" operator="Telenor Myanmar (Comcel Myanmar)" status="Operational" 00-99 415 01 bands="GSM 900 / UMTS 2100 / LTE 1800" brand="Alfa" cc="lb" country="Lebanon" operator="MIC 1" status="Operational" 03 bands="GSM 900 / UMTS 2100 / LTE 1800" brand="mtc touch" cc="lb" country="Lebanon" operator="MIC 2" status="Operational" 05 bands="GSM 900" brand="Ogero Mobile" cc="lb" country="Lebanon" operator="Ogero Telecom" status="Operational" 00-99 416 01 bands="GSM 900" brand="zain JO" cc="jo" country="Jordan" operator="Jordan Mobile Telephone Services" status="Operational" 02 bands="iDEN 800" brand="XPress Telecom" cc="jo" country="Jordan" operator="XPress Telecom" status="Operational" 03 bands="GSM 1800" brand="Umniah" cc="jo" country="Jordan" operator="Umniah Mobile Company" status="Operational" 77 bands="GSM 900" brand="Orange" cc="jo" country="Jordan" operator="Petra Jordanian Mobile Telecommunications Company (MobileCom)" status="Operational" 00-99 417 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Syriatel" cc="sy" country="Syria" operator="Syriatel Mobile Telecom" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="MTN" cc="sy" country="Syria" operator="MTN Syria" status="Operational" 09 bands="" cc="sy" country="Syria" operator="Syrian Telecom" status="" 00-99 418 05 bands="GSM 900" brand="Asia Cell" cc="iq" country="Iraq" operator="Asia Cell Telecommunications Company" status="Operational" 08 bands="GSM 900" brand="SanaTel" cc="iq" country="Iraq" status="Operational" 20 bands="GSM 900 / GSM 1800" brand="Zain" cc="iq" country="Iraq" operator="Zain Iraq" status="Operational" 30 bands="GSM 900" brand="Zain" cc="iq" country="Iraq" operator="Zain Iraq" status="Operational" 40 bands="GSM 900" brand="Korek" cc="iq" country="Iraq" operator="Telecom Ltd" status="Operational" 45 bands="UMTS" brand="Mobitel" cc="iq" country="Iraq" operator="Mobitel Co. Ltd." status="Operational" 62 bands="CDMA 800 / CDMA 1900" brand="Itisaluna" cc="iq" country="Iraq" operator="Itisaluna Wireless CO." status="Operational" 92 bands="CDMA" brand="Omnnea" cc="iq" country="Iraq" operator="Omnnea Wireless" status="Operational" 00-99 419 02 bands="GSM 900 / UMTS 2100 / LTE 1800" brand="zain KW" cc="kw" country="Kuwait" operator="Zain Kuwait" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="K.S.C Ooredoo" cc="kw" country="Kuwait" operator="National Mobile Telecommunications" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Viva" cc="kw" country="Kuwait" operator="Kuwait Telecommunication Company" status="Operational" 00-99 420 01 bands="GSM 900 / UMTS 900 / UMTS 2100 / LTE 2300" brand="Al Jawal (STC )" cc="sa" country="Saudi Arabia" operator="Saudi Telecom Company" status="Operational" 03 bands="GSM 900 / UMTS 900 / UMTS 2100 / LTE 2600" brand="Mobily" cc="sa" country="Saudi Arabia" operator="Etihad Etisalat Company" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800/ LTE 2600" brand="Zain SA" cc="sa" country="Saudi Arabia" operator="Zain Saudi Arabia" status="Operational" 05 bands="MVNO" brand="Virgin Mobile" cc="sa" country="Saudi Arabia" operator="Virgin Mobile Saudi Arabia" status="Operational" 21 bands="GSM-R 900" brand="RGSM" cc="sa" country="Saudi Arabia" operator="Saudi Railways GSM" status="Operational" 00-99 421 01 bands="GSM 900" brand="SabaFon" cc="ye" country="Yemen" status="Operational" 02 bands="GSM 900" brand="MTN" cc="ye" country="Yemen" operator="Spacetel Yemen" status="Operational" 03 bands="CDMA2000 800" brand="Yemen Mobile" cc="ye" country="Yemen" operator="Yemen Mobile" status="Operational" 04 bands="GSM 900" brand="HiTS-UNITEL" cc="ye" country="Yemen" operator="Y" status="Operational" 00-99 422 02 bands="GSM 900 / GSM 1800 / UMTS 900" brand="Omantel" cc="om" country="Oman" operator="Oman Telecommunications Company" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900" brand="ooredoo" cc="om" country="Oman" operator="Omani Qatari Telecommunications Company SAOC" status="Operational" 04 bands="" brand="Omantel" cc="om" country="Oman" operator="Oman Telecommunications Company" status="" 00-99 424 02 bands="GSM 900 / UMTS 2100" brand="Etisalat" cc="ae" country="United Arab Emirates" operator="Emirates Telecom Corp" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="du" cc="ae" country="United Arab Emirates" operator="Emirates Integrated Telecommunications Company" status="Operational" 00-99 425 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Orange" cc="il" country="Israel" operator="Partner Communications Company Ltd." status="Operational" 02 bands="GSM 1800 / UMTS 850 / UMTS 2100 / LTE 1800" brand="Cellcom" cc="il" country="Israel" operator="Cellcom Israel Ltd." status="Operational" 03 bands="CDMA 800 / UMTS 850 / UMTS 2100 / LTE 1800" brand="Pelephone" cc="il" country="Israel" operator="Pelephone Communications Ltd." status="Operational" 04 bands="" cc="il" country="Israel" operator="Globalsim Ltd" status="" 05 bands="GSM 900" brand="Jawwal" cc="ps" country="Palestine" operator="Palestine Cellular Communications, Ltd." status="Operational" 06 bands="GSM 900 / GSM 1800" brand="Wataniya" cc="ps" country="Palestine" operator="Wataniya Palestine Mobile Telecommunications Company" status="Operational" 07 bands="iDEN 800 / UMTS 2100" brand="Hot Mobile" cc="il" country="Israel" operator="Hot Mobile Ltd. (Former Mirs Communications)" status="Operational" 08 bands="UMTS 2100 / LTE 1800" brand="Golan Telecom" cc="il" country="Israel" operator="Golan Telecom Ltd" status="Operational" 11 bands="MVNO" cc="il" country="Israel" operator="365 Telecom" status="" 12 bands="MVNO" cc="il" country="Israel" operator="Free Telecom" status="" 13 bands="" cc="il" country="Israel" operator="Ituran Cellular Communications" status="" 14 bands="MVNO" brand="Youphone" cc="il" country="Israel" operator="Alon Cellular Ltd." status="Operational" 15 bands="MVNO" brand="Home Cellular" cc="il" country="Israel" operator="Home Cellular" status="Operational" 16 bands="MVNO" brand="Rami Levy" cc="il" country="Israel" operator="Rami Levy Communications Ltd." status="Operational" 17 bands="MVNO" brand="Sipme" cc="il" country="Israel" operator="Gale Phone" status="" 18 bands="MVNO" brand="Cellact Communications" cc="il" country="Israel" operator="Cellact Communications Ltd." status="Operational" 19 bands="MVNO" brand="Telzar 019" cc="il" country="Israel" operator="Azi Communications Ltd." status="Operational" 20 bands="" brand="Bezeq" cc="il" country="Israel" operator="Bezeq The Israeli Telecommunication Corp Ltd." status="" 21 bands="" brand="Bezeq International" cc="il" country="Israel" operator="B.I.P. Communications Ltd." status="" 23 bands="" cc="il" country="Israel" operator="Beezz Communication Solutions Ltd." status="" 24 bands="MVNO" brand="012 Telecom" cc="il" country="Israel" operator="Partner Communications Company Ltd." status="Operational" 25 bands="LTE" brand="IMOD" cc="il" country="Israel" operator="Israel Ministry of Defense" status="Not operational" 00-99 426 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Batelco" cc="bh" country="Bahrain" operator="Bahrain Telecommunications Company" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="zain BH" cc="bh" country="Bahrain" operator="Zain Bahrain" status="Operational" 03 bands="" cc="bh" country="Bahrain" operator="Civil Aviation Authority" status="" 04 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="VIVA Bahrain" cc="bh" country="Bahrain" operator="Viva Bahrain" status="Operational" 05 bands="GSM 900 / GSM 1800" brand="Batelco" cc="bh" country="Bahrain" operator="Bahrain Telecommunications Company" status="Operational" 00-99 427 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 2600" brand="ooredoo" cc="qa" country="Qatar" operator="ooredoo" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Vodafone" cc="qa" country="Qatar" operator="Vodafone Qatar" status="Operational" 05 bands="TETRA 380" brand="Ministry of Interior" cc="qa" country="Qatar" operator="Ministry of Interior" status="Operational" 06 bands="LTE" brand="Ministry of Interior" cc="qa" country="Qatar" operator="Ministry of Interior" status="Operational" 00-99 428 88 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Unitel" cc="mn" country="Mongolia" operator="Unitel LLC" status="Operational" 91 bands="CDMA2000 800 / UMTS 2100" brand="Skytel" cc="mn" country="Mongolia" operator="Skytel LLC" status="Operational" 98 bands="CDMA2000 450 / UMTS 2100" brand="G-Mobile" cc="mn" country="Mongolia" operator="G-Mobile LLC" status="Operational" 99 bands="GSM 900 / UMTS 2100" brand="Mobicom" cc="mn" country="Mongolia" operator="Mobicom Corporation" status="Operational" 00-99 429 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Namaste / NT Mobile" cc="np" country="Nepal" operator="Nepal Telecom" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Ncell" cc="np" country="Nepal" operator="Ncell Pvt. Ltd." status="Operational" 03 bands="CDMA2000 800" brand="Sky/C-Phone" cc="np" country="Nepal" operator="Nepal Telecom" status="Operational" 04 bands="GSM 900" brand="SmartCell" cc="np" country="Nepal" operator="Smart Telecom Pvt. Ltd." status="Operational" 00-99 432 11 bands="GSM 900 / GSM 1800 / UMTS" brand="IR-MCI (Hamrahe Avval)" cc="ir" country="Iran" operator="Mobile Communications Company of Iran" status="Operational" 14 bands="GSM 900" brand="TKC" cc="ir" country="Iran" operator="Telecommunication Kish Company" status="Operational" 19 bands="GSM 900" brand="MTCE (Espadan)" cc="ir" country="Iran" operator="Mobile Telecommunications Company of Esfahan" status="Operational" 20 bands="UMTS" brand="Rightel" cc="ir" country="Iran" status="Operational" 32 bands="GSM 900 / GSM 1800" brand="Taliya" cc="ir" country="Iran" operator="Rafsanjan Industrial Complex" status="Operational" 35 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="MTN Irancell" cc="ir" country="Iran" operator="MTN Irancell Telecommunications Services Company" status="Operational" 70 bands="GSM 900 / GSM 1800" brand="TCI" cc="ir" country="Iran" operator="Telephone Communications Company of Iran" status="Operational" 93 bands="GSM 1800" brand="Iraphone" cc="ir" country="Iran" operator="Iraphone" status="Operational" 00-99 434 01 bands="GSM 900 / GSM 1800" cc="uz" country="Uzbekistan" operator="Buztel" status="Not operational" 02 bands="GSM 900 / GSM 1800" cc="uz" country="Uzbekistan" operator="Uzmacom" status="Not operational" 03 bands="CDMA2000 450" brand="UzMobile" cc="uz" country="Uzbekistan" operator="Uzbektelekom" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="Beeline" cc="uz" country="Uzbekistan" operator="Unitel LLC" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="Ucell" cc="uz" country="Uzbekistan" operator="Coscom" status="Operational" 06 bands="CDMA2000 800" brand="Perfectum Mobile" cc="uz" country="Uzbekistan" operator="RUBICON WIRELESS COMMUNICATION" status="Operational" 07 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="UMS" cc="uz" country="Uzbekistan" operator="Universal Mobile Systems" status="Operational" 08 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="UzMobile" cc="uz" country="Uzbekistan" operator="Uzbektelekom" status="Operational" 00-99 436 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800" brand="Tcell" cc="tj" country="Tajikistan" operator="JV Somoncom" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800" brand="Tcell" cc="tj" country="Tajikistan" operator="Indigo Tajikistan" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Megafon Tajikistan" cc="tj" country="Tajikistan" operator="TT Mobile" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800 / LTE 2100" brand="Babilon-M" cc="tj" country="Tajikistan" operator="Babilon-Mobile" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Beeline" cc="tj" country="Tajikistan" operator="Tacom" status="Operational" 12 bands="UMTS 2100" brand="Tcell" cc="tj" country="Tajikistan" operator="Indigo" status="" 00-99 437 01 bands="GSM 900 / GSM 1800" brand="Beeline" cc="kg" country="Kyrgyzstan" operator="Sky Mobile LLC" status="Operational" 03 bands="CDMA2000" brand="Fonex" cc="kg" country="Kyrgyzstan" operator="Aktel Ltd" status="Operational" 05 bands="GSM 900 / GSM 1800" brand="MegaCom" cc="kg" country="Kyrgyzstan" operator="Alfa Telecom CJSC" status="Operational" 09 bands="GSM 900 / GSM 1800" brand="O!" cc="kg" country="Kyrgyzstan" operator="NurTelecom LLC" status="Operational" 00-99 438 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="MTS" cc="tm" country="Turkmenistan" operator="MTS Turkmenistan" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="TM-Cell" cc="tm" country="Turkmenistan" operator="Altyn Asyr" status="Operational" 03 bands="CDMA 450" brand="AGTS CDMA" cc="tm" country="Turkmenistan" operator="AŞTU" status="Operational" 00-99 440 00 bands="UMTS 1700" brand="Y!Mobile" cc="jp" country="Japan" operator="EMOBILE Limited" status="Operational" 01 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 02 bands="UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT DoCoMo - Kansai" status="Operational" 03 bands="UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT DoCoMo - Hokuriku" status="Operational" 04 bands="UMTS 900 / UMTS 2100" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 06 bands="UMTS 900 / UMTS 2100" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 07 bands="CDMA2000 / 1X EV-DO Rev.A" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 08 bands="CDMA2000" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 09 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Kansai" status="Operational" 10 bands="UMTS 800 / UMTS 1700 / UMTS 2100 / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 11 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Tokai" status="Operational" 12 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 13 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 14 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Tohoku" status="Operational" 15 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 16 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 17 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 18 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Tokai" status="Operational" 19 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Hokkaido" status="Operational" 20 bands="UMTS 900 / UMTS 2100" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 21 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 22 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Kansai" status="Operational" 23 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Tokai" status="Operational" 24 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Chugoku" status="Operational" 25 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Hokkaido" status="Operational" 26 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Kyushu" status="Operational" 27 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Tohoku" status="Operational" 28 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Shikoku" status="Operational" 29 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 30 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 31 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Kansai" status="Operational" 32 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo" status="Operational" 33 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Tokai" status="Operational" 34 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT docomo" cc="jp" country="Japan" operator="NTT docomo - Kyushu" status="Operational" 35 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Kansai" status="Operational" 36 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 37 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 38 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 39 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 40 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 41 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 42 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 43 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 44 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 45 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 46 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 47 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 48 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 49 bands="UMTS / HSDPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 50 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 51 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 52 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 53 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 54 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 55 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 56 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 58 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Kansai" status="Operational" 60 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Kansai" status="Operational" 61 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Chugoku" status="Operational" 62 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Kyushu" status="Operational" 63 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 64 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 65 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Shikoku" status="Operational" 66 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 67 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Tohoku" status="Operational" 68 bands="UMTS 800 / UMTS 1700 / UMTS 2100" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Kyushu" status="Operational" 69 bands="UMTS / WCDMA / HSDPA / HSUPA / LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 70 bands="CDMA2000 800 / CDMA2000 2100" brand="au" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 71 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 72 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 73 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 74 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 75 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 76 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 77 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 78 bands="UMTS / HSDPA" cc="jp" country="Japan" operator="Okinawa Cellular Telephone" status="Operational" 79 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 80 bands="GSM" brand="TU-KA" cc="jp" country="Japan" operator="TU-KA Cellular Tokyo" status="Not operational" 81 bands="GSM" brand="TU-KA" cc="jp" country="Japan" operator="TU-KA Cellular Tokyo" status="Not operational" 82 bands="GSM" brand="TU-KA" cc="jp" country="Japan" operator="TU-KA Phone Kansai" status="Not operational" 83 bands="GSM" brand="TU-KA" cc="jp" country="Japan" operator="TU-KA Cellular Tokai" status="Not operational" 84 bands="GSM" brand="TU-KA" cc="jp" country="Japan" operator="TU-KA Phone Kansai" status="Not operational" 85 bands="GSM" brand="TU-KA" cc="jp" country="Japan" operator="TU-KA Cellular Tokai" status="Not operational" 86 bands="GSM" brand="TU-KA" cc="jp" country="Japan" operator="TU-KA Cellular Tokyo" status="Not operational" 87 bands="UMTS / HSDPA" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo - Chugoku" status="Operational" 88 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 89 bands="WCDMA" brand="KDDI" cc="jp" country="Japan" operator="KDDI Corporation" status="Operational" 90 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 92 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 93 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 94 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 95 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 96 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 97 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 98 bands="UMTS / HSPA+ / DC-HSDPA" brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="Operational" 99 bands="LTE (4G)" brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="Operational" 00-99 441 40 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTTドコモ" status="" 41 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTTドコモ" status="" 42 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTTドコモ" status="" 43 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTTドコモ" status="" 44 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTTドコモ" status="" 45 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTTドコモ" status="" 50 brand="TU-KA" cc="jp" country="Japan" operator="KDDI" status="" 51 brand="TU-KA" cc="jp" country="Japan" operator="KDDI" status="" 61 brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="" 62 brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="" 63 brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="" 64 brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="" 65 brand="SoftBank" cc="jp" country="Japan" operator="SoftBank Mobile Corp" status="" 70 brand="KDDI" cc="jp" country="Japan" operator="KDDI" status="" 90 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="" 91 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="" 92 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="" 93 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="" 94 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="" 98 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="" 99 brand="NTT DoCoMo" cc="jp" country="Japan" operator="NTT DoCoMo" status="" 00-99 450 02 bands="CDMA2000 1800" brand="KT" cc="kr" country="South Korea" operator="KT" status="Discontinued" 03 bands="CDMA2000 800" brand="Power 017" cc="kr" country="South Korea" operator="Shinsegi Telecom, Inc." status="Discontinued" 04 bands="CDMA2000 1800" brand="KT" cc="kr" country="South Korea" operator="KT" status="Discontinued" 05 bands="CDMA2000 800 / UMTS 2100 / LTE 850 1800 2100" brand="SKTelecom" cc="kr" country="South Korea" operator="SK Telecom" status="Operational" 06 bands="CDMA2000 1800 / LTE 850 2100 2600" brand="LG U+" cc="kr" country="South Korea" operator="LG Telecom" status="Operational" 08 bands="UMTS 2100 / LTE 900 1800 2100" brand="olleh" cc="kr" country="South Korea" operator="KT" status="Operational" 11 bands="MVNO of SK Telecom" cc="kr" country="South Korea" operator="Korea Cable Telecom" status="Operational" 00-99 452 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="MobiFone" cc="vn" country="Vietnam" operator="Vietnam Mobile Telecom Services Company" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 /UMTS 2100" brand="Vinaphone" cc="vn" country="Vietnam" operator="Vietnam Telecom Services Company" status="Operational" 03 bands="CDMA2000 800" brand="S-Fone" cc="vn" country="Vietnam" operator="S-Telecom" status="Not operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Viettel Mobile" cc="vn" country="Vietnam" operator="Viettel Telecom" status="Operational" 05 bands="GSM 900 / UMTS 2100" brand="Vietnamobile" cc="vn" country="Vietnam" operator="Hanoi Telecom" status="Operational" 06 bands="CDMA2000 450" brand="EVNTelecom" cc="vn" country="Vietnam" operator="EVN Telecom" status="Not operational" 07 bands="GSM 1800" brand="Gmobile" cc="vn" country="Vietnam" operator="GTEL Mobile JSC" status="Operational" 08 bands="UMTS 2100" brand="EVNTelecom" cc="vn" country="Vietnam" operator="EVN Telecom" status="Not operational" 00-99 454 00 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="1O1O / One2Free / New World Mobility / SUNMobile" cc="hk" country="Hong Kong" operator="CSL Limited" status="Operational" 01 bands="MVNO" cc="hk" country="Hong Kong" operator="CITIC Telecom 1616" status="Operational" 02 bands="GSM 900 / GSM 1800" cc="hk" country="Hong Kong" operator="CSL Limited" status="Operational" 03 bands="UMTS 900 / UMTS 2100 / LTE 1800 / LTE 2600" brand="3" cc="hk" country="Hong Kong" operator="Hutchison Telecom" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="3 (2G)" cc="hk" country="Hong Kong" operator="Hutchison Telecom" status="Operational" 05 bands="CDMA 800" brand="3 (CDMA)" cc="hk" country="Hong Kong" operator="Hutchison Telecom" status="Not operational" 06 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 1800 / LTE 2600" brand="SmarTone" cc="hk" country="Hong Kong" operator="SmarTone Mobile Communications Limited" status="Operational" 07 bands="MVNO" cc="hk" country="Hong Kong" operator="China Unicom (Hong Kong) Limited" status="Operational" 08 bands="MVNO" brand="Truphone" cc="hk" country="Hong Kong" operator="Truphone Limited" status="Operational" 09 bands="MVNO" cc="hk" country="Hong Kong" operator="China Motion Telecom" status="Operational" 10 bands="GSM 1800" brand="New World Mobility" cc="hk" country="Hong Kong" operator="CSL Limited" status="Not Operational" 11 bands="MVNO" cc="hk" country="Hong Kong" operator="China-Hong Kong Telecom" status="Operational" 12 bands="GSM 1800 / LTE 1800 / LTE 2600" brand="CMCC HK" cc="hk" country="Hong Kong" operator="China Mobile Hong Kong Company Limited" status="Operational" 13 bands="MVNO" brand="CMCC HK" cc="hk" country="Hong Kong" operator="China Mobile Hong Kong Company Limited" status="Operational" 14 bands="GSM 900 / GSM 1800" cc="hk" country="Hong Kong" operator="Hutchison Telecom" status="Operational" 15 bands="GSM 1800" cc="hk" country="Hong Kong" operator="SmarTone Mobile Communications Limited" status="Operational" 16 bands="GSM 1800" brand="PCCW Mobile (2G)" cc="hk" country="Hong Kong" operator="PCCW-HKT" status="Operational" 17 bands="GSM 1800" cc="hk" country="Hong Kong" operator="SmarTone Mobile Communications Limited" status="Operational" 18 bands="GSM 900 / GSM 1800" cc="hk" country="Hong Kong" operator="CSL Limited" status="Not Operational" 19 bands="UMTS 2100 / LTE 1800 / LTE 2600" brand="PCCW Mobile (3G/4G)" cc="hk" country="Hong Kong" operator="PCCW-HKT" status="Operational" 20 bands="" cc="hk" country="Hong Kong" operator="PCCW-HKT" status="" 21 bands="" cc="hk" country="Hong Kong" operator="21Vianet Mobile Ltd." status="" 22 bands="" cc="hk" country="Hong Kong" operator="Delcom (HK) Ltd" status="" 23 bands="MVNO" cc="hk" country="Hong Kong" operator="Lycamobile Hong Kong Ltd" status="Operational" 29 bands="CDMA 800" brand="PCCW Mobile (CDMA)" cc="hk" country="Hong Kong" operator="PCCW-HKT" status="Operational" 00-99 455 00 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="SmarTone" cc="mo" country="Macau (China)" operator="Smartone – Comunicações Móveis, S.A." status="Operational" 01 bands="GSM 900 / GSM 1800 / LTE" brand="CTM" cc="mo" country="Macau (China)" operator="Companhia de Telecomunicações de Macau, S.A.R.L." status="Operational" 02 bands="CDMA 800" brand="China Telecom" cc="mo" country="Macau (China)" operator="China Telecom (Macau) Company Limited" status="Operational" 03 bands="GSM 900 / GSM 1800" brand="3" cc="mo" country="Macau (China)" operator="Hutchison Telephone (Macau), Limitada" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="CTM" cc="mo" country="Macau (China)" operator="Companhia de Telecomunicações de Macau, S.A.R.L." status="Operational" 05 bands="UMTS 900 / UMTS 2100" brand="3" cc="mo" country="Macau (China)" operator="Hutchison Telephone (Macau), Limitada" status="Operational" 06 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="SmarTone" cc="mo" country="Macau (China)" operator="Smartone – Comunicações Móveis, S.A." status="Operational" 07 bands="LTE" brand="China Telecom" cc="mo" country="Macau (China)" operator="China Telecom (Macau) Limitada" status="Operational" 00-99 456 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Cellcard ( Mobitel )" cc="kh" country="Cambodia" operator="The Royal Group" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Smart Axiata" cc="kh" country="Cambodia" operator="Smart Axiata Co. Ltd" status="Operational" 03 bands="GSM 1800 / UMTS 2100" brand="qb" cc="kh" country="Cambodia" operator="Cambodia Advance Communications Co. Ltd" status="Operational" 04 bands="GSM 1800 / UMTS 2100" brand="qb" cc="kh" country="Cambodia" operator="Cambodia Advance Communications Co. Ltd" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Smart Axiata" cc="kh" country="Cambodia" operator="Smart Axiata Co. Ltd" status="Operational" 06 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Smart Axiata" cc="kh" country="Cambodia" operator="Smart Axiata Co. Ltd" status="Operational" 08 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Metfone" cc="kh" country="Cambodia" operator="Viettel" status="Operational" 09 bands="GSM 900 / GSM 1800" brand="Beeline" cc="kh" country="Cambodia" operator="Sotelco Ltd." status="Operational" 11 bands="CDMA2000" brand="Excell" cc="kh" country="Cambodia" status="Operational" 18 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Cellcard" cc="kh" country="Cambodia" operator="The Royal Group" status="Operational" 00-99 457 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="LTC" cc="la" country="Laos" operator="Lao Telecom" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="ETL" cc="la" country="Laos" operator="Enterprise of Telecommunications Lao" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE" brand="Unitel" cc="la" country="Laos" operator="Star Telecom Co., Ltd" status="Operational" 08 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Beeline" cc="la" country="Laos" operator="VimpelCom Lao Ltd" status="Operational" 00-99 460 00 bands="GSM 900 / GSM 1800 / TD-SCDMA 1900 / TD-SCDMA 2000 / TD-LTE 1900 / TD-LTE 2300 / TD-LTE 2600" brand="China Mobile" cc="cn" country="China" operator="China Mobile" status="Operational" 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / TD-LTE 2300 / TD-LTE 2600 / LTE 1800" brand="China Unicom" cc="cn" country="China" operator="China Unicom" status="Operational" 02 bands="GSM 900 / GSM 1800 / TD-SCDMA 1900 / TD-SCDMA 2000 / TD-LTE 1900 / TD-LTE 2300 / TD-LTE 2600" brand="China Mobile" cc="cn" country="China" operator="China Mobile" status="Not operational" 03 bands="CDMA2000 800 / LTE 1800 / LTE 2100 / TD-LTE 2300 / TD-LTE 2600" brand="China Telecom" cc="cn" country="China" operator="China Telecom" status="Operational" 04 bands="" cc="cn" country="China" operator="Global Star Satellite" status="" 05 bands="CDMA2000 800 / LTE 1800 / LTE 2100 / TD-LTE 2300 / TD-LTE 2600" brand="China Telecom" cc="cn" country="China" operator="China Telecom" status="Not operational" 06 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="China Unicom" cc="cn" country="China" operator="China Unicom" status="Not operational" 07 bands="GSM 900 / GSM 1800 / TD-SCDMA 1900 / TD-SCDMA 2000 / TD-LTE 1900 / TD-LTE 2300 / TD-LTE 2600" brand="China Mobile" cc="cn" country="China" operator="China Mobile" status="Not operational" 09 bands="" brand="China Unicom" cc="cn" country="China" operator="China Unicom" status="" 11 bands="" brand="China Telecom" cc="cn" country="China" operator="China Telecom" status="" 20 bands="GSM-R" brand="China Tietong" cc="cn" country="China" operator="China Tietong" status="Operational" 00-99 466 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 700 / LTE 1800" brand="FarEasTone" cc="tw" country="Taiwan" operator="Far EasTone Telecommunications Co Ltd" status="Operational" 02 bands="GSM 900" brand="FarEasTone" cc="tw" country="Taiwan" operator="Far EasTone Telecommunications Co Ltd" status="" 03 bands="UMTS 2100" brand="FarEasTone" cc="tw" country="Taiwan" operator="Far EasTone Telecommunications Co Ltd" status="" 05 bands="CDMA2000 800 / LTE 700" brand="APTG" cc="tw" country="Taiwan" operator="Asia Pacific Telecom" status="Operational" 06 bands="GSM 1800" brand="FarEasTone" cc="tw" country="Taiwan" operator="Far EasTone Telecommunications Co Ltd" status="Operational" 07 bands="WiMAX 2600" brand="FarEasTone" cc="tw" country="Taiwan" operator="Far EasTone Telecommunications Co Ltd" status="Not operational" 09 bands="WiMAX 2600" brand="VMAX" cc="tw" country="Taiwan" operator="Vmax Telecom" status="Operational" 10 bands="WiMAX 2600" brand="G1" cc="tw" country="Taiwan" operator="Global Mobile Corp." status="Operational" 11 bands="GSM 1800" brand="Chunghwa LDM" cc="tw" country="Taiwan" operator="LDTA/Chunghwa Telecom" status="Operational" 12 bands="LTE 700 / LTE 900" cc="tw" country="Taiwan" operator="Ambit Microsystems" status="Operational" 56 bands="WiMAX 2600 / PHS" brand="FITEL" cc="tw" country="Taiwan" operator="First International Telecom" status="Not operational" 68 bands="WiMAX 2600" cc="tw" country="Taiwan" operator="Tatung InfoComm" status="Not operational" 88 bands="GSM 1800" brand="FarEasTone" cc="tw" country="Taiwan" operator="Far EasTone Telecommunications Co Ltd" status="Operational" 89 bands="UMTS 2100 / LTE 900" brand="T Star" cc="tw" country="Taiwan" operator="Taiwan Star Telecom" status="Operational" 90 bands="LTE 900" brand="T Star" cc="tw" country="Taiwan" operator="Taiwan Star Telecom" status="" 92 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 900 / LTE 1800" brand="Chunghwa" cc="tw" country="Taiwan" operator="Chunghwa Telecom" status="Operational" 93 bands="GSM 900" brand="MobiTai" cc="tw" country="Taiwan" operator="Mobitai Communications" status="Not operational" 97 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 700 / LTE 1800" brand="Taiwan Mobile" cc="tw" country="Taiwan" operator="Taiwan Mobile Co. Ltd" status="Operational" 99 bands="GSM 900" brand="TransAsia" cc="tw" country="Taiwan" operator="TransAsia Telecoms" status="Not operational" 00-99 467 05 bands="UMTS 2100" brand="Koryolink" cc="kp" country="North Korea" operator="Cheo Technology Jv Company" status="Operational" 193 bands="GSM 900" brand="SunNet" cc="kp" country="North Korea" operator="Korea Posts and Telecommunications Corporation" status="Discontinued" 00-99 470 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Grameenphone" cc="bd" country="Bangladesh" operator="GrameenPhone Ltd" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Robi" cc="bd" country="Bangladesh" operator="Axiata Bangladesh Ltd." status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Banglalink" cc="bd" country="Bangladesh" operator="Banglalink Digital Communications Ltd" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="TeleTalk" cc="bd" country="Bangladesh" operator="Teletalk Bangladesh Limited" status="Operational" 05 bands="CDMA 800 / GSM 900 / GSM 1800" brand="Citycell" cc="bd" country="Bangladesh" operator="Pacific Bangladesh Telecom Limited" status="Operational" 07 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Airtel" cc="bd" country="Bangladesh" operator="Bharti airtel Bangladesh Ltd." status="Operational" 00-99 472 01 bands="GSM 900 / UMTS 2100" brand="Dhiraagu" cc="mv" country="Maldives" operator="Dhivehi Raajjeyge Gulhun" status="Operational" 02 bands="GSM 900 / UMTS 2100 / LTE 2600" brand="Ooredoo" cc="mv" country="Maldives" operator="Wataniya Telecom Maldives" status="Operational" 00-99 502 01 bands="CDMA2000 450" brand="ATUR 450" cc="my" country="Malaysia" operator="Telekom Malaysia Bhd" status="Operational" 10 cc="my" country="Malaysia" operator="DiGi Telecommunications" status="" 11 bands="CDMA2000 850" brand="TM Homeline" cc="my" country="Malaysia" operator="Telekom Malaysia Bhd" status="Operational" 12 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Maxis" cc="my" country="Malaysia" operator="Maxis Mobile Services SDN Berhad" status="Operational" 13 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Celcom" cc="my" country="Malaysia" operator="Celcom Axiata Berhad" status="Operational" 14 cc="my" country="Malaysia" operator="Telekom Malaysia Berhad for PSTN SMS" status="" 150 bands="MVNO" brand="Tune Talk" cc="my" country="Malaysia" operator="Tune Talk Sdn Bhd" status="Operational" 151 bands="MVNO" cc="my" country="Malaysia" operator="Baraka Telecom Sdn Bhd (MVNE)" status="Operational" 152 bands="WiMAX 2.3 GHz / LTE 4G" brand="Yes" cc="my" country="Malaysia" operator="YTL Communications Sdn Bhd" status="Operational" 153 bands="WiMAX 2.3 GHz" cc="my" country="Malaysia" operator="Packet One Networks Sdn Bhd" status="Operational" 154 bands="" cc="my" country="Malaysia" operator="Talk Focus Sdn Bhd" status="" 155 bands="" cc="my" country="Malaysia" operator="Clixster Mobile Sdn Bhd" status="" 156 bands="LTE 4G / MVNO" brand="Altel" cc="my" country="Malaysia" operator="Altel Communications Sdn Bhd" status="Operational" 157 bands="" cc="my" country="Malaysia" operator="Telekomunikasi Indonesia International (M) Sdn Bhd" status="" 16 bands="GSM 1800 / UMTS 2100 / LTE 2600" brand="DiGi" cc="my" country="Malaysia" operator="DiGi Telecommunications" status="Operational" 17 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="Hotlink" cc="my" country="Malaysia" operator="Maxis Prepaid" status="Operational" 18 bands="UMTS 2100" brand="U Mobile" cc="my" country="Malaysia" operator="U Mobile Sdn Bhd" status="Operational" 19 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 2600" brand="Celcom" cc="my" country="Malaysia" operator="Celcom Axiata Berhad" status="Operational" 20 bands="CDMA" cc="my" country="Malaysia" operator="Electcoms Wireless Sdn Bhd" status="Operational" 00-99 505 01 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 700 / LTE 1800" brand="Telstra" cc="au" country="Australia" operator="Telstra Corporation Limited" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 700 / LTE 1800 / TD-LTE 2300" brand="Optus" cc="au" country="Australia" operator="Singtel Optus Proprietary Limited" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Vodafone" cc="au" country="Australia" operator="Vodafone Hutchison Australia Proprietary Limited" status="Operational" 04 bands="" cc="au" country="Australia" operator="Department of Defence" status="Operational" 05 brand="Ozitel" cc="au" country="Australia" status="Not operational" 06 bands="UMTS 2100" brand="3" cc="au" country="Australia" operator="Vodafone Hutchison Australia Proprietary Limited" status="Not operational" 07 bands="" brand="Vodafone" cc="au" country="Australia" operator="Vodafone Network Pty. Ltd." status="" 08 bands="GSM 900" brand="One.Tel" cc="au" country="Australia" operator="One.Tel Limited" status="Not operational" 09 brand="Airnet" cc="au" country="Australia" status="Not operational" 10 bands="GSM 900" brand="Norfolk Telecom" cc="nf" country="Norfolk Island" operator="Norfolk Telecom" status="Operational" 11 bands="" brand="Telstra" cc="au" country="Australia" operator="Telstra Corporation Ltd." status="" 12 bands="UMTS 2100" brand="3" cc="au" country="Australia" operator="Vodafone Hutchison Australia Proprietary Limited" status="Not operational" 13 bands="GSM 1800" brand="Railcorp" cc="au" country="Australia" operator="Railcorp, Transport for New South Wales" status="Operational" 14 bands="GSM 1800 / UMTS 2100" brand="AAPT" cc="au" country="Australia" operator="Telecom New Zealand" status="Operational" 15 brand="3GIS" cc="au" country="Australia" status="Not operational" 16 bands="GSM 1800" brand="VicTrack" cc="au" country="Australia" operator="Victorian Rail Track" status="Reserved" 17 bands="" cc="au" country="Australia" operator="Vivid Wireless Pty. Ltd." status="" 18 brand="Pactel" cc="au" country="Australia" operator="Pactel International Pty Ltd" status="Reserved" 19 bands="MVNO" brand="Lycamobile" cc="au" country="Australia" operator="Lycamobile Pty Ltd" status="Operational" 20 bands="" cc="au" country="Australia" operator="Ausgrid Corporation" status="" 21 bands="" cc="au" country="Australia" operator="Queensland Rail Limited" status="" 22 bands="" cc="au" country="Australia" operator="iiNet Ltd" status="" 23 bands="LTE 2100" cc="au" country="Australia" operator="Challenge Networks Pty. Ltd." status="Planning" 24 bands="" cc="au" country="Australia" operator="Advanced Communications Technologies Pty. Ltd." status="" 25 bands="" cc="au" country="Australia" operator="Pilbara Iron Company Services Pty Ltd" status="" 26 bands="" cc="au" country="Australia" operator="Dialogue Communications Pty. Ltd." status="" 27 bands="" cc="au" country="Australia" operator="Nexium Telecommunications" status="" 28 bands="" cc="au" country="Australia" operator="RCOM International Pty Ltd" status="" 30 bands="" cc="au" country="Australia" operator="Compatel Limited" status="" 31 bands="" cc="au" country="Australia" operator="BHP Billiton" status="" 32 bands="" cc="au" country="Australia" operator="Thales Australia" status="" 38 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Crazy John's" cc="au" country="Australia" operator="Vodafone Hutchison Australia Proprietary Limited" status="Operational" 62 bands="LTE 2300" brand="NBN" cc="au" country="Australia" operator="National Broadband Network Co." status="" 68 bands="LTE 2300" brand="NBN" cc="au" country="Australia" operator="National Broadband Network Co." status="" 71 bands="" brand="Telstra" cc="au" country="Australia" operator="Telstra Corporation Limited" status="Operational" 72 bands="" brand="Telstra" cc="au" country="Australia" operator="Telstra Corporation Limited" status="Operational" 88 brand="Localstar Holding Pty. Ltd." cc="au" country="Australia" status="Not operational" 90 bands="" brand="Optus" cc="au" country="Australia" operator="Singtel Optus Proprietary Limited" status="Operational" 99 bands="GSM 1800" brand="One.Tel" cc="au" country="Australia" operator="One.Tel" status="Not operational" 00-99 510 00 bands="Satellite" brand="PSN" cc="id" country="Indonesia" operator="PT Pasifik Satelit Nusantara (ACeS)" status="Operational" 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 900 / LTE 1800" brand="INDOSAT" cc="id" country="Indonesia" operator="PT Indonesian Satellite Corporation Tbk (INDOSAT)" status="Operational" 03 bands="CDMA 800" brand="StarOne" cc="id" country="Indonesia" operator="PT Indosat Tbk" status="Not operational" 07 bands="CDMA 800" brand="TelkomFlexi" cc="id" country="Indonesia" operator="PT Telkom" status="Operational" 08 bands="GSM 1800 / UMTS 2100" brand="AXIS" cc="id" country="Indonesia" operator="PT Natrindo Telepon Seluler" status="Operational" 09 bands="CDMA 800 / CDMA 1900 / LTE 850 / LTE 1800 / TD-LTE 2300" brand="Smartfren" cc="id" country="Indonesia" operator="PT Smart Telecom" status="Operational" 10 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 900 / LTE 1800" brand="Telkomsel" cc="id" country="Indonesia" operator="PT Telekomunikasi Selular" status="Operational" 11 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 900 / LTE 1800" brand="XL" cc="id" country="Indonesia" operator="PT XL Axiata Tbk" status="Operational" 20 bands="GSM 1800" brand="TELKOMMobile" cc="id" country="Indonesia" operator="PT Telkom Indonesia Tbk" status="Not operational" 21 bands="GSM 1800" brand="IM3" cc="id" country="Indonesia" operator="PT Indonesian Satellite Corporation Tbk (INDOSAT)" status="Not operational" 27 bands="CDMA 450" brand="Ceria" cc="id" country="Indonesia" operator="PT Sampoerna Telekomunikasi Indonesia" status="Operational" 28 bands="CDMA 800" brand="Fren/Hepi" cc="id" country="Indonesia" operator="PT Mobile-8 Telecom" status="Operational" 88 bands="TD-LTE 2300" brand="BOLT! Super 4G" cc="id" country="Indonesia" operator="PT Internux" status="Operational" 89 bands="GSM 1800 / UMTS 2100 / LTE 1800" brand="3" cc="id" country="Indonesia" operator="PT Hutchison CP Telecommunications" status="Operational" 99 bands="CDMA 800" brand="Esia" cc="id" country="Indonesia" operator="PT Bakrie Telecom" status="Operational" 00-99 514 01 bands="GSM 900 / GSM 1800 / UMTS 850" brand="Telkomcel" cc="tl" country="East Timor" operator="PT Telekomunikasi Indonesia International" status="Operational" 02 bands="GSM 900 / UMTS" brand="TT" cc="tl" country="East Timor" operator="Timor Telecom" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS" brand="Telemor" cc="tl" country="East Timor" operator="Viettel Timor-Leste" status="Operational" 00-99 515 01 bands="GSM 900" brand="Islacom" cc="ph" country="Philippines" operator="Globe Telecom via Innove Communications" status="Not operational" 02 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 900 / UMTS 2100 / LTE 1800" brand="Globe" cc="ph" country="Philippines" operator="Globe Telecom" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 1800" brand="Smart" cc="ph" country="Philippines" operator="PLDT via Smart Communications" status="Operational" 05 bands="GSM 1800 / UMTS 2100 / LTE 1800" brand="Sun" cc="ph" country="Philippines" operator="Digital Telecommunications Philippines" status="Operational" 11 bands="" cc="ph" country="Philippines" operator="PLDT via ACeS Philippines" status="" 18 bands="GSM 900 / UMTS 2100 (defunct)" brand="Cure" cc="ph" country="Philippines" operator="PLDT via Smart's Connectivity Unlimited Resources Enterprise" status="Operational" 24 bands="" brand="ABS-CBN" cc="ph" country="Philippines" operator="ABS-CBN Convergence with Globe Telecom" status="Operational" 88 bands="" cc="ph" country="Philippines" operator="Nextel" status="" 00-99 520 00 bands="UMTS 850" brand="my by CAT" cc="th" country="Thailand" operator="CAT Telecom" status="Operational" 01 bands="GSM 900 / UMTS 900" brand="AIS" cc="th" country="Thailand" operator="Advanced Info Service" status="Operational" 02 bands="CDMA 800" brand="CAT CDMA" cc="th" country="Thailand" operator="CAT Telecom" status="Operational" 03 bands="UMTS 2100" brand="AIS 3G" cc="th" country="Thailand" operator="AWN" status="Operational" 04 bands="UMTS 2100 / LTE 2100" brand="truemove H 4G LTE" cc="th" country="Thailand" operator="Real Future" status="Operational" 05 bands="UMTS 2100 / LTE 2100" brand="dtac TriNet" cc="th" country="Thailand" operator="DTN" status="Operational" 15 bands="UMTS 2100" brand="TOT 3G" cc="th" country="Thailand" operator="Telephone Organization of Thailand (TOT)" status="Operational" 18 bands="GSM 1800 / UMTS 850 / LTE 1800" brand="dtac" cc="th" country="Thailand" operator="Total Access Communication" status="Operational" 23 bands="GSM 1800" brand="AIS GSM 1800" cc="th" country="Thailand" operator="AIS)" status="Not operational" 25 bands="PHS 1900" brand="WE PCT" cc="th" country="Thailand" operator="True Corporation" status="Operational" 47 bands="" cc="th" country="Thailand" operator="Telephone Organization of Thailand (TOT)" status="" 99 bands="GSM 1800" brand="truemove" cc="th" country="Thailand" operator="True Corporation" status="Operational" 00-99 525 01 bands="GSM 900/1800, UMTS 900/2100, LTE 1800/2600" brand="SingTel" cc="sg" country="Singapore" operator="Singapore Telecom" status="Operational" 02 bands="GSM 1800" brand="SingTel-G18" cc="sg" country="Singapore" operator="Singapore Telecom" status="Operational" 03 bands="GSM 900/1800, UMTS 900/2100, LTE 1800/2600" brand="M1" cc="sg" country="Singapore" operator="M1 Limited" status="Operational" 05 bands="GSM 1800, UMTS 900/2100, LTE 1800" brand="StarHub" cc="sg" country="Singapore" operator="StarHub Mobile" status="Operational" 06 bands="" brand="StarHub" cc="sg" country="Singapore" operator="StarHub Mobile" status="" 07 bands="" brand="SingTel" cc="sg" country="Singapore" operator="Singapore Telecom" status="" 12 bands="iDEN 800" brand="Grid" cc="sg" country="Singapore" operator="GRID Communications Pte Ltd." status="Operational" 00-99 528 01 bands="" cc="bn" country="Brunei" operator="Jabatan Telekom Brunei" status="" 02 bands="UMTS 2100" brand="B-Mobile" cc="bn" country="Brunei" operator="B-Mobile Communications Sdn Bhd" status="Operational" 11 bands="GSM 900 / UMTS 2100 / LTE 1800" brand="DSTCom" cc="bn" country="Brunei" operator="Data Stream Technology" status="Operational" 00-99 530 00 bands="AMPS 800 / TDMA 800" brand="Telecom" cc="nz" country="New Zealand" operator="Telecom New Zealand" status="Not operational" 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 700 / LTE 1800 / LTE 2600" brand="Vodafone" cc="nz" country="New Zealand" operator="Vodafone New Zealand" status="Operational" 02 bands="CDMA2000 800" brand="Telecom" cc="nz" country="New Zealand" operator="Telecom New Zealand" status="Not operational" 03 bands="UMTS-TDD 2000" brand="Woosh" cc="nz" country="New Zealand" operator="Woosh Wireless" status="Operational" 04 bands="UMTS 2100" brand="TelstraClear" cc="nz" country="New Zealand" operator="TelstraClear New Zealand" status="Not operational" 05 bands="UMTS 850 / UMTS 2100 / LTE 700 / LTE 1800 / LTE 2600" brand="Spark NZ" cc="nz" country="New Zealand" operator="Spark New Zealand" status="Operational" 06 bands="MVNO" brand="Skinny" cc="nz" country="New Zealand" operator="Spark New Zealand" status="Operational" 07 bands="" cc="nz" country="New Zealand" operator="Bluereach Limited" status="" 24 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100 / LTE 700 / LTE 1800" brand="2degrees" cc="nz" country="New Zealand" operator="2degrees" status="Operational" 00-99 536 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Digicel" cc="nr" country="Nauru" operator="Digicel (Nauru) Corporation" status="Operational" 00-99 537 01 bands="GSM 900 / UMTS 900" brand="bmobile" cc="pg" country="Papua New Guinea" operator="Bemobile Limited" status="Operational" 02 bands="CDMA2000 450" cc="pg" country="Papua New Guinea" operator="Telikom PNG Ltd." status="Operational" 03 bands="GSM 900 / UMTS 900 / LTE 700" brand="Digicel" cc="pg" country="Papua New Guinea" operator="Digicel PNG" status="Operational" 00-99 539 01 bands="GSM 900" brand="U-Call" cc="to" country="Tonga" operator="Tonga Communications Corporation" status="Operational" 43 bands="" cc="to" country="Tonga" operator="Shoreline Communication" status="Operational" 88 bands="GSM 900" brand="Digicel" cc="to" country="Tonga" operator="Digicel (Tonga) Limited" status="Operational" 00-99 540 01 bands="GSM 900" brand="BREEZE" cc="sb" country="Solomon Islands" operator="Solomon Telekom Co Ltd" status="Operational" 02 bands="GSM 900 / GSM 1800" brand="BeMobile" cc="sb" country="Solomon Islands" operator="BMobile (SI) Ltd" status="Operational" 00-99 541 00 bands="GSM 900" brand="AIL" cc="vu" country="Vanuatu" operator="ACeS International (AIL)" status="Operational" 01 bands="GSM 900" brand="SMILE" cc="vu" country="Vanuatu" operator="Telecom Vanuatu Ltd" status="Operational" 05 bands="GSM 900 / UMTS 900" brand="Digicel" cc="vu" country="Vanuatu" operator="Digicel Vanuatu Ltd" status="Operational" 07 bands="TD-LTE 2300" brand="WanTok" cc="vu" country="Vanuatu" operator="WanTok Vanuatu Ltd" status="Operational" 00-99 542 01 bands="GSM 900 / UMTS 2100 / LTE 1800" brand="Vodafone" cc="fj" country="Fiji" operator="Vodafone Fiji" status="Operational" 02 bands="GSM 900 / UMTS 900 / UMTS 2100 / WIMAX 4G" brand="Digicel" cc="fj" country="Fiji" operator="Digicel Fiji" status="Operational" 03 bands="CDMA" cc="fj" country="Fiji" operator="Telecom Fiji Ltd" status="" 00-99 543 01 bands="" cc="wf" country="Wallis and Futuna" operator="Manuia" status="" 00-99 544 11 bands="GSM 850 / GSM 1900 / UMTS 850" brand="Bluesky" cc="as" country="American Samoa (United States of America)" operator="Bluesky" status="Operational" 00-99 545 01 bands="UMTS 850 / LTE 700" brand="Kiribati - TSKL" cc="ki" country="Kiribati" operator="Telecom Services Kiribati Ltd" status="Operational" 09 bands="GSM 900" brand="Kiribati - Frigate Net" cc="ki" country="Kiribati" operator="Telecom Services Kiribati Ltd" status="Operational" 00-99 546 01 bands="GSM 900 / UMTS 900 / LTE 800 / LTE 1800 / LTE 2600" brand="Mobilis" cc="nc" country="New Caledonia (France)" operator="OPT New Caledonia" status="Operational" 00-99 547 05 bands="WiMAX" cc="pf" country="French Polynesia" operator="VITI" status="Operational" 10 bands="GSM 900" cc="pf" country="French Polynesia" operator="Mara Telecom" status="Not operational" 15 bands="GSM 900 / UMTS 2100" brand="Vodafone" cc="pf" country="French Polynesia" operator="Pacific Mobile Telecom" status="Operational" 20 bands="GSM 900 / UMTS 2100" brand="Vini" cc="pf" country="French Polynesia" operator="Tikiphone SA" status="Operational" 00-99 548 01 bands="GSM 900 / UMTS 900" brand="Kokanet" cc="ck" country="Cook Islands (Pacific Ocean)" operator="Telecom Cook Islands" status="Operational" 00-99 549 01 bands="GSM 900 / UMTS 2100" brand="Digicel" cc="ws" country="Samoa" operator="Digicel Pacific Ltd." status="Operational" 27 bands="GSM 900" brand="Bluesky" cc="ws" country="Samoa" operator="Bluesky Samoa Ltd" status="Operational" 00-99 550 01 bands="GSM 900" cc="fm" country="Federated States of Micronesia" operator="FSMTC" status="Operational" 00-99 551 01 cc="mh" country="Marshall Islands" operator="Marshall Islands National Telecommunications Authority (MINTA)" status="Operational" 00-99 552 01 bands="GSM 900" brand="PNCC" cc="pw" country="Palau" operator="Palau National Communications Corp." status="Operational" 80 bands="GSM 1800" brand="Palau Mobile" cc="pw" country="Palau" operator="Palau Mobile Corporation" status="Operational" 00-99 553 01 bands="GSM 900" brand="TTC" cc="tv" country="Tuvalu" operator="Tuvalu Telecom" status="Operational" 00-99 555 01 bands="GSM 900" brand="Telecom Niue" cc="nu" country="Niue" operator="Telecom Niue" status="Operational" 00-99 602 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Mobinil" cc="eg" country="Egypt" operator="ECMS-Mobinil" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Vodafone" cc="eg" country="Egypt" operator="Vodafone Egypt" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Etisalat" cc="eg" country="Egypt" operator="Etisalat Egypt" status="Operational" 00-99 603 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / CDMA 1900" brand="Mobilis" cc="dz" country="Algeria" operator="ATM Mobilis" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Djezzy" cc="dz" country="Algeria" operator="Orascom Telecom Algerie Spa" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Ooredoo" cc="dz" country="Algeria" operator="Wataniya Telecom Algerie" status="Operational" 00-99 604 00 bands="GSM 900 / GSM 1800 / LTE" brand="Méditel" cc="ma" country="Morocco" operator="Medi Telecom" status="Operational" 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="IAM" cc="ma" country="Morocco" operator="Ittissalat Al Maghrib (Maroc Telecom)" status="Operational" 02 bands="GSM 900 / GSM 1800" brand="Wana Corporate" cc="ma" country="Morocco" operator="Wana)" status="Operational" 05 bands="GSM 900 / GSM 1800 / LTE 1800" brand="INWI (Telecommunications)" cc="ma" country="Morocco" operator="WANA - Groupe ONA" status="Operational" 00-99 605 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Orange" cc="tn" country="Tunisia" operator="Orange Tunisie" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Tunicell" cc="tn" country="Tunisia" operator="Tunisie Telecom" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="OOREDOO TN" cc="tn" country="Tunisia" operator="ooredoo Tunisiana" status="Operational" 00-99 606 00 bands="GSM900 / GSM 1800 / UMTS 2100" brand="Libyana" cc="ly" country="Libya" operator="Libyana" status="Operational" 01 bands="GSM900 / GSM 1800" brand="Madar" cc="ly" country="Libya" operator="Al-Madar Al-Jadeed" status="Operational" 02 bands="GSM900 / GSM 1800" brand="Al-Jeel Phone" cc="ly" country="Libya" operator="Al-Jeel Al-Jadeed" status="Operational" 03 bands="GSM900 / GSM 1800 / UMTS 2100" brand="Libya Phone" cc="ly" country="Libya" operator="Libya Telecom and Technology (LTT)" status="Operational" 06 bands="CDMA2000" brand="Hatef Libya" cc="ly" country="Libya" operator="Hatef Libya" status="Operational" 00-99 607 01 bands="GSM 900 / GSM 1900" brand="Gamcel" cc="gm" country="Gambia" operator="Gamcel" status="Operational" 02 bands="GSM 900 / GSM 1900" brand="Africel" cc="gm" country="Gambia" operator="Africel" status="Operational" 03 bands="GSM 900 / GSM 1900" brand="Comium" cc="gm" country="Gambia" operator="Comium" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="QCell" cc="gm" country="Gambia" operator="QCell Gambia" status="Operational" 00-99 608 01 bands="GSM 900 / UMTS 2100" brand="Orange" cc="sn" country="Senegal" operator="Sonatel" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 4G" brand="Tigo" cc="sn" country="Senegal" operator="Millicom International Cellular S.A." status="Operational" 03 bands="GSM 900 / UMTS 2100" brand="Expresso" cc="sn" country="Senegal" operator="Sudatel" status="Operational" 04 bands="" cc="sn" country="Senegal" operator="CSU-SA" status="" 00-99 609 01 bands="GSM 900" brand="Mattel" cc="mr" country="Mauritania" operator="Mattel" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Chinguitel" cc="mr" country="Mauritania" operator="Chinguitel" status="Operational" 10 bands="GSM 900" brand="Mauritel" cc="mr" country="Mauritania" operator="Mauritel Mobiles" status="Operational" 00-99 610 01 bands="GSM 900" brand="Malitel" cc="ml" country="Mali" operator="Malitel SA" status="Operational" 02 bands="GSM 900" brand="Orange" cc="ml" country="Mali" operator="Orange Mali SA" status="Operational" 00-99 611 01 bands="GSM 900 / GSM 1800" brand="Orange S.A." cc="gn" country="Guinea" operator="Orange" status="Operational" 02 bands="GSM 900" brand="Sotelgui" cc="gn" country="Guinea" operator="Sotelgui Lagui" status="Operational" 03 bands="GSM 900" brand="Telecel Guinee" cc="gn" country="Guinea" operator="INTERCEL Guinée" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="MTN" cc="gn" country="Guinea" operator="Areeba Guinea" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Cellcom" cc="gn" country="Guinea" operator="Cellcom" status="Operational" 00-99 612 01 bands="" cc="ci" country="Ivory Coast" operator="Cora de Comstar" status="Not operational" 02 bands="GSM 900 / GSM 1800 / UMTS" brand="Moov" cc="ci" country="Ivory Coast" operator="Atlantique Cellulaire" status="Operational" 03 bands="GSM 900 / UMTS" brand="Orange" cc="ci" country="Ivory Coast" operator="Orange" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="KoZ" cc="ci" country="Ivory Coast" operator="Comium Ivory Coast Inc" status="Operational" 05 bands="GSM 900 / UMTS" brand="MTN" cc="ci" country="Ivory Coast" operator="Loteny Telecom" status="Operational" 06 bands="GSM 1800" brand="GreenN" cc="ci" country="Ivory Coast" operator="Oricel" status="Operational" 07 bands="GSM 1800" brand="café" cc="ci" country="Ivory Coast" operator="Aircomm" status="Operational" 18 bands="TD-LTE 2300" cc="ci" country="Ivory Coast" operator="YooMee" status="Operational" 00-99 613 01 bands="GSM 900 / UMTS" brand="Telmob" cc="bf" country="Burkina Faso" operator="Onatel" status="Operational" 02 bands="GSM 900 / UMTS" brand="Airtel" cc="bf" country="Burkina Faso" operator="Airtel Burkina Faso" status="Operational" 03 bands="GSM 900" brand="Telecel Faso" cc="bf" country="Burkina Faso" operator="Telecel Faso SA" status="Operational" 00-99 614 01 bands="GSM 900" brand="SahelCom" cc="ne" country="Niger" operator="La Société Sahélienne de Télécommunications (SahelCom)" status="Operational" 02 bands="GSM 900" brand="Airtel" cc="ne" country="Niger" operator="Bharti Airtel Limited" status="Operational" 03 bands="GSM 900" brand="Moov" cc="ne" country="Niger" operator="Atlantique Telecom (subsidiary of Etisalat)" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="Orange" cc="ne" country="Niger" operator="Orange Niger" status="Operational" 00-99 615 01 bands="GSM 900" brand="Togo Cell" cc="tg" country="Togo" operator="Togo Telecom" status="Operational" 03 bands="GSM 900" brand="Moov" cc="tg" country="Togo" operator="Moov Togo" status="Operational" 00-99 616 01 bands="GSM 900 / GSM 1800" brand="Libercom" cc="bj" country="Benin" operator="Benin Telecoms Mobile" status="Operational" 02 bands="GSM 900 / UMTS" brand="Moov" cc="bj" country="Benin" operator="Telecel Benin" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="MTN" cc="bj" country="Benin" operator="Spacetel Benin" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="BBCOM" cc="bj" country="Benin" operator="Bell Benin Communications" status="Operational" 05 bands="GSM 900 / GSM 1800" brand="Glo" cc="bj" country="Benin" operator="Glo Communication Benin" status="Operational" 00-99 617 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Orange" cc="mu" country="Mauritius" operator="Cellplus Mobile Communications Ltd." status="Operational" 02 bands="GSM 900 / CDMA2000" brand="MTML" cc="mu" country="Mauritius" operator="Mahanagar Telephone (Mauritius) Ltd." status="Operational" 03 bands="" brand="MTML" cc="mu" country="Mauritius" operator="Mahanagar Telephone (Mauritius) Ltd." status="" 10 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Emtel" cc="mu" country="Mauritius" operator="Emtel Ltd." status="Operational" 00-99 618 01 bands="GSM 900" brand="Lonestar Cell" cc="lr" country="Liberia" operator="Lonestar Communications Corporation" status="Operational" 02 bands="" brand="Libercell" cc="lr" country="Liberia" operator="Atlantic Wireless (Liberia) Inc." status="Operational" 04 bands="GSM 900" brand="Comium" cc="lr" country="Liberia" operator="Comium Liberia" status="Operational" 07 bands="GSM 900 / GSM 1800" brand="Cellcom" cc="lr" country="Liberia" operator="Cellcom Telecommunications, Inc" status="Operational" 20 bands="CDMA2000" brand="LIBTELCO" cc="lr" country="Liberia" operator="Liberia Telecommunications Corporation" status="Operational" 00-99 619 01 bands="GSM 900 / UMTS" brand="Airtel" cc="sl" country="Sierra Leone" operator="Bharti Airtel Limited" status="Operational" 02 bands="" brand="Africell" cc="sl" country="Sierra Leone" operator="Lintel Sierra Leone Limited" status="" 03 bands="GSM 900" brand="Africell" cc="sl" country="Sierra Leone" operator="Lintel Sierra Leone Limited" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="Comium" cc="sl" country="Sierra Leone" operator="Comium (Sierra Leone) Ltd." status="Not operational" 05 bands="GSM 900" brand="Africell" cc="sl" country="Sierra Leone" operator="Lintel Sierra Leone Limited" status="Operational" 06 bands="CDMA 800" brand="SierraTel" cc="sl" country="Sierra Leone" operator="Sierra Leone Telephony" status="Operational" 09 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Smart Mobile" cc="sl" country="Sierra Leone" operator="InterGroup Telecom SL" status="Operational" 25 bands="" brand="Mobitel" cc="sl" country="Sierra Leone" operator="Mobitel" status="Reserved" 40 bands="GSM" cc="sl" country="Sierra Leone" operator="Datatel (SL) Ltd." status="" 50 bands="CDMA" cc="sl" country="Sierra Leone" operator="Datatel (SL) Ltd." status="" 00-99 620 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="MTN" cc="gh" country="Ghana" operator="MTN Group" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS" brand="Vodafone" cc="gh" country="Ghana" operator="Vodafone Group" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS" brand="tiGO" cc="gh" country="Ghana" operator="Millicom Ghana" status="Operational" 04 bands="CDMA2000" brand="Expresso" cc="gh" country="Ghana" operator="Kasapa / Hutchison Telecom" status="Operational" 06 bands="GSM 900 / GSM 1800 / UMTS" brand="Airtel" cc="gh" country="Ghana" operator="Airtel" status="Operational" 07 bands="GSM 900 / GSM 1800 / UMTS" brand="Globacom" cc="gh" country="Ghana" operator="Globacom Group" status="Operational" 08 bands="LTE 2600" brand="Surfline" cc="gh" country="Ghana" operator="Surfline Communications Ltd" status="Operational" 10 bands="TD-LTE 2600" brand="Blu" cc="gh" country="Ghana" operator="Blu Telecommunications" status="Operational" 11 bands="" cc="gh" country="Ghana" operator="Netafrique Dot Com Ltd" status="" 00-99 621 00 bands="LTE 1900" cc="ng" country="Nigeria" operator="Capcom" status="Not operational" 20 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Airtel" cc="ng" country="Nigeria" operator="Bharti Airtel Limited" status="Operational" 24 bands="TD-LTE 2300" cc="ng" country="Nigeria" operator="Spectranet" status="Operational" 25 bands="CDMA2000 800 / CDMA2000 1900" brand="Visafone" cc="ng" country="Nigeria" operator="Visafone Communications Ltd." status="Operational" 26 bands="TD-LTE 2300" cc="ng" country="Nigeria" operator="Swift" status="Operational" 27 bands="LTE 800" brand="Smile" cc="ng" country="Nigeria" operator="Smile Communications Nigeria" status="Operational" 30 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="MTN" cc="ng" country="Nigeria" operator="MTN Nigeria Communications Limited" status="Operational" 40 bands="GSM 900 / GSM 1800" brand="M-Tel" cc="ng" country="Nigeria" operator="Nigerian Mobile Telecommunications Limited" status="Not operational" 50 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Glo" cc="ng" country="Nigeria" operator="Globacom Ltd" status="Operational" 60 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Etisalat" cc="ng" country="Nigeria" operator="Emerging Markets Telecommunication Services Ltd (Etisalat)" status="Operational" 00-99 622 01 bands="GSM 900 / UMTS" brand="Airtel" cc="td" country="Chad" operator="Bharti Airtel SA" status="Operational" 02 bands="CDMA2000" brand="Tawali" cc="td" country="Chad" operator="SotelTchad" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS" brand="Tigo" cc="td" country="Chad" operator="Millicom" status="Operational" 07 bands="GSM 900 / GSM 1800" brand="Salam" cc="td" country="Chad" operator="SotelTchad" status="Operational" 00-99 623 01 bands="GSM 900" brand="CTP" cc="cf" country="Central African Republic" operator="Centrafrique Telecom Plus" status="Operational" 02 bands="GSM 900" brand="TC" cc="cf" country="Central African Republic" operator="Telecel Centrafrique" status="Operational" 03 bands="GSM 1800 / UMTS" brand="Orange" cc="cf" country="Central African Republic" operator="Orange RCA" status="Operational" 04 bands="GSM 900" brand="Nationlink" cc="cf" country="Central African Republic" operator="Nationlink Telecom RCA" status="Operational" 00-99 624 01 bands="GSM 900" brand="MTN Cameroon" cc="cm" country="Cameroon" operator="Mobile Telephone Network Cameroon Ltd" status="Operational" 02 bands="GSM 900" brand="Orange" cc="cm" country="Cameroon" operator="Orange Cameroun S.A." status="Operational" 04 bands="" brand="Nexttel" cc="cm" country="Cameroon" operator="Nexttel" status="Operational" 00-99 625 01 bands="GSM 900 / UMTS" brand="CVMOVEL" cc="cv" country="Cape Verde" operator="CVMóvel, S.A." status="Operational" 02 bands="GSM 1800 / UMTS 2100" brand="T+" cc="cv" country="Cape Verde" operator="UNITEL T+ TELECOMUNICACÕES, S.A." status="Operational" 00-99 626 01 bands="GSM 900" brand="CSTmovel" cc="st" country="Sao Tome and Principe" operator="Companhia Santomese de Telecomunicaçôe" status="Operational" 00-99 627 01 bands="GSM 900" brand="Orange GQ" cc="gq" country="Equatorial Guinea" operator="GETESA" status="Operational" 03 bands="GSM 900 / GSM 1800" brand="Hits GQ" cc="gq" country="Equatorial Guinea" operator="HiTs EG.SA" status="Operational" 00-99 628 01 bands="GSM 900" brand="Libertis" cc="ga" country="Gabon" operator="Gabon Telecom & Libertis S.A." status="Operational" 02 bands="GSM 900" brand="Moov" cc="ga" country="Gabon" operator="Atlantique Télécom (Etisalat Group) Gabon S.A." status="Operational" 03 bands="GSM 900" brand="Airtel" cc="ga" country="Gabon" operator="Airtel Gabon S.A." status="Operational" 04 bands="GSM 900" brand="Azur" cc="ga" country="Gabon" operator="USAN Gabon S.A." status="Operational" 05 bands="" brand="RAG" cc="ga" country="Gabon" operator="Réseau de l’Administration Gabonaise" status="" 00-99 629 01 bands="GSM 900 / UMTS 2100" brand="Airtel" cc="cg" country="Congo" operator="Celtel Congo" status="Operational" 07 bands="GSM 900" cc="cg" country="Congo" operator="Warid Telecom" status="Operational" 10 bands="GSM 900" brand="Libertis Telecom" cc="cg" country="Congo" operator="MTN CONGO S.A" status="Operational" 00-99 630 01 bands="GSM 900 / GSM 1800 / UMTS" brand="Vodacom" cc="cd" country="Democratic Republic of the Congo" operator="Vodacom Congo RDC sprl" status="Operational" 02 bands="GSM 900 / UMTS" brand="airtel" cc="cd" country="Democratic Republic of the Congo" operator="Airtel sprl" status="Operational" 04 bands="" cc="cd" country="Democratic Republic of the Congo" operator="Cellco" status="" 05 bands="GSM 900 / GSM 1800" brand="Supercell" cc="cd" country="Democratic Republic of the Congo" operator="Supercell SPRL" status="Operational" 10 bands="" brand="Libertis Telecom" cc="cd" country="Democratic Republic of the Congo" status="Operational" 86 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Orange" cc="cd" country="Democratic Republic of the Congo" operator="Orange RDC sarl" status="Operational" 88 bands="GSM 900 / GSM 1800" brand="YTT" cc="cd" country="Democratic Republic of the Congo" operator="Yozma Timeturns sprl" status="Not operational" 89 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Tigo" cc="cd" country="Democratic Republic of the Congo" operator="OASIS sprl" status="Operational" 90 bands="GSM 900 / GSM 1800" brand="Africell" cc="cd" country="Democratic Republic of the Congo" operator="Africell RDC sprl" status="Operational" 00-99 631 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="UNITEL" cc="ao" country="Angola" operator="UNITEL S.a.r.l." status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 900 / LTE 1800" brand="MOVICEL" cc="ao" country="Angola" operator="MOVICEL Telecommunications S.A." status="Operational" 00-99 632 01 bands="GSM 900 / GSM 1800" brand="Guinetel" cc="gw" country="Guinea-Bissau" operator="Guinétel S.A." status="Operational" 02 bands="GSM 900 / GSM 1800" brand="MTN Areeba" cc="gw" country="Guinea-Bissau" operator="Spacetel Guiné-Bissau S.A." status="Operational" 03 bands="GSM 900 / GSM 1800" brand="Orange" cc="gw" country="Guinea-Bissau" status="Operational" 07 bands="GSM 900 / GSM 1800" brand="Guinetel" cc="gw" country="Guinea-Bissau" operator="Guinétel S.A." status="Operational" 00-99 633 01 bands="GSM 900 / UMTS" brand="Cable & Wireless" cc="sc" country="Seychelles" operator="Cable & Wireless Seychelles" status="Operational" 02 bands="GSM 1800" brand="Mediatech" cc="sc" country="Seychelles" operator="Mediatech International" status="Not operational" 10 bands="GSM 900 / UMTS 2100 / LTE 800" brand="Airtel" cc="sc" country="Seychelles" operator="Telecom Seychelles Ltd" status="Operational" 00-99 634 01 bands="GSM 900 / UMTS 2100" brand="Zain SD" cc="sd" country="Sudan" operator="Zain Group - Sudan" status="Operational" 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="MTN" cc="sd" country="Sudan" operator="MTN Sudan" status="Operational" 03 bands="" brand="MTN" cc="sd" country="Sudan" operator="MTN Sudan" status="" 05 bands="CDMA2000 450" brand="Canar Telecom" cc="sd" country="Sudan" status="Operational" 07 bands="GSM 1800 / UMTS 2100 / CDMA2000 800" brand="Sudani One" cc="sd" country="Sudan" operator="Sudatel Group" status="Operational" 09 brand="Privet Network" cc="sd" country="Sudan" operator="NEC" status="" 00-99 635 10 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="MTN" cc="rw" country="Rwanda" operator="MTN Rwandacell SARL" status="Operational" 11 bands="CDMA" brand="Rwandatel" cc="rw" country="Rwanda" operator="Rwandatel S.A." status="Not operational" 12 bands="GSM" brand="Rwandatel" cc="rw" country="Rwanda" operator="Rwandatel S.A." status="Not operational" 13 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Tigo" cc="rw" country="Rwanda" operator="TIGO RWANDA S.A" status="Operational" 14 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE" brand="Airtel" cc="rw" country="Rwanda" operator="Airtel RWANDA" status="Operational" 17 bands="LTE 800" brand="Olleh" cc="rw" country="Rwanda" operator="Olleh Rwanda Networks" status="Operational" 00-99 636 01 bands="GSM 900 / GSM 1800 / UMTS 21000" brand="ETH-MTN" cc="et" country="Ethiopia" operator="Ethio Telecom" status="Operational" 00-99 637 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Telesom" cc="so" country="Somalia" operator="Telesom" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="Somafone" cc="so" country="Somalia" operator="Somafone FZLLC" status="Operational" 10 bands="GSM 900" brand="Nationlink" cc="so" country="Somalia" operator="NationLink Telecom" status="Operational" 30 bands="GSM 900" brand="Golis" cc="so" country="Somalia" operator="Golis Telecom Somalia" status="Operational" 50 bands="GSM 900 / UMTS" brand="Hormuud" cc="so" country="Somalia" operator="Hormuud Telecom Somalia Inc" status="Operational" 57 bands="GSM 900 / GSM 1800" brand="UNITEL" cc="so" country="Somalia" operator="UNITEL S.a.r.l." status="Operational" 60 bands="GSM 900 / GSM 1800" brand="Nationlink Telecom" cc="so" country="Somalia" operator="Nationlink Telecom" status="Operational" 67 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Horntel Group" cc="so" country="Somalia" operator="HTG Group Somalia" status="Operational" 70 bands="" cc="so" country="Somalia" operator="Onkod Telecom Ltd." status="Not operational" 71 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Somtel" cc="so" country="Somalia" operator="Somtel" status="Operational" 82 bands="GSM 900 / GSM 1800 / CDMA2000 / LTE" brand="Telcom" cc="so" country="Somalia" operator="Telcom Somalia" status="Operational" 00-99 638 01 bands="GSM 900 / UMTS" brand="Evatis" cc="dj" country="Djibouti" operator="Djibouti Telecom SA" status="Operational" 00-99 639 02 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 800 / LTE 1800" brand="Safaricom" cc="ke" country="Kenya" operator="Safaricom Limited" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="Airtel" cc="ke" country="Kenya" operator="Bharti Airtel" status="Operational" 05 bands="GSM 900" brand="yu" cc="ke" country="Kenya" operator="Essar Telecom Kenya" status="Not operational" 07 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Orange Kenya" cc="ke" country="Kenya" operator="Telkom Kenya" status="Operational" 00-99 640 01 bands="" cc="tz" country="Tanzania" operator="Rural NetCo Limited" status="" 02 bands="GSM 900 / GSM 1800" brand="tiGO" cc="tz" country="Tanzania" operator="MIC Tanzania Limited" status="Operational" 03 bands="GSM 900 / GSM 1800" brand="Zantel" cc="tz" country="Tanzania" operator="Zanzibar Telecom Ltd" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="Vodacom" cc="tz" country="Tanzania" operator="Vodacom Tanzania Limited" status="Operational" 05 bands="GSM 900 / GSM 1800" brand="Airtel" cc="tz" country="Tanzania" operator="Bharti Airtel" status="Operational" 06 bands="CDMA" brand="Sasatel" cc="tz" country="Tanzania" operator="Dovetel Limited" status="Operational" 07 bands="CDMA 800" brand="TTCL Mobile" cc="tz" country="Tanzania" operator="Tanzania Telecommunication Company LTD (TTCL)" status="Operational" 08 bands="CDMA" brand="Benson Online (BOL)" cc="tz" country="Tanzania" operator="Benson Informatics Limited" status="Operational" 09 brand="Hits" cc="tz" country="Tanzania" operator="ExcellentCom Tanzania Limited" status="Not operational" 11 bands="LTE 800" brand="SmileCom" cc="tz" country="Tanzania" operator="Smile Telecoms Holdings Ltd." status="Operational" 12 bands="" cc="tz" country="Tanzania" operator="MyCell Limited" status="" 00-99 641 01 bands="GSM 900 / UMTS 2100" brand="Airtel" cc="ug" country="Uganda" operator="Bharti Airtel" status="Operational" 06 bands="TD-LTE 2600" brand="Vodafone" cc="ug" country="Uganda" operator="Afrimax Uganda" status="Operational" 10 bands="GSM 900 / UMTS 900 / UMTS 2100 / TD-LTE 2600" brand="MTN" cc="ug" country="Uganda" operator="MTN Uganda" status="Operational" 11 bands="GSM 900 / UMTS 2100" brand="UTL" cc="ug" country="Uganda" operator="Uganda Telecom Ltd." status="Operational" 14 bands="GSM 900 / GSM 1800 / UMTS / LTE 800" brand="Africell" cc="ug" country="Uganda" operator="Africell Uganda" status="Operational" 18 bands="GSM 900 / GSM 1800" cc="ug" country="Uganda" operator="Suretelecom" status="Operational" 22 bands="GSM 900 / GSM 1800 / UMTS" brand="Airtel" cc="ug" country="Uganda" operator="Bharti Airtel" status="Operational" 30 bands="" cc="ug" country="Uganda" operator="Anupam Global Soft Uganda Limited" status="" 33 bands="LTE 800" brand="Smile" cc="ug" country="Uganda" operator="Smile Communications Uganda Limited" status="Operational" 40 bands="" cc="ug" country="Uganda" operator="Civil Aviation Authority (CAA)" status="" 44 bands="MVNO" brand="K2" cc="ug" country="Uganda" operator="K2 Telecom Ltd" status="Operational" 66 bands="" brand="i-Tel" cc="ug" country="Uganda" operator="i-Tel Ltd" status="" 00-99 642 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Spacetel" cc="bi" country="Burundi" operator="Econet Wireless Burundi PLC" status="Operational" 02 bands="GSM 900" brand="Tempo" cc="bi" country="Burundi" operator="Africell PLC" status="Operational" 03 bands="GSM 900" brand="Onatel" cc="bi" country="Burundi" operator="Onatel" status="Operational" 07 bands="GSM 1800 / UMTS" brand="Smart Mobile" cc="bi" country="Burundi" operator="LACELL SU" status="Operational" 08 bands="" brand="HiTs Telecom" cc="bi" country="Burundi" operator="HiTs Telecom" status="Not operational" 82 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Leo" cc="bi" country="Burundi" operator="Orascom Telecom" status="Operational" 00-99 643 01 bands="GSM 900 / GSM 1800 / UMTS 900 / UMTS 2100" brand="mCel" cc="mz" country="Mozambique" operator="Mocambique Celular S.A." status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Movitel" cc="mz" country="Mozambique" operator="Movitel S.A." status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Vodacom" cc="mz" country="Mozambique" operator="Vodacom Mozambique, S.A." status="Operational" 00-99 645 01 bands="GSM 900" brand="Airtel" cc="zm" country="Zambia" operator="Bharti Airtel" status="Operational" 02 bands="GSM 900" brand="MTN" cc="zm" country="Zambia" operator="MTN Group" status="Operational" 03 bands="GSM 900" brand="ZAMTEL" cc="zm" country="Zambia" operator="Zambia Telecommunications Company Ltd" status="Operational" 00-99 646 01 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Airtel" cc="mg" country="Madagascar" operator="Bharti Airtel" status="Operational" 02 bands="GSM 900" brand="Orange" cc="mg" country="Madagascar" operator="Orange Madagascar S.A." status="Operational" 03 bands="GSM 900" brand="Sacel" cc="mg" country="Madagascar" operator="Sacel Madagascar S.A." status="Not operational" 04 bands="GSM 900 / LTE" brand="Telma" cc="mg" country="Madagascar" operator="Telma Mobile S.A." status="Operational" 00-99 647 00 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Orange" cc="re" country="Réunion (France)" operator="Orange La Réunion" status="Operational" 01 bands="" cc="re" country="Réunion (France)" operator="BJT Partners" status="" 02 bands="GSM 900 / GSM 1800" brand="Outremer" cc="re" country="Réunion (France)" operator="Outremer Telecom" status="Operational" 10 bands="GSM 900" brand="SFR Reunion" cc="re" country="Réunion (France)" operator="Societe Reunionnaise de Radiotelephone" status="Operational" 00-99 648 01 bands="GSM 900" brand="Net*One" cc="zw" country="Zimbabwe" operator="Net*One Cellular (Pvt) Ltd" status="Operational" 03 bands="GSM 900" brand="Telecel" cc="zw" country="Zimbabwe" operator="Telecel Zimbabwe (PVT) Ltd" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Econet" cc="zw" country="Zimbabwe" operator="Econet Wireless (Private) Limited" status="Operational" 00-99 649 01 bands="GSM 900 / GSM 1800 / LTE 1800" brand="MTC" cc="na" country="Namibia" operator="MTC Namibia" status="Operational" 02 bands="CDMA2000 800" brand="switch" cc="na" country="Namibia" operator="Telecom Namibia" status="Operational" 03 bands="GSM 900 / GSM 1800 / LTE 1800" brand="TN Mobile" cc="na" country="Namibia" operator="Telecom Namibia" status="Operational" 04 bands="WiMAX 2500" cc="na" country="Namibia" operator="Paratus Telecommunications (Pty)" status="Operational" 00-99 650 01 bands="GSM 900 / GSM 1800" brand="TNM" cc="mw" country="Malawi" operator="Telecom Network Malawi" status="Operational" 10 bands="GSM 900" brand="Airtel" cc="mw" country="Malawi" operator="Bharti Airtel Limited" status="Operational" 00-99 651 01 bands="GSM 900" brand="Vodacom" cc="ls" country="Lesotho" operator="Vodacom Lesotho (Pty) Ltd" status="Operational" 02 bands="" cc="ls" country="Lesotho" operator="Econet Ezi-cel" status="Operational" 00-99 652 01 bands="GSM 900 / UMTS" brand="Mascom" cc="bw" country="Botswana" operator="Mascom Wireless (Pty) Limited" status="Operational" 02 bands="GSM 900 / UMTS 2100" brand="Orange" cc="bw" country="Botswana" operator="Orange (Botswana) Pty Limited" status="Operational" 04 bands="GSM 900 / GSM 1800" brand="BTC Mobile" cc="bw" country="Botswana" operator="Botswana Telecommunications Corporation" status="Operational" 00-99 653 01 bands="" cc="sz" country="Swaziland" operator="SPTC" status="" 10 bands="GSM 900" brand="Swazi MTN" cc="sz" country="Swaziland" operator="Swazi MTN Limited" status="Operational" 00-99 654 01 bands="" brand="Comoros Telecom" cc="km" country="Comoros" operator="HURI - SNPT" status="Operational" 00-99 655 01 bands="GSM 900 / GSM 1800 / UMTS 2100 / LTE 1800" brand="Vodacom" cc="za" country="South Africa" operator="Vodacom" status="Operational" 02 bands="GSM 1800 / UMTS 2100 / TD-LTE 2300" brand="Telkom" cc="za" country="South Africa" operator="Telkom SA Ltd" status="Operational" 04 bands="" cc="za" country="South Africa" operator="Sasol (Pty) Ltd." status="" 06 bands="" cc="za" country="South Africa" operator="Sentech (Pty) Ltd" status="Operational" 07 bands="GSM 900 / GSM 1800 / UMTS 900" brand="Cell C" cc="za" country="South Africa" operator="Cell C (Pty) Ltd" status="Operational" 10 bands="GSM 900 / UMTS 900 / UMTS 2100 / LTE 1800" brand="MTN" cc="za" country="South Africa" operator="MTN Group" status="Operational" 11 bands="TETRA 410" cc="za" country="South Africa" operator="South African Police Service Gauteng" status="Operational" 12 bands="" brand="MTN" cc="za" country="South Africa" operator="MTN Group" status="" 13 bands="CDMA 800" brand="Neotel" cc="za" country="South Africa" operator="Neotel Pty Ltd" status="Operational" 14 bands="LTE 1800" brand="Neotel" cc="za" country="South Africa" operator="Neotel Pty Ltd" status="Operational" 16 bands="" cc="za" country="South Africa" operator="Phoenix System Integration (Pty) Ltd" status="Not operational" 17 bands="" cc="za" country="South Africa" operator="Sishen Iron Ore Company (Ltd) Pty" status="" 19 bands="" brand="iBurst" cc="za" country="South Africa" operator="Wireless Business Solutions (Pty) Ltd" status="Operational" 21 bands="TETRA 410" cc="za" country="South Africa" operator="Cape Town Metropolitan Council" status="Operational" 25 bands="" cc="za" country="South Africa" operator="Wirels Connect" status="" 27 bands="" cc="za" country="South Africa" operator="A to Z Vaal Industrial Supplies Pty Ltd" status="" 30 bands="" cc="za" country="South Africa" operator="Bokamoso Consortium" status="Operational" 31 bands="" cc="za" country="South Africa" operator="Karabo Telecoms (Pty) Ltd." status="Operational" 32 bands="" cc="za" country="South Africa" operator="Ilizwi Telecommunications" status="Operational" 33 bands="" cc="za" country="South Africa" operator="Thinta Thinta Telecommunications Pty Ltd" status="Operational" 34 bands="" cc="za" country="South Africa" operator="Bokone Telecoms Pty Ltd" status="" 35 bands="" cc="za" country="South Africa" operator="Kingdom Communications Pty Ltd" status="" 36 bands="" cc="za" country="South Africa" operator="Amatole Telecommunications Pty Ltd" status="" 41 bands="" cc="za" country="South Africa" operator="South African Police Service" status="" 50 bands="" cc="za" country="South Africa" operator="Ericsson South Africa (Pty) Ltd" status="" 51 bands="" cc="za" country="South Africa" operator="Integrat (Pty) Ltd" status="" 00-99 657 01 bands="GSM 900" brand="Eritel" cc="er" country="Eritrea" operator="Eritrea Telecommunications Services Corporation" status="Operational" 00-99 658 01 bands="GSM" brand="Sure" cc="sh" country="Saint Helena, Ascension and Tristan da Cunha" operator="Sure South Atlantic Ltd." status="Operational" 00-99 659 02 bands="GSM 900/1800, UMTS 2100" brand="MTN" cc="ss" country="South Sudan" operator="MTN South Sudan" status="Operational" 03 bands="GSM 900/1800" brand="Gemtel" cc="ss" country="South Sudan" operator="Gemtel" status="Operational" 04 bands="GSM 900/1800" brand="Vivacell" cc="ss" country="South Sudan" operator="Network of the World (NOW)" status="Operational" 06 bands="GSM 900/1800" brand="Zain" cc="ss" country="South Sudan" operator="Zain South Sudan" status="Operational" 07 bands="CDMA" brand="Sudani" cc="ss" country="South Sudan" operator="Sudani" status="Operational" 00-99 702 67 bands="GSM 1900 / UMTS 850 / LTE 850 / LTE 1900" brand="DigiCell" cc="bz" country="Belize" operator="Belize Telemedia Limited (BTL)" status="Operational" 68 bands="" brand="INTELCO" cc="bz" country="Belize" operator="International Telecommunications Ltd." status="Not operational" 69 bands="CDMA2000 850" brand="SMART" cc="bz" country="Belize" operator="Speednet Communications Limited" status="Operational" 99 bands="CDMA2000 850" brand="SMART" cc="bz" country="Belize" operator="Speednet Communications Limited" status="Operational" 00-99 704 01 bands="CDMA 1900 / GSM 900 / GSM 1900 / UMTS 1900" brand="Claro" cc="gt" country="Guatemala" operator="Telecomunicaciones de Guatemala, S.A." status="Operational" 02 bands="GSM 850 / TDMA 800 / UMTS 850" brand="Tigo" cc="gt" country="Guatemala" operator="Millicom / Local partners" status="Operational" 03 bands="CDMA 1900 / GSM 1900 / UMTS 1900" brand="movistar" cc="gt" country="Guatemala" operator="Telefónica Móviles Guatemala (Telefónica)" status="Operational" 00-99 706 01 bands="GSM 1900 / UMTS 1900" brand="Claro" cc="sv" country="El Salvador" operator="CTE Telecom Personal, S.A. de C.V." status="Operational" 02 bands="GSM 900 / UMTS 900" brand="digicel" cc="sv" country="El Salvador" operator="Digicel Group" status="Operational" 03 bands="GSM 850 / UMTS 850" brand="Tigo" cc="sv" country="El Salvador" operator="Telemovil El Salvador S.A." status="Operational" 04 bands="GSM 850 / GSM 1900 / UMTS" brand="movistar" cc="sv" country="El Salvador" operator="Telefónica Móviles El Salvador" status="Operational" 05 bands="iDEN" brand="RED" cc="sv" country="El Salvador" operator="INTELFON, S.A. de C.V." status="Operational" 00-99 708 001 bands="GSM 1900 / UMTS 1900" brand="Claro" cc="hn" country="Honduras" operator="Servicios de Comunicaciones de Honduras S.A. de C.V." status="Operational" 002 bands="CDMA 850 / GSM 850 / UMTS 850" brand="Tigo" cc="hn" country="Honduras" operator="Celtel" status="Operational" 030 bands="GSM 1900" brand="Hondutel" cc="hn" country="Honduras" operator="Empresa Hondureña de Telecomunicaciones" status="Operational" 040 bands="GSM 1900" brand="Digicel" cc="hn" country="Honduras" operator="Digicel de Honduras" status="Operational" 000-999 710 21 bands="UMTS 850 / GSM 1900" brand="Claro" cc="ni" country="Nicaragua" operator="Empresa Nicaragüense de Telecomunicaciones, S.A. (ENITEL) (América Móvil)" status="Operational" 30 bands="UMTS 850 / GSM 850 / GSM 1900" brand="movistar" cc="ni" country="Nicaragua" operator="Telefonía Celular de Nicaragua, S.A. (Telefónica, S.A.)" status="Operational" 73 bands="UMTS 850 / GSM 1900" brand="SERCOM" cc="ni" country="Nicaragua" operator="Servicios de Comunicaciones S.A." status="Operational" 00-99 712 01 bands="GSM 1800 / UMTS 850 / LTE 2600" brand="Kolbi ICE" cc="cr" country="Costa Rica" operator="Instituto Costarricense de Electricidad" status="Operational" 02 bands="GSM 1800 / UMTS 850 / LTE 2600" brand="Kolbi ICE" cc="cr" country="Costa Rica" operator="Instituto Costarricense de Electricidad" status="Operational" 03 bands="GSM 1800 / UMTS 2100 / LTE 1800" brand="Claro" cc="cr" country="Costa Rica" operator="Claro CR Telecomunicaciones (Aló)" status="Operational" 04 bands="GSM 1800 / UMTS 850 / UMTS 2100 / LTE 1800" brand="movistar" cc="cr" country="Costa Rica" operator="Telefónica Móviles Costa Rica" status="Operational" 20 bands="GSM 1800 / UMTS 850" brand="'full'móvil" cc="cr" country="Costa Rica" operator="Virtualis S.A." status="Operational" 00-99 714 01 bands="GSM 850 / UMTS 850 / LTE 700" brand="Cable & Wireless" cc="pa" country="Panama" operator="Cable & Wireless Panama S.A." status="Operational" 02 bands="GSM 850 / UMTS 850 / UMTS 1900" brand="movistar" cc="pa" country="Panama" operator="Telefónica Moviles Panama S.A, Bell South Corp. (BSC)" status="Operational" 03 bands="GSM 1900 / UMTS 1900" brand="Claro" cc="pa" country="Panama" operator="América Móvil" status="Operational" 04 bands="GSM 1900 / UMTS 1900" brand="Digicel" cc="pa" country="Panama" operator="Digicel Group" status="Operational" 00-99 716 06 bands="CDMA2000 850 / GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900 / LTE 1700" brand="Movistar" cc="pe" country="Peru" operator="Telefónica Móviles Perú" status="Operational" 07 bands="iDEN / UMTS 1900" brand="NEXTEL" cc="pe" country="Peru" operator="Americatel Perú" status="Inactive" 10 bands="GSM 1900 / UMTS 850 / LTE 1900" brand="Claro (TIM)" cc="pe" country="Peru" operator="América Móvil Perú" status="Operational" 15 bands="GSM 1900 / UMTS 1900" brand="Viettel Mobile" cc="pe" country="Peru" operator="Viettel Peru S.A.C." status="Operational" 17 bands="iDEN / UMTS 1900" brand="NEXTEL" cc="pe" country="Peru" operator="Americatel Perú" status="Operational" 00-99 722 010 bands="GSM 850 / GSM 1900 / UMTS / LTE 1700" brand="Movistar" cc="ar" country="Argentina" operator="Telefónica Móviles Argentina S.A." status="Operational" 020 bands="iDEN 800" brand="Nextel" cc="ar" country="Argentina" operator="NII Holdings" status="Operational" 034 bands="" brand="Personal" cc="ar" country="Argentina" operator="Telecom Personal S.A." status="Operational" 040 bands="" brand="Globalstar" cc="ar" country="Argentina" operator="TE.SA.M Argentina S.A." status="Operational" 070 bands="GSM 1900" brand="Movistar" cc="ar" country="Argentina" operator="Telefónica Móviles Argentina S.A." status="Operational" 310 bands="GSM 1900" brand="Claro" cc="ar" country="Argentina" operator="AMX Argentina S.A." status="Operational" 320 bands="GSM 850 / GSM 1900 / UMTS" brand="Claro" cc="ar" country="Argentina" operator="AMX Argentina S.A." status="Operational" 330 bands="GSM 850 / GSM 1900 / UMTS" brand="Claro" cc="ar" country="Argentina" operator="AMX Argentina S.A." status="Operational" 341 bands="GSM 850 / GSM 1900 / UMTS / LTE 1700" brand="Personal" cc="ar" country="Argentina" operator="Telecom Personal S.A." status="Operational" 350 bands="GSM 900" brand="PORT-HABLE" cc="ar" country="Argentina" operator="Hutchison Telecommunications Argentina S.A." status="Operational" 000-999 724 00 bands="iDEN 850" brand="Nextel" cc="br" country="Brazil" operator="NII Holdings, Inc." status="Operational" 01 bands="MVNO" cc="br" country="Brazil" operator="SISTEER DO BRASIL TELECOMUNICAÇÔES" status="" 02 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 2600" brand="TIM" cc="br" country="Brazil" operator="Telecom Italia Mobile" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 2600" brand="TIM" cc="br" country="Brazil" operator="Telecom Italia Mobile" status="Operational" 04 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 2600" brand="TIM" cc="br" country="Brazil" operator="Telecom Italia Mobile" status="Operational" 05 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 2600" brand="Claro BR" cc="br" country="Brazil" operator="Claro" status="Operational" 06 bands="GSM 850 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 2600" brand="Vivo" cc="br" country="Brazil" operator="Vivo S.A." status="Operational" 10 bands="GSM 850 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 2600" brand="Vivo" cc="br" country="Brazil" operator="Vivo S.A." status="Operational" 11 bands="GSM 850 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 2600" brand="Vivo" cc="br" country="Brazil" operator="Vivo S.A." status="Operational" 15 bands="GSM 900 / GSM 1800 / UMTS 850" brand="Sercomtel" cc="br" country="Brazil" operator="Sercomtel Celular" status="Operational" 16 bands="GSM 1800 / UMTS 2100" brand="Brasil Telecom GSM" cc="br" country="Brazil" operator="Brasil Telecom GSM" status="Not operational" 18 bands="MVNO" cc="br" country="Brazil" operator="Datora (Vodafone)" status="Operational" 23 bands="GSM 850 / GSM 1800 / UMTS 850 / UMTS 2100 / LTE 2600" brand="Vivo" cc="br" country="Brazil" operator="Vivo S.A." status="Operational" 24 bands="" cc="br" country="Brazil" operator="Amazonia Celular" status="" 30 bands="" brand="Oi" cc="br" country="Brazil" operator="TNL PCS Oi" status="" 31 bands="GSM 1800 / UMTS 2100 / LTE 2600" brand="Oi" cc="br" country="Brazil" operator="TNL PCS Oi" status="Operational" 32 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100" brand="CTBC Celular" cc="br" country="Brazil" operator="CTBC Celular S.A." status="Operational" 33 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100" brand="CTBC Celular" cc="br" country="Brazil" operator="CTBC Celular S.A." status="Operational" 34 bands="GSM 900 / GSM 1800 / UMTS 850 / UMTS 2100" brand="CTBC Celular" cc="br" country="Brazil" operator="CTBC Celular S.A." status="Operational" 35 bands="" cc="br" country="Brazil" operator="Telcom Telecomunicações" status="" 36 bands="" cc="br" country="Brazil" operator="Options Telecomunicações" status="" 37 bands="" brand="aeiou" cc="br" country="Brazil" operator="Unicel" status="Not operational" 38 bands="" brand="Claro BR" cc="br" country="Brazil" operator="Claro" status="" 39 bands="UMTS 2100 / LTE 1800" brand="Nextel" cc="br" country="Brazil" operator="NII Holdings, Inc." status="Operational" 54 bands="MVNO" cc="br" country="Brazil" operator="PORTO SEGURO TELECOMUNICAÇÔES" status="Operational" 99 bands="" brand="Local" cc="br" country="Brazil" operator="Local ( purpose or usage)" status="" 00-99 730 01 bands="GSM 1900 / UMTS 1900 / LTE 2600" brand="entel" cc="cl" country="Chile" operator="Entel Telefonía Móvil S.A." status="Operational" 02 bands="GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900 / LTE 2600" brand="movistar" cc="cl" country="Chile" operator="Telefónica Móvil de Chile" status="Operational" 03 bands="GSM 1900 / UMTS 850 / UMTS 1900 / LTE 2600" brand="Claro" cc="cl" country="Chile" operator="Claro Chile S.A." status="Operational" 04 bands="iDEN 800" brand="WOM" cc="cl" country="Chile" operator="Novator Partners" status="Operational" 05 bands="" cc="cl" country="Chile" operator="Multikom S.A." status="" 06 bands="MVNO" brand="Telefónica del Sur" cc="cl" country="Chile" operator="Blue Two Chile S.A." status="Operational" 07 bands="" brand="movistar" cc="cl" country="Chile" operator="Telefónica Móvil de Chile" status="" 08 bands="MVNO" brand="VTR Móvil" cc="cl" country="Chile" operator="VTR S.A." status="Operational" 09 bands="UMTS 1700" brand="WOM" cc="cl" country="Chile" operator="Novator Partners" status="Operational" 10 bands="GSM 1900 / UMTS 1900" brand="entel" cc="cl" country="Chile" operator="Entel Telefonía Móvil S.A." status="Operational" 11 bands="" cc="cl" country="Chile" operator="Celupago S.A." status="" 12 bands="MVNO" brand="Wanderers Móvil" cc="cl" country="Chile" operator="Telestar Móvil S.A." status="Operational" 13 bands="MVNO" brand="Virgin Mobile" cc="cl" country="Chile" operator="Tribe Mobile Chile SPA" status="Operational" 14 bands="" cc="cl" country="Chile" operator="Netline Telefónica Móvil Ltda" status="" 15 bands="" cc="cl" country="Chile" operator="Cibeles Telecom S.A." status="" 16 bands="MVNO" cc="cl" country="Chile" operator="Nomade Telecomunicaciones S.A." status="" 17 bands="" cc="cl" country="Chile" operator="COMPATEL Chile Limitada" status="" 99 bands="GSM 1900 / UMTS 1900" brand="Will" cc="cl" country="Chile" operator="WILL Telefonía" status="Operational" 00-99 732 001 bands="" brand="movistar" cc="co" country="Colombia" operator="Colombia Telecomunicaciones S.A. ESP" status="Operational" 002 bands="" brand="Edatel" cc="co" country="Colombia" operator="Edatel S.A. ESP" status="Operational" 003 bands="" cc="co" country="Colombia" operator="LLEIDA S.A.S." status="" 004 bands="" cc="co" country="Colombia" operator="COMPATEL COLOMBIA SAS" status="" 020 bands="LTE 2600" brand="Une-EPM" cc="co" country="Colombia" operator="Une EPM Telecomunicaciones S.A. E.S.P." status="Operational" 099 bands="GSM 900" brand="EMCALI" cc="co" country="Colombia" operator="Empresas Municipales de Cali" status="Operational" 101 bands="GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900 / LTE 1700 / LTE 2600" brand="Claro" cc="co" country="Colombia" operator="COMCEL S.A." status="Operational" 102 bands="GSM 850 / GSM 1900 / CDMA 850" cc="co" country="Colombia" operator="Bellsouth Colombia" status="Not operational" 103 bands="GSM 1900 / UMTS / LTE 1700" brand="Tigo" cc="co" country="Colombia" operator="Colombia Móvil S.A. ESP" status="Operational" 111 bands="GSM 1900 / UMTS / LTE 1700" brand="Tigo" cc="co" country="Colombia" operator="Colombia Móvil S.A. ESP" status="Operational" 123 bands="GSM 850 / GSM 1900 / UMTS / LTE 1700 / CDMA 850" brand="movistar" cc="co" country="Colombia" operator="Colombia Telecomunicaciones S.A. ESP" status="Operational" 130 bands="GSM 850 / iDEN / LTE 1700" brand="AVANTEL" cc="co" country="Colombia" operator="Avantel S.A.S" status="Operational" 142 bands="" cc="co" country="Colombia" operator="Une EPM Telecomunicaciones S.A. E.S.P." status="" 154 bands="MVNO" cc="co" country="Colombia" operator="Virgin Mobile Colombia S.A.S." status="Operational" 165 bands="" cc="co" country="Colombia" operator="Colombia Móvil S.A. ESP" status="" 176 bands="TD-LTE 2600" cc="co" country="Colombia" operator="DirecTV Colombia Ltda" status="Operational" 187 bands="LTE 1700" cc="co" country="Colombia" operator="Empresa de Telecomunicaciones de Bogotá S.A. ESP" status="Operational" 000-999 734 01 bands="GSM 900" brand="Digitel" cc="ve" country="Venezuela" operator="Corporacion Digitel C.A." status="Not operational" 02 bands="GSM 900 / GSM 1800 / UMTS 900 / LTE 1800" brand="Digitel GSM" cc="ve" country="Venezuela" operator="Corporacion Digitel C.A." status="Operational" 03 bands="GSM 900" brand="Digitel" cc="ve" country="Venezuela" operator="Corporacion Digitel C.A." status="Not operational" 04 bands="GSM 850 / GSM 1900 / UMTS 1900" brand="movistar" cc="ve" country="Venezuela" operator="Telefónica Móviles Venezuela" status="Operational" 06 bands="CDMA2000 850 / GSM 850 / UMTS 1900" brand="Movilnet" cc="ve" country="Venezuela" operator="Telecomunicaciones Movilnet" status="Operational" 00-99 736 01 bands="GSM 1900 / UMTS" brand="Viva" cc="bo" country="Bolivia" operator="Nuevatel PCS De Bolivia SA" status="Operational" 02 bands="GSM 850 / GSM 1900 / UMTS 850 / LTE 700" brand="Entel" cc="bo" country="Bolivia" operator="Entel SA" status="Operational" 03 bands="GSM 850 / UMTS" brand="Tigo" cc="bo" country="Bolivia" operator="Telefónica Celular De Bolivia S.A" status="Operational" 00-99 738 01 bands="GSM 900" brand="Digicel" cc="gy" country="Guyana" operator="U-Mobile (Cellular) Inc." status="Operational" 02 bands="GSM 900" brand="GT&T Cellink Plus" cc="gy" country="Guyana" operator="Guyana Telephone & Telegraph Co." status="Operational" 00-99 740 00 bands="GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900 / LTE 1900" brand="Movistar" cc="ec" country="Ecuador" operator="Otecel S.A." status="Operational" 01 bands="GSM 850 / UMTS 850 / UMTS 1900" brand="Claro" cc="ec" country="Ecuador" operator="CONECEL S.A." status="Operational" 02 bands="GSM 850 / UMTS / LTE 1700" brand="CNT Mobile" cc="ec" country="Ecuador" operator="Corporación Nacional de Telecomunicaciones (CNT EP)" status="Operational" 00-99 744 01 bands="GSM 1900 / UMTS 900" brand="VOX" cc="py" country="Paraguay" operator="Hola Paraguay S.A" status="Operational" 02 bands="GSM 1900 / UMTS 1900" brand="Claro/Hutchison" cc="py" country="Paraguay" operator="AMX Paraguay S.A." status="Operational" 03 bands="" cc="py" country="Paraguay" operator="Compañia Privada de Comunicaciones S.A." status="" 04 bands="GSM 850 / UMTS 850" brand="Tigo" cc="py" country="Paraguay" operator="Telefónica Celular Del Paraguay S.A. (Telecel)" status="Operational" 05 bands="GSM 850 / GSM 1900 / UMTS 850 / UMTS 1900 / LTE 1900" brand="Personal" cc="py" country="Paraguay" operator="Núcleo S.A(TIM)" status="Operational" 06 bands="GSM 1800 / LTE 1700" brand="Copaco" cc="py" country="Paraguay" operator="Copaco S.A." status="Operational" 00-99 746 02 bands="GSM 900 / GSM 1800 / UMTS 2100" brand="Telesur" cc="sr" country="Suriname" operator="Telecommunications Company Suriname (Telesur)" status="Operational" 03 bands="GSM 900 / GSM 1800 / UMTS 850" brand="Digicel" cc="sr" country="Suriname" operator="Digicel Group Limited" status="Operational" 04 bands="GSM 900 / UMTS" brand="Uniqa" cc="sr" country="Suriname" operator="Intelsur N.V. / UTS N.V." status="Operational" 05 bands="CDMA 450" brand="Telesur" cc="sr" country="Suriname" operator="Telecommunications Company Suriname (Telesur)" status="" 00-99 748 00 bands="TDMA" brand="Antel" cc="uy" country="Uruguay" operator="Administración Nacional de Telecomunicaciones" status="" 01 bands="GSM 1800 / UMTS 850 / UMTS 2100 / LTE 1700" brand="Antel" cc="uy" country="Uruguay" operator="Administración Nacional de Telecomunicaciones" status="Operational" 03 bands="" brand="Antel" cc="uy" country="Uruguay" operator="Administración Nacional de Telecomunicaciones" status="" 07 bands="GSM 850 / GSM 1900 / UMTS 850 / LTE 1900" brand="Movistar" cc="uy" country="Uruguay" operator="Telefónica Móviles Uruguay" status="Operational" 10 bands="GSM 1900 / UMTS 1900 / LTE 1700" brand="Claro" cc="uy" country="Uruguay" operator="AM Wireless Uruguay S.A." status="Operational" 00-99 750 001 bands="GSM 900" brand="sure" cc="fk" country="Falkland Islands (United Kingdom)" operator="Batelco" status="Operational" 000-999 901 01 bands="Satellite" brand="ICO" country="International operators" operator="ICO Satellite Management" status="Operational" 02 bands="" country="International operators" operator="Unassigned" status="Returned spare" 03 bands="Satellite" brand="Iridium" country="International operators" status="Operational" 04 bands="Satellite" country="International operators" operator="Unassigned" status="Returned spare" 05 bands="Satellite" country="International operators" operator="Thuraya RMSS Network" status="Operational" 06 bands="Satellite" country="International operators" operator="Thuraya Satellite Telecommunications Company" status="Operational" 07 bands="" country="International operators" operator="Unassigned" status="Returned spare" 08 bands="" country="International operators" operator="Unassigned" status="Returned spare" 09 bands="" country="International operators" operator="Unassigned" status="Returned spare" 10 bands="Satellite" brand="ACeS" country="International operators" status="Operational" 11 bands="Satellite" brand="Inmarsat" country="International operators" status="Operational" 12 bands="GSM 1800" brand="Telenor" country="International operators" operator="Maritime Communications Partner AS (MCP)" status="Operational" 13 bands="GSM 1800" brand="GSM.AQ" country="International operators" operator="BebbiCell AG" status="Operational" 14 bands="GSM 1800" brand="AeroMobile" country="International operators" operator="AeroMobile AS" status="Operational" 15 bands="GSM 1800" brand="OnAir" country="International operators" operator="OnAir Switzerland Sarl" status="Operational" 16 bands="" country="International operators" operator="Jasper Systems" status="Operational" 17 bands="GSM 1800" brand="Navitas" country="International operators" operator="JT Group Limited" status="Not operational" 18 bands="GSM 900 / GSM 1900 / CDMA2000 1900" brand="Cellular @Sea" country="International operators" operator="AT&T Mobility" status="Operational" 19 bands="GSM 900 / GSM 1800 / UMTS 2100" country="International operators" operator="Vodafone Malta Maritime" status="Operational" 20 bands="" country="International operators" operator="Intermatica" status="" 21 bands="GSM 1800" country="International operators" operator="Wins Limited" status="Operational" 22 bands="" country="International operators" operator="MediaLincc Ltd" status="" 23 bands="" country="International operators" operator="Unassigned" status="Returned spare" 24 bands="" brand="iNum" country="International operators" operator="Voxbone" status="" 25 bands="" country="International operators" operator="Unassigned" status="Returned spare" 26 bands="GSM 1800 / GSM 1900" brand="TIM@sea" country="International operators" operator="Telecom Italia Mobile" status="Operational" 27 bands="GSM 1800" brand="OnMarine" country="International operators" operator="OnAir Switzerland Sarl" status="Operational" 28 bands="Roaming SIM" brand="Vodafone" country="International operators" operator="GDSP (Vodafone's Global Data Service Platform)" status="Operational" 29 bands="" brand="Telenor" country="International operators" status="" 30 bands="" country="International operators" operator="Unassigned" status="Returned spare" 31 bands="GSM 900" brand="Orange" country="International operators" operator="Orange S.A." status="Operational" 32 bands="GSM 900" brand="Sky High" country="International operators" operator="MegaFon" status="Operational" 33 bands="" country="International operators" operator="Smart Communications" status="" 34 bands="" country="International operators" operator="tyntec GmbH" status="" 35 bands="GSM 850" country="International operators" operator="Globecomm Network Services" status="Operational" 36 bands="GSM 1800" country="International operators" operator="Azerfon" status="Operational" 37 bands="MVNO" country="International operators" operator="Transatel" status="Operational" 38 bands="MVNO" country="International operators" operator="Multiregional TransitTelecom (MTT)" status="Operational" 39 bands="MVNO" country="International operators" operator="MTX Connect Ltd" status="Operational" 40 bands="" country="International operators" operator="Deutsche Telekom AG" status="" 41 bands="MVNO" country="International operators" operator="BodyTrace Netherlands B.V." status="Operational" 42 bands="" country="International operators" operator="DCN Hub ehf" status="" 43 bands="MVNO" country="International operators" operator="EMnify GmbH" status="Operational" 44 bands="" country="International operators" operator="AT&T Inc." status="" 45 bands="" country="International operators" operator="Advanced Wireless Network Company Limited" status="" 46 bands="MVNO" country="International operators" operator="Telecom26 AG" status="Operational" 47 bands="" country="International operators" operator="Ooredoo" status="" 88 bands="" country="International operators" operator="UN Office for the Coordination of Humanitarian Affairs (OCHA)" status="" 00-99 python-stdnum-1.2/stdnum/ar/0000755000000000000000000000000012606445507016070 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/ar/cuit.py0000644000000000000000000000471612606424566017420 0ustar rootroot00000000000000# cuit.py - functions for handling Argentinian VAT numbers # coding: utf-8 # # Copyright (C) 2009 Mariano Reingart # Copyright (C) 2011 Sebastián Marró # Copyright (C) 2008-2011 Cédric Krier # Copyright (C) 2008-2011 B2CK # Copyright (C) 2015 Arthur de Jong # # 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 """CUIT (Código Único de Identificación Tributaria, Argentinian tax number). The CUIT is a taxpayer identification number used for VAT (IVA, Impuesto al Valor Agregado) and other taxes. >>> validate('200-5536168-2') '20055361682' >>> validate('2026756539') Traceback (most recent call last): ... InvalidLength: ... >>> validate('2026756A393') Traceback (most recent call last): ... InvalidFormat: ... >>> validate('20267565392') Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').strip() def calc_check_digit(number): """Calculate the check digit.""" weights = (5, 4, 3, 2, 7, 6, 5, 4, 3, 2) check = sum(w * int(n) for w, n in zip(weights, number)) % 11 return '012345678990'[11 - check] def validate(number): """Checks to see if the number provided is a valid CUIT.""" number = compact(number) if len(number) != 11: raise InvalidLength() if not number.isdigit(): raise InvalidFormat() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid CUIT.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ar/__init__.py0000644000000000000000000000165112601744731020200 0ustar rootroot00000000000000# __init__.py - collection of Argentinian numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Collection of Argentinian numbers.""" # provide vat as an alias from stdnum.ar import cuit as vat python-stdnum-1.2/stdnum/at/0000755000000000000000000000000012606445507016072 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/at/businessid.py0000644000000000000000000000433412601745371020615 0ustar rootroot00000000000000# businessid.py - functions for handling Austrian company register numbers # # Copyright (C) 2015 Holvi Payment Services Oy # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """Austrian Company Register Numbers. The Austrian company register number consist of digits followed by a single letter, e.g. "122119m". Sometimes it is presented with preceding "FN", e.g. "FN 122119m". >>> validate('FN 122119m') '122119m' >>> validate('122119m') '122119m' >>> validate('m123123') Traceback (most recent call last): ... InvalidFormat: ... >>> validate('abc') Traceback (most recent call last): ... InvalidFormat: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace. Preceding "FN" is also removed.""" number = clean(number, ' -./').strip() if number.upper().startswith('FN'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid company register number. This only checks the formatting.""" number = compact(number) if not number[-1:].isalpha() or not number[:-1].isdigit(): raise InvalidFormat() return number def is_valid(number): """Checks to see if the number provided is a valid company register number. This only checks the formatting.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/at/uid.py0000644000000000000000000000462712154624370017231 0ustar rootroot00000000000000# vat.py - functions for handling Austrian VAT numbers # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number). The Austrian UID is a 9-digit number that starts with a U (optionally preceded with AT). The last digit is a check digit. >>> validate('AT U13585627') 'U13585627' >>> calc_check_digit('U1358562') '7' >>> validate('U13585626') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum import luhn from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -./').upper().strip() if number.startswith('AT'): number = number[2:] return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" return str((6 - luhn.checksum(number[1:])) % 10) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if number[:1] != 'U' or not number[1:].isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/at/__init__.py0000644000000000000000000000164211720140727020176 0ustar rootroot00000000000000# __init__.py - collection of Austrian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Austrian numbers.""" # provide vat as an alias from stdnum.at import uid as vat python-stdnum-1.2/stdnum/gb/0000755000000000000000000000000012606445507016056 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/gb/__init__.py0000644000000000000000000000156211720140726020162 0ustar rootroot00000000000000# __init__.py - collection of United Kingdom numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of United Kingdom numbers.""" python-stdnum-1.2/stdnum/gb/sedol.py0000644000000000000000000000540312606425204017530 0ustar rootroot00000000000000# sedol.py - functions for handling SEDOL numbers # # Copyright (C) 2015 Arthur de Jong # # 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 """SEDOL number (Stock Exchange Daily Official List number). The SEDOL number is a security identifier used in the United Kingdom and Ireland assigned by the London Stock Exchange. A SEDOL is seven characters in length consisting of six alphanumeric digits, followed by a check digit. >>> validate('B15KXQ8') 'B15KXQ8' >>> validate('B15KXQ7') Traceback (most recent call last): ... InvalidChecksum: ... >>> to_isin('B15KXQ8') 'GB00B15KXQ89' """ from stdnum.exceptions import * from stdnum.util import clean # the letters allowed in an SEDOL (vowels are never used) _alphabet = '0123456789 BCD FGH JKLMN PQRST VWXYZ' def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip().upper() def calc_check_digit(number): """Calculate the check digits for the number.""" weights = (1, 3, 1, 7, 3, 9) s = sum(w * _alphabet.index(n) for w, n in zip(weights, number)) return str((10 - s) % 10) def validate(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" number = compact(number) if not all(x in _alphabet for x in number): raise InvalidFormat() if len(number) != 7: raise InvalidLength() if number[0].isdigit() and not number.isdigit(): # new style SEDOLs are supposed to start with a letter, old-style # numbers should be fully numeric raise InvalidFormat() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" try: return bool(validate(number)) except ValidationError: return False def to_isin(number): """Convert the number to an ISIN.""" from stdnum import isin return isin.from_natid('GB', number) python-stdnum-1.2/stdnum/gb/vat.py0000644000000000000000000001035112606424566017224 0ustar rootroot00000000000000# vat.py - functions for handling United Kingdom VAT numbers # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """VAT (United Kingdom (and Isle of Man) VAT registration number). The VAT number can either be a 9-digit standard number, a 12-digit standard number followed by a 3-digit branch identifier, a 5-digit number for government departments (first two digits are GD) or a 5-digit number for health authorities (first two digits are HA). The 9-digit variants use a weighted checksum. >>> validate('GB 980 7806 84') '980780684' >>> validate('802311781') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> format('980780684') '980 7806 84' """ from stdnum.util import clean from stdnum.exceptions import * def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.').upper().strip() if number.startswith('GB'): number = number[2:] return number def checksum(number): """Calculate the checksum. The checksum is only used for the 9 digits of the number and the result can either be 0 or 42.""" weights = (8, 7, 6, 5, 4, 3, 2, 10, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 97 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if len(number) == 5: if not number[2:].isdigit(): raise InvalidFormat() if number.startswith('GD') and int(number[2:]) < 500: # government department pass elif number.startswith('HA') and int(number[2:]) >= 500: # health authority pass else: raise InvalidComponent() elif len(number) == 11 and number[0:6] in ('GD8888', 'HA8888'): if not number[6:].isdigit(): raise InvalidFormat() if number.startswith('GD') and int(number[6:9]) < 500: # government department pass elif number.startswith('HA') and int(number[6:9]) >= 500: # health authority pass else: raise InvalidComponent() if int(number[6:9]) % 97 != int(number[9:11]): raise InvalidChecksum() elif len(number) in (9, 12): if not number.isdigit(): raise InvalidFormat() # standard number: nnn nnnn nn # branch trader: nnn nnnn nn nnn (ignore the last thee digits) # restarting: 100 nnnn nn if int(number[:3]) >= 100: if checksum(number[:9]) not in (0, 42, 55): raise InvalidChecksum() else: if checksum(number[:9]) != 0: raise InvalidChecksum() else: raise InvalidLength() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) if len(number) == 5: # government department or health authority return number if len(number) == 12: # includes branch number return number[:3] + ' ' + number[3:7] + ' ' + number[7:9] + ' ' + number[9:] # standard number: nnn nnnn nn return number[:3] + ' ' + number[3:7] + ' ' + number[7:] python-stdnum-1.2/stdnum/isil.py0000644000000000000000000000562712606424375017012 0ustar rootroot00000000000000# isil.py - functions for handling identifiers for libraries and related # organizations # # Copyright (C) 2011, 2012, 2013 Arthur de Jong # # 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 """ISIL (International Standard Identifier for Libraries). The ISIL is the International Standard Identifier for Libraries and Related Organizations. >>> validate('IT-RM0267') 'IT-RM0267' >>> validate('OCLC-DLC') 'OCLC-DLC' >>> validate('WW-RM0267') # unregistered country code Traceback (most recent call last): ... InvalidComponent: ... >>> validate('WW-RM026712423345334534512334534545') # too long Traceback (most recent call last): ... InvalidLength: ... >>> format('it-RM0267') 'IT-RM0267' >>> format('zz-RM0267') # unknown agencies are left alone 'zz-RM0267' """ from stdnum.exceptions import * from stdnum.util import clean # the valid characters in an ISIL _alphabet = set('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-:/') def compact(number): """Convert the ISIL to the minimal representation. This strips surrounding whitespace.""" return clean(number, '').strip() def _known_agency(agency): """Checks whether the specified agency is valid.""" # look it up in the db from stdnum import numdb results = numdb.get('isil').info(agency.upper() + '$') # there should be only one part and it should have properties return len(results) == 1 and bool(results[0][1]) def validate(number): """Checks to see if the number provided is a valid isil (or isilSV) number.""" number = compact(number) for n in number: if n not in _alphabet: raise InvalidFormat() if len(number) > 15: raise InvalidLength() if not _known_agency(number.split('-')[0]): raise InvalidComponent() return number def is_valid(number): """Checks to see if the number provided is a valid isil (or isilSV) number.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) parts = number.split('-') if len(parts) > 1 and _known_agency(parts[0]): parts[0] = parts[0].upper() return '-'.join(parts) python-stdnum-1.2/stdnum/nl/0000755000000000000000000000000012606445507016077 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/nl/bsn.py0000644000000000000000000000521112154624371017226 0ustar rootroot00000000000000# bsn.py - functions for handling BSNs # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """BSN (Burgerservicenummer, Dutch national identification number). The BSN is a number with up to 9 digits (the leading 0's are commonly left out) which is used as the Dutch national identification number. >>> validate('1112.22.333') '111222333' >>> validate('1112.52.333') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('1112223334') Traceback (most recent call last): ... InvalidLength: ... >>> format('111222333') '1112.22.333' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.').strip() # pad with leading zeroes return (9 - len(number)) * '0' + number def checksum(number): """Calculate the checksum over the number. A valid number should have a check digit of 0.""" return (sum((9 - i) * int(n) for i, n in enumerate(number[:-1])) - int(number[-1])) % 11 def validate(number): """Checks to see if the number provided is a valid BSN. This checks the length and whether the check digit is correct.""" number = compact(number) if not number.isdigit() or int(number) <= 0: raise InvalidFormat() if len(number) != 9: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid BSN. This checks the length and whether the check digit is correct.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:4] + '.' + number[4:6] + '.' + number[6:] python-stdnum-1.2/stdnum/nl/postcode.py0000644000000000000000000000445412606432040020264 0ustar rootroot00000000000000# postcode.py - functions for handling Dutch postal codes # # Copyright (C) 2013 Arthur de Jong # # 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 """Postcode (Dutch postal code). The Dutch postal code consists of four numbers followed by two letters. >>> validate('2601 DC') '2601 DC' >>> validate('NL-2611ET') '2611 ET' >>> validate('26112 ET') Traceback (most recent call last): ... InvalidFormat: ... >>> validate('2611 SS') # a few letter combinations are banned Traceback (most recent call last): ... InvalidComponent: ... """ import re from stdnum.exceptions import * from stdnum.util import clean _postcode_re = re.compile(r'^(?P[1-9][0-9]{3})(?P[A-Z]{2})$') _postcode_blacklist = ('SA', 'SD', 'SS') def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('NL'): number = number[2:] return number def validate(number): """Checks to see if the number provided is in the correct format. This currently does not check whether the code corresponds to a real address.""" number = compact(number) match = _postcode_re.search(number) if not match: raise InvalidFormat() if match.group('pt2') in _postcode_blacklist: raise InvalidComponent() return '%s %s' % (match.group('pt1'), match.group('pt2')) def is_valid(number): """Checks to see if the number provided is a valid postal code.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/nl/onderwijsnummer.py0000644000000000000000000000451312237446523021703 0ustar rootroot00000000000000# onderwijsnummer.py - functions for handling onderwijsnummers # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """Onderwijsnummer (Dutch student school number). The onderwijsnummers (education number) is very similar to the BSN (Dutch national identification number) for students without a BSN. It uses a checksum mechanism similar to the BSN. >>> validate('1012.22.331') '101222331' >>> validate('100252333') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('1012.22.3333') Traceback (most recent call last): ... InvalidLength: ... >>> validate('2112.22.337') # number must start with 10 Traceback (most recent call last): ... InvalidFormat: ... """ from stdnum.exceptions import * from stdnum.nl.bsn import compact, checksum __all__ = ['compact', 'validate', 'is_valid'] def validate(number): """Checks to see if the number provided is a valid onderwijsnummer. This checks the length and whether the check digit is correct and whether it starts with the right sequence.""" number = compact(number) if not number.isdigit() or int(number) <= 0: raise InvalidFormat() if not number.startswith('10'): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if checksum(number) != 5: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid onderwijsnummer. This checks the length and whether the check digit is correct and whether it starts with the right sequence.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/nl/__init__.py0000644000000000000000000000171112237755523020212 0ustar rootroot00000000000000# __init__.py - collection of Dutch numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """Collection of Dutch numbers.""" # provide aliases from stdnum.nl import btw as vat from stdnum.nl import postcode as postcal_code python-stdnum-1.2/stdnum/nl/brin.py0000644000000000000000000000513512237446563017412 0ustar rootroot00000000000000# brin.py - functions for handling Brin numbers # # Copyright (C) 2013 Arthur de Jong # # 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 """Brin number (Dutch number for schools). The Brin (Basis Registratie Instellingen) is a number to identify schools and related institutions. The number consists of four alphanumeric characters, sometimes extended with two digits to indicate the site (this complete code is called the vestigingsnummer). The register of these numbers can be downloaded from: http://www.duo.nl/organisatie/open_onderwijsdata/databestanden/default.asp >>> validate('05 KO') '05KO' >>> validate('07NU 00') '07NU00' >>> validate('12KB1') Traceback (most recent call last): ... InvalidLength: ... >>> validate('30AJ0A') # location code has letter Traceback (most recent call last): ... InvalidFormat: ... """ import re from stdnum.exceptions import * from stdnum.util import clean # this regular expression is based on what was found in the online # database: the first two digits are always numeric, followed by two # letters and an optional two letter location identifier _brin_re = re.compile(r'^(?P[0-9]{2}[A-Z]{2})(?P[0-9]{2})?$') def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -.').upper().strip() def validate(number): """Checks to see if the number provided is in the correct format. This currently does not check whether the number points to a registered school.""" number = compact(number) if len(number) not in (4, 6): raise InvalidLength() match = _brin_re.search(number) if not match: raise InvalidFormat() return number def is_valid(number): """Checks to see if the number provided is a valid Brin number.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/nl/btw.py0000644000000000000000000000443212356062456017250 0ustar rootroot00000000000000# btw.py - functions for handling Dutch VAT numbers # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """BTW-nummer (Omzetbelastingnummer, the Dutch VAT number). The BTW-nummer is the Dutch number for VAT. It consists of a RSIN or BSN followed by a B and two digits that identify the unit within the organisation (usually 01). >>> validate('004495445B01') '004495445B01' >>> validate('NL4495445B01') '004495445B01' >>> validate('123456789B90') Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.nl import bsn from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.').upper().strip() if number.startswith('NL'): number = number[2:] return bsn.compact(number[:-3]) + number[-3:] def validate(number): """Checks to see if the number provided is a valid BTW number. This checks the length, formatting and check digit.""" number = compact(number) if not number[10:].isdigit() or int(number[10:]) <= 0: raise InvalidFormat() if len(number) != 12: raise InvalidLength() if number[9] != 'B': raise InvalidFormat() bsn.validate(number[:9]) return number def is_valid(number): """Checks to see if the number provided is a valid BTW number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/exceptions.py0000644000000000000000000000420512514147202020207 0ustar rootroot00000000000000# exceptions.py - collection of stdnum exceptions # coding: utf-8 # # Copyright (C) 2013 Arthur de Jong # # 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 """Collection of exceptions. The validation functions of stdnum should raise one of the below exceptions when validation of the number fails. """ class ValidationError(Exception): """Top-level error for validating numbers. This exception should normally not be raised, only subclasses of this exception.""" def __str__(self): return getattr(self, 'message', '') class InvalidFormat(ValidationError): """Something is wrong with the format of the number. This generally means characters or delimiters that are not allowed are part of the number or required parts are missing.""" message = 'The number has an invalid format.' class InvalidChecksum(ValidationError): """The number's internal checksum or check digit does not match.""" message = "The number's checksum or check digit is invalid." class InvalidLength(InvalidFormat): """The length of the number is wrong.""" message = 'The number has an invalid length.' class InvalidComponent(ValidationError): """One of the parts of the number has an invalid reference. Some part of the number refers to some external entity like a country code, a date or a predefined collection of values. The number contains some invalid reference.""" message = 'One of the parts of the number are invalid or unknown.' python-stdnum-1.2/stdnum/de/0000755000000000000000000000000012606445507016056 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/de/wkn.py0000644000000000000000000000450712606425204017225 0ustar rootroot00000000000000# wkn.py - functions for handling Wertpapierkennnummer # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Wertpapierkennnummer (German securities identification code). The WKN, WPKN, WPK (Wertpapierkennnummer) is a German code to identify securities. It is a 6-digit alphanumeric number without a check digit that no longer has any structure. It is expected to be replaced by the ISIN. >>> validate('A0MNRK') 'A0MNRK' >>> validate('AOMNRK') # no capital o allowed Traceback (most recent call last): ... InvalidFormat: ... >>> to_isin('SKWM02') 'DE000SKWM021' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip().upper() # O and I are not valid but are accounted for in the check digit calculation _alphabet = '0123456789ABCDEFGH JKLMN PQRSTUVWXYZ' def validate(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" number = compact(number) if not all(x in _alphabet for x in number): raise InvalidFormat() if len(number) != 6: raise InvalidLength() return number def is_valid(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" try: return bool(validate(number)) except ValidationError: return False def to_isin(number): """Convert the number to an ISIN.""" from stdnum import isin return isin.from_natid('DE', number) python-stdnum-1.2/stdnum/de/__init__.py0000644000000000000000000000154212606424755020173 0ustar rootroot00000000000000# __init__.py - collection of German numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of German numbers.""" python-stdnum-1.2/stdnum/de/vat.py0000644000000000000000000000417012154624370017217 0ustar rootroot00000000000000# vat.py - functions for handling German VAT numbers # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number). The number is 10 digits long and uses the ISO 7064 Mod 11, 10 check digit algorithm. >>> compact('DE 136,695 976') '136695976' >>> validate('DE136695976') '136695976' >>> validate('136695978') Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.iso7064 import mod_11_10 from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -./,').upper().strip() if number.startswith('DE'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit() or number[0] == '0': raise InvalidFormat() if len(number) != 9: raise InvalidLength() mod_11_10.validate(number) return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/se/0000755000000000000000000000000012606445507016075 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/se/__init__.py0000644000000000000000000000154411720140730020174 0ustar rootroot00000000000000# __init__.py - collection of Swedish numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Swedish numbers.""" python-stdnum-1.2/stdnum/se/vat.py0000644000000000000000000000423712606424551017243 0ustar rootroot00000000000000# vat.py - functions for handling Swedish VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """VAT (Moms, Mervärdesskatt, Swedish VAT number). The Momsregistreringsnummer is used for VAT (Moms, Mervärdesskatt) purposes and consists of 12 digits of which the last two should be 01. The first 10 digits should have a valid Luhn checksum. >>> validate('SE 123456789701') '123456789701' >>> validate('123456789101') # invalid check digits Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.se import orgnr from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.').upper().strip() if number.startswith('SE'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit() or number[-2:] != '01': raise InvalidFormat() orgnr.validate(number[:-2]) return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/se/orgnr.py0000644000000000000000000000454512606424551017602 0ustar rootroot00000000000000# orgnr.py - functions for handling Swedish organisation numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # Copyright (C) 2014 Tomas Thor Jonsson # # 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 """Orgnr (Organisationsnummer, Swedish company number). The Orgnr (Organisationsnummer) is the national number to identify Swedish companies and consists of 10 digits. These are the first 10 digits in the Swedish VAT number, i.e. it's the VAT number without the 'SE' in front and the '01' at the end. >>> validate('1234567897') '1234567897' >>> validate('1234567891') # invalid check digits Traceback (most recent call last): ... InvalidChecksum: ... >>> format('123456-7897') '123456-7897' """ from stdnum import luhn from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -.').strip() def validate(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 10: raise InvalidLength() return luhn.validate(number) def is_valid(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the number to the standard format.""" number = compact(number) return number[:6] + '-' + number[6:] python-stdnum-1.2/stdnum/isbn.dat0000644000000000000000000003506312606431707017117 0ustar rootroot00000000000000# generated from RangeMessage.xml, downloaded from # https://www.isbn-international.org/export_rangemessage.xml # file serial e055fb55-2661-4102-a6dc-6885d2dab806 # file date Thu, 3 Sep 2015 12:56:52 CEST 978 0-5,600-649,7-7,80-94,950-989,9900-9989,99900-99999 0 agency="English language" 00-19,200-699,7000-8499,85000-89999,900000-949999,9500000-9999999 1 agency="English language" 00-09,100-399,4000-5499,55000-86979,869800-998999,9990000-9999999 2 agency="French language" 00-19,200-349,35000-39999,400-699,7000-8399,84000-89999,900000-949999 9500000-9999999 3 agency="German language" 00-02,030-033,0340-0369,03700-03999,04-19,200-699,7000-8499,85000-89999 900000-949999,9500000-9539999,95400-96999,9700000-9899999,99000-99499 99500-99999 4 agency="Japan" 00-19,200-699,7000-8499,85000-89999,900000-949999,9500000-9999999 5 agency="former U.S.S.R" 00000-00499,0050-0099,01-19,200-420,4210-4299,430-430,4310-4399,440-440 4410-4499,450-699,7000-8499,85000-89999,900000-909999,91000-91999 9200-9299,93000-94999,9500000-9500999,9501-9799,98000-98999 9900000-9909999,9910-9999 600 agency="Iran" 00-09,100-499,5000-8999,90000-99999 601 agency="Kazakhstan" 00-19,200-699,7000-7999,80000-84999,85-99 602 agency="Indonesia" 00-07,0800-0899,0900-1099,1100-1199,1200-1399,14000-14999,1500-1699 17000-17999,18000-18999,19000-19999,200-674,6750-6999,70000-74999 7500-7999,8000-9499,95000-99999 603 agency="Saudi Arabia" 00-04,05-49,500-799,8000-8999,90000-99999 604 agency="Vietnam" 0-4,50-89,900-979,9800-9999 605 agency="Turkey" 01-02,030-039,04-09,100-399,4000-5999,60000-89999,9000-9999 606 agency="Romania" 0-0,10-49,500-799,8000-9199,92000-99999 607 agency="Mexico" 00-39,400-749,7500-9499,95000-99999 608 agency="Macedonia" 0-0,10-19,200-449,4500-6499,65000-69999,7-9 609 agency="Lithuania" 00-39,400-799,8000-9499,95000-99999 611 agency="Thailand" 612 agency="Peru" 00-29,300-399,4000-4499,45000-49999,50-99 613 agency="Mauritius" 0-9 614 agency="Lebanon" 00-39,400-799,8000-9499,95000-99999 615 agency="Hungary" 00-09,100-499,5000-7999,80000-89999 616 agency="Thailand" 00-19,200-699,7000-8999,90000-99999 617 agency="Ukraine" 00-49,500-699,7000-8999,90000-99999 618 agency="Greece" 00-19,200-499,5000-7999,80000-99999 619 agency="Bulgaria" 00-14,150-699,7000-8999,90000-99999 620 agency="Mauritius" 0-9 621 agency="Philippines" 00-29,400-599,8000-8999,95000-99999 7 agency="China, People's Republic" 00-09,100-499,5000-7999,80000-89999,900000-999999 80 agency="former Czechoslovakia" 00-19,200-699,7000-8499,85000-89999,900000-999999 81 agency="India" 00-19,200-699,7000-8499,85000-89999,900000-999999 82 agency="Norway" 00-19,200-689,690000-699999,7000-8999,90000-98999,990000-999999 83 agency="Poland" 00-19,200-599,60000-69999,7000-8499,85000-89999,900000-999999 84 agency="Spain" 00-13,140-149,15000-19999,200-699,7000-8499,85000-89999,9000-9199 920000-923999,92400-92999,930000-949999,95000-96999,9700-9999 85 agency="Brazil" 00-19,200-549,5500-5999,60000-69999,7000-8499,85000-89999,900000-959999 96-97,98000-99999 86 agency="former Yugoslavia" 00-29,300-599,6000-7999,80000-89999,900000-999999 87 agency="Denmark" 00-29,400-649,7000-7999,85000-94999,970000-999999 88 agency="Italy" 00-19,200-599,6000-8499,85000-89999,900000-909999,910-929,9300-9399 940000-949999,95000-99999 89 agency="Korea, Republic" 00-24,250-549,5500-8499,85000-94999,950000-969999,97000-98999,990-999 90 agency="Netherlands" 00-19,200-499,5000-6999,70000-79999,800000-849999,8500-8999,90-90,94-94 91 agency="Sweden" 0-1,20-49,500-649,7000-7999,85000-94999,970000-999999 92 agency="International NGO Publishers and EU Organizations" 0-5,60-79,800-899,9000-9499,95000-98999,990000-999999 93 agency="India" 00-09,100-499,5000-7999,80000-94999,950000-999999 94 agency="Netherlands" 000-599,6000-8999,90000-99999 950 agency="Argentina" 00-49,500-899,9000-9899,99000-99999 951 agency="Finland" 0-1,20-54,550-889,8900-9499,95000-99999 952 agency="Finland" 00-19,200-499,5000-5999,60-65,6600-6699,67000-69999,7000-7999,80-94 9500-9899,99000-99999 953 agency="Croatia" 0-0,10-14,150-509,51-54,55000-59999,6000-9499,95000-99999 954 agency="Bulgaria" 00-28,2900-2999,300-799,8000-8999,90000-92999,9300-9999 955 agency="Sri Lanka" 0000-1999,20-40,41000-43999,44000-44999,4500-4999,50000-54999,550-749 7500-7999,8000-9499,95000-99999 956 agency="Chile" 00-19,200-699,7000-9999 957 agency="Taiwan" 00-02,0300-0499,05-19,2000-2099,21-27,28000-30999,31-43,440-819 8200-9699,97000-99999 958 agency="Colombia" 00-56,57000-59999,600-799,8000-9499,95000-99999 959 agency="Cuba" 00-19,200-699,7000-8499,85000-99999 960 agency="Greece" 00-19,200-659,6600-6899,690-699,7000-8499,85000-92999,93-93,9400-9799 98000-99999 961 agency="Slovenia" 00-19,200-599,6000-8999,90000-94999 962 agency="Hong Kong, China" 00-19,200-699,7000-8499,85000-86999,8700-8999,900-999 963 agency="Hungary" 00-19,200-699,7000-8499,85000-89999,9000-9999 964 agency="Iran" 00-14,150-249,2500-2999,300-549,5500-8999,90000-96999,970-989,9900-9999 965 agency="Israel" 00-19,200-599,7000-7999,90000-99999 966 agency="Ukraine" 00-12,130-139,14-14,1500-1699,170-199,2000-2789,279-289,2900-2999 300-699,7000-8999,90000-90999,910-949,95000-97999,980-999 967 agency="Malaysia" 00-00,0100-0999,10000-19999,300-499,5000-5999,60-89,900-989,9900-9989 99900-99999 968 agency="Mexico" 01-39,400-499,5000-7999,800-899,9000-9999 969 agency="Pakistan" 0-1,20-22,23000-23999,24-39,400-749,7500-9999 970 agency="Mexico" 01-59,600-899,9000-9099,91000-96999,9700-9999 971 agency="Philippines" 000-015,0160-0199,02-02,0300-0599,06-49,500-849,8500-9099,91000-95999 9600-9699,97-98,9900-9999 972 agency="Portugal" 0-1,20-54,550-799,8000-9499,95000-99999 973 agency="Romania" 0-0,100-169,1700-1999,20-54,550-759,7600-8499,85000-88999,8900-9499 95000-99999 974 agency="Thailand" 00-19,200-699,7000-8499,85000-89999,90000-94999,9500-9999 975 agency="Turkey" 00000-01999,02-24,250-599,6000-9199,92000-98999,990-999 976 agency="Caribbean Community" 0-3,40-59,600-799,8000-9499,95000-99999 977 agency="Egypt" 00-19,200-499,5000-6999,700-849,85000-89999,90-99 978 agency="Nigeria" 000-199,2000-2999,30000-79999,8000-8999,900-999 979 agency="Indonesia" 000-099,1000-1499,15000-19999,20-29,3000-3999,400-799,8000-9499 95000-99999 980 agency="Venezuela" 00-19,200-599,6000-9999 981 agency="Singapore" 00-16,17000-19999,200-299,3000-3099,310-399,4000-9999 982 agency="South Pacific" 00-09,100-699,70-89,9000-9799,98000-99999 983 agency="Malaysia" 00-01,020-199,2000-3999,40000-44999,45-49,50-79,800-899,9000-9899 99000-99999 984 agency="Bangladesh" 00-39,400-799,8000-8999,90000-99999 985 agency="Belarus" 00-39,400-599,6000-8999,90000-99999 986 agency="Taiwan" 00-11,120-559,5600-7999,80000-99999 987 agency="Argentina" 00-09,1000-1999,20000-29999,30-35,3600-3999,4000-4199,42-43,4400-4499 45000-48999,4900-4999,500-899,9000-9499,95000-99999 988 agency="Hong Kong, China" 00-11,12000-14999,15000-16999,17000-19999,200-769,77000-79999,8000-9699 97000-99999 989 agency="Portugal" 0-1,20-54,550-799,8000-9499,95000-99999 9924 agency="Cambodia" 30-39,500-649,9000-9999 9925 agency="Cyprus" 0-2,30-54,550-734,7350-9999 9926 agency="Bosnia and Herzegovina" 0-1,20-39,400-799,8000-9999 9927 agency="Qatar" 00-09,100-399,4000-4999 9928 agency="Albania" 00-09,100-399,4000-4999 9929 agency="Guatemala" 0-3,40-54,550-799,8000-9999 9930 agency="Costa Rica" 00-49,500-939,9400-9999 9931 agency="Algeria" 00-29,300-899,9000-9999 9932 agency="Lao People's Democratic Republic" 00-39,400-849,8500-9999 9933 agency="Syria" 0-0,10-39,400-899,9000-9999 9934 agency="Latvia" 0-0,10-49,500-799,8000-9999 9935 agency="Iceland" 0-0,10-39,400-899,9000-9999 9936 agency="Afghanistan" 0-1,20-39,400-799,8000-9999 9937 agency="Nepal" 0-2,30-49,500-799,8000-9999 9938 agency="Tunisia" 00-79,800-949,9500-9999 9939 agency="Armenia" 0-4,50-79,800-899,9000-9999 9940 agency="Montenegro" 0-1,20-49,500-899,9000-9999 9941 agency="Georgia" 0-0,10-39,400-899,9000-9999 9942 agency="Ecuador" 00-84,8500-8999,900-984,9850-9999 9943 agency="Uzbekistan" 00-29,300-399,4000-9749,975-999 9944 agency="Turkey" 0000-0999,100-499,5000-5999,60-69,700-799,80-89,900-999 9945 agency="Dominican Republic" 00-00,010-079,08-39,400-569,57-57,580-849,8500-9999 9946 agency="Korea, P.D.R." 0-1,20-39,400-899,9000-9999 9947 agency="Algeria" 0-1,20-79,800-999 9948 agency="United Arab Emirates" 00-39,400-849,8500-9999 9949 agency="Estonia" 0-0,10-39,400-749,75-89,9000-9999 9950 agency="Palestine" 00-29,300-849,8500-9999 9951 agency="Kosova" 00-39,400-849,8500-9999 9952 agency="Azerbaijan" 0-1,20-39,400-799,8000-9999 9953 agency="Lebanon" 0-0,10-39,400-599,60-89,9000-9999 9954 agency="Morocco" 0-1,20-39,400-799,8000-9999 9955 agency="Lithuania" 00-39,400-929,9300-9999 9956 agency="Cameroon" 0-0,10-39,400-899,9000-9999 9957 agency="Jordan" 00-39,400-649,65-69,70-84,8500-8799,88-99 9958 agency="Bosnia and Herzegovina" 00-01,020-029,0300-0399,040-089,0900-0999,10-18,1900-1999,20-49,500-899 9000-9999 9959 agency="Libya" 0-1,20-79,800-949,9500-9699,970-979,98-99 9960 agency="Saudi Arabia" 00-59,600-899,9000-9999 9961 agency="Algeria" 0-2,30-69,700-949,9500-9999 9962 agency="Panama" 00-54,5500-5599,56-59,600-849,8500-9999 9963 agency="Cyprus" 0-1,2000-2499,250-279,2800-2999,30-54,550-734,7350-7499,7500-9999 9964 agency="Ghana" 0-6,70-94,950-999 9965 agency="Kazakhstan" 00-39,400-899,9000-9999 9966 agency="Kenya" 000-149,1500-1999,20-69,7000-7499,750-959,9600-9999 9967 agency="Kyrgyz Republic" 00-39,400-899,9000-9999 9968 agency="Costa Rica" 00-49,500-939,9400-9999 9970 agency="Uganda" 00-39,400-899,9000-9999 9971 agency="Singapore" 0-5,60-89,900-989,9900-9999 9972 agency="Peru" 00-09,1-1,200-249,2500-2999,30-59,600-899,9000-9999 9973 agency="Tunisia" 00-05,060-089,0900-0999,10-69,700-969,9700-9999 9974 agency="Uruguay" 0-2,30-54,550-749,7500-9099,91-94,95-99 9975 agency="Moldova" 0-0,100-299,3000-3999,4000-4499,45-89,900-949,9500-9999 9976 agency="Tanzania" 0-5,60-89,900-989,9900-9999 9977 agency="Costa Rica" 00-89,900-989,9900-9999 9978 agency="Ecuador" 00-29,300-399,40-94,950-989,9900-9999 9979 agency="Iceland" 0-4,50-64,650-659,66-75,760-899,9000-9999 9980 agency="Papua New Guinea" 0-3,40-89,900-989,9900-9999 9981 agency="Morocco" 00-09,100-159,1600-1999,20-79,800-949,9500-9999 9982 agency="Zambia" 00-79,800-989,9900-9999 9983 agency="Gambia" 80-94,950-989,9900-9999 9984 agency="Latvia" 00-49,500-899,9000-9999 9985 agency="Estonia" 0-4,50-79,800-899,9000-9999 9986 agency="Lithuania" 00-39,400-899,9000-9399,940-969,97-99 9987 agency="Tanzania" 00-39,400-879,8800-9999 9988 agency="Ghana" 0-2,30-54,550-749,7500-9999 9989 agency="Macedonia" 0-0,100-199,2000-2999,30-59,600-949,9500-9999 99901 agency="Bahrain" 00-49,500-799,80-99 99902 agency="Reserved Agency" 99903 agency="Mauritius" 0-1,20-89,900-999 99904 agency="Curaçao" 0-5,60-89,900-999 99905 agency="Bolivia" 0-3,40-79,800-999 99906 agency="Kuwait" 0-2,30-59,600-699,70-89,90-94,950-999 99908 agency="Malawi" 0-0,10-89,900-999 99909 agency="Malta" 0-3,40-94,950-999 99910 agency="Sierra Leone" 0-2,30-89,900-999 99911 agency="Lesotho" 00-59,600-999 99912 agency="Botswana" 0-3,400-599,60-89,900-999 99913 agency="Andorra" 0-2,30-35,600-604 99914 agency="Suriname" 0-4,50-89,900-999 99915 agency="Maldives" 0-4,50-79,800-999 99916 agency="Namibia" 0-2,30-69,700-999 99917 agency="Brunei Darussalam" 0-2,30-89,900-999 99918 agency="Faroe Islands" 0-3,40-79,800-999 99919 agency="Benin" 0-2,300-399,40-69,70-79,800-849,850-899,900-999 99920 agency="Andorra" 0-4,50-89,900-999 99921 agency="Qatar" 0-1,20-69,700-799,8-8,90-99 99922 agency="Guatemala" 0-3,40-69,700-999 99923 agency="El Salvador" 0-1,20-79,800-999 99924 agency="Nicaragua" 0-1,20-79,800-999 99925 agency="Paraguay" 0-3,40-79,800-999 99926 agency="Honduras" 0-0,10-59,600-869,87-89,90-99 99927 agency="Albania" 0-2,30-59,600-999 99928 agency="Georgia" 0-0,10-79,800-999 99929 agency="Mongolia" 0-4,50-79,800-999 99930 agency="Armenia" 0-4,50-79,800-999 99931 agency="Seychelles" 0-4,50-79,800-999 99932 agency="Malta" 0-0,10-59,600-699,7-7,80-99 99933 agency="Nepal" 0-2,30-59,600-999 99934 agency="Dominican Republic" 0-1,20-79,800-999 99935 agency="Haiti" 0-2,30-59,600-699,7-8,90-99 99936 agency="Bhutan" 0-0,10-59,600-999 99937 agency="Macau" 0-1,20-59,600-999 99938 agency="Srpska, Republic of" 0-1,20-59,600-899,90-99 99939 agency="Guatemala" 0-5,60-89,900-999 99940 agency="Georgia" 0-0,10-69,700-999 99941 agency="Armenia" 0-2,30-79,800-999 99942 agency="Sudan" 0-4,50-79,800-999 99943 agency="Albania" 0-2,30-59,600-999 99944 agency="Ethiopia" 0-4,50-79,800-999 99945 agency="Namibia" 0-5,60-89,900-999 99946 agency="Nepal" 0-2,30-59,600-999 99947 agency="Tajikistan" 0-2,30-69,700-999 99948 agency="Eritrea" 0-4,50-79,800-999 99949 agency="Mauritius" 0-1,20-89,900-999 99950 agency="Cambodia" 0-4,50-79,800-999 99951 agency="Reserved Agency" 99952 agency="Mali" 0-4,50-79,800-999 99953 agency="Paraguay" 0-2,30-79,800-939,94-99 99954 agency="Bolivia" 0-2,30-69,700-879,88-99 99955 agency="Srpska, Republic of" 0-1,20-59,600-799,80-99 99956 agency="Albania" 00-59,600-859,86-99 99957 agency="Malta" 0-1,20-79,800-999 99958 agency="Bahrain" 0-4,50-93,940-949,950-999 99959 agency="Luxembourg" 0-2,30-59,600-999 99960 agency="Malawi" 0-0,10-94,950-999 99961 agency="El Salvador" 0-3,40-89,900-999 99962 agency="Mongolia" 0-4,50-79,800-999 99963 agency="Cambodia" 00-49,500-919,92-99 99964 agency="Nicaragua" 0-1,20-79,800-999 99965 agency="Macau" 0-3,40-62,630-999 99966 agency="Kuwait" 0-2,30-69,700-799,80-94 99967 agency="Paraguay" 0-1,20-59,600-899 99968 agency="Botswana" 0-3,400-599,60-89,900-999 99969 agency="Oman" 0-4,50-79,800-999 99970 agency="Haiti" 0-4,50-89,900-999 99971 agency="Myanmar" 0-5,60-84,850-999 99972 agency="Faroe Islands" 0-4,50-89,900-999 99973 agency="Mongolia" 0-3,40-79,800-999 99974 agency="Bolivia" 40-79,800-999 99975 agency="Tajikistan" 0-3,40-79,800-999 99976 agency="Srpska, Republic of" 0-1,20-59,600-799 99977 agency="Rwanda" 0-1,40-69,700-799 979 10-12 10 agency="France" 00-19,200-699,7000-8999,90000-97599,976000-999999 11 agency="Korea, Republic" 00-24,250-549,5500-8499,85000-94999,950000-999999 12 agency="Italy" 200-200 python-stdnum-1.2/stdnum/verhoeff.py0000644000000000000000000000613112517406434017642 0ustar rootroot00000000000000# verhoeff.py - functions for performing the Verhoeff checksum # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """The Verhoeff algorithm. The Verhoeff algorithm uses two tables for permutations and multiplications to calculate a checksum. >>> validate('1234') Traceback (most recent call last): ... InvalidChecksum: ... >>> checksum('1234') 1 >>> calc_check_digit('1234') '0' >>> validate('12340') '12340' """ from stdnum.exceptions import * # These are the multiplication and permutation tables used in the # Verhoeff algorithm. _multiplication_table = ( [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) _permutation_table = ( (0, 1, 2, 3, 4, 5, 6, 7, 8, 9), (1, 5, 7, 6, 2, 8, 3, 0, 9, 4), (5, 8, 0, 3, 7, 9, 6, 1, 4, 2), (8, 9, 1, 6, 0, 4, 3, 5, 2, 7), (9, 4, 5, 3, 1, 2, 6, 8, 7, 0), (4, 2, 8, 6, 5, 7, 3, 9, 0, 1), (2, 7, 9, 3, 8, 0, 6, 4, 1, 5), (7, 0, 4, 6, 9, 1, 3, 2, 5, 8)) def checksum(number): """Calculate the Verhoeff checksum over the provided number. The checksum is returned as an int. Valid numbers should have a checksum of 0.""" # transform number list number = tuple(int(n) for n in reversed(str(number))) # calculate checksum check = 0 for i, n in enumerate(number): check = _multiplication_table[check][_permutation_table[i % 8][n]] return check def validate(number): """Checks to see if the number provided passes the Verhoeff checksum.""" if not bool(number): raise InvalidFormat() try: valid = checksum(number) == 0 except Exception: raise InvalidFormat() if not valid: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided passes the Verhoeff checksum.""" try: return bool(validate(number)) except ValidationError: return False def calc_check_digit(number): """With the provided number, calculate the extra digit that should be appended to make it pass the Verhoeff checksum.""" return str(_multiplication_table[checksum(str(number) + '0')].index(0)) python-stdnum-1.2/stdnum/cy/0000755000000000000000000000000012606445507016101 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/cy/__init__.py0000644000000000000000000000154411720140730020200 0ustar rootroot00000000000000# __init__.py - collection of Cypriot numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Cypriot numbers.""" python-stdnum-1.2/stdnum/cy/vat.py0000644000000000000000000000527212154624370017246 0ustar rootroot00000000000000# vat.py - functions for handling Cypriot VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number). The Cypriot Αριθμός Εγγραφής Φ.Π.Α. (VAT) number consists of 9 digits where the last one is a is a letter and functions as a check digit. >>> compact('CY-10259033P') '10259033P' >>> validate('CY-10259033P ') '10259033P' >>> validate('CY-10259033Z') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('CY'): number = number[2:] return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" translation = { '0': 1, '1': 0, '2': 5, '3': 7, '4': 9, '5': 13, '6': 15, '7': 17, '8': 19, '9': 21, } return 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'[( sum(translation[x] for x in number[::2]) + sum(int(x) for x in number[1::2]) ) % 26] def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number[:-1].isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if number[0:2] == '12': raise InvalidComponent() if number[-1] != calc_check_digit(number[:-1]): raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/sm/0000755000000000000000000000000012606445507016105 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/sm/__init__.py0000644000000000000000000000164612601744732020222 0ustar rootroot00000000000000# __init__.py - collection of San Marino numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Collection of San Marino numbers.""" # provide vat as an alias from stdnum.sm import coe as vat python-stdnum-1.2/stdnum/sm/coe.py0000644000000000000000000000503212601744732017222 0ustar rootroot00000000000000# coe.py - functions for handling San Marino tax numbers # coding: utf-8 # # Copyright (C) 2008-2011 Cédric Krier # Copyright (C) 2008-2011 B2CK # Copyright (C) 2015 Arthur de Jong # # 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 """COE (Codice operatore economico, San Marino national tax number). The COE is a tax identification number of up to 5-digits used in San Marino. Leading zeroes are commonly dropped. >>> validate('51') '51' >>> validate('024165') '24165' >>> validate('2416A') Traceback (most recent call last): ... InvalidFormat: ... >>> validate('1124165') Traceback (most recent call last): ... InvalidLength: ... """ from stdnum.exceptions import * from stdnum.util import clean # a collection of all registered numbers with 2 or less digits _lownumbers = set(( 2, 4, 6, 7, 8, 9, 10, 11, 13, 16, 18, 19, 20, 21, 25, 26, 30, 32, 33, 35, 36, 37, 38, 39, 40, 42, 45, 47, 49, 51, 52, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 79, 80, 81, 84, 85, 87, 88, 91, 92, 94, 95, 96, 97, 99)) def compact(number): """Convert the number to the minimal representation. This strips surrounding whitespace and separation dash.""" return clean(number, '.').strip().lstrip('0') def validate(number): """Checks to see if the number provided is a valid number. This checks the length and formatting.""" number = compact(number) if len(number) > 5 or len(number) == 0: raise InvalidLength() if not number.isdigit(): raise InvalidFormat() if len(number) < 3 and int(number) not in _lownumbers: raise InvalidComponent() return number def is_valid(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/hu/0000755000000000000000000000000012606445507016102 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/hu/__init__.py0000644000000000000000000000164511720140726020210 0ustar rootroot00000000000000# __init__.py - collection of Hungarian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Hungarian numbers.""" # provide vat as an alias from stdnum.hu import anum as vat python-stdnum-1.2/stdnum/hu/anum.py0000644000000000000000000000452712606424566017426 0ustar rootroot00000000000000# anum.py - functions for handling Hungarian VAT numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """ANUM (Közösségi adószám, Hungarian VAT number). The ANUM is the Hungarian VAT (Közösségi adószám) number. It is an 8-digit taxpayer registration number that includes a weighted checksum. >>> validate('HU-12892312') '12892312' >>> validate('HU-12892313') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('HU'): number = number[2:] return number def checksum(number): """Calculate the checksum. Valid numbers should have a checksum of 0.""" weights = (9, 7, 3, 1, 9, 7, 3, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 10 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 8: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ie/0000755000000000000000000000000012606445507016063 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/ie/pps.py0000644000000000000000000000616612606432040017234 0ustar rootroot00000000000000# pps.py - functions for handling Irish PPS numbers # # Copyright (C) 2012, 2013 Arthur de Jong # Copyright (C) 2014 Olivier Dony # # 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 """PPS No (Personal Public Service Number, Irish personal number). The Personal Public Service number consists of 7 digits, and one or two letters. The first letter is a check character. When present (which should be the case for new numbers as of 2013), the second letter can be 'A' (for individuals) or 'H' (for non-individuals, such as limited companies, trusts, partnerships and unincorporated bodies). Pre-2013 values may have 'W', 'T', or 'X' as the second letter ; it is ignored by the check. >>> validate('6433435F') # pre-2013 '6433435F' >>> validate('6433435FT') # pre-2013 with special final 'T' '6433435FT' >>> validate('6433435FW') # pre-2013 format for married women '6433435FW' >>> validate('6433435E') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('6433435OA') # 2013 format (personal) '6433435OA' >>> validate('6433435IH') # 2013 format (non-personal) '6433435IH' >>> validate('6433435VH') # 2013 format (incorrect check) Traceback (most recent call last): ... InvalidChecksum: ... """ import re from stdnum.exceptions import * from stdnum.ie import vat from stdnum.util import clean pps_re = re.compile(r'^\d{7}[A-W][AHWTX]?$') """Regular expression used to check syntax of PPS numbers.""" def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').upper().strip() def validate(number): """Checks to see if the number provided is a valid PPS number. This checks the length, formatting and check digit.""" number = compact(number) if not pps_re.match(number): raise InvalidFormat() if len(number) == 9 and number[8] in 'AH': # new 2013 format if number[7] != vat.calc_check_digit(number[:7] + number[8:]): raise InvalidChecksum() else: # old format, last letter ignored if number[7] != vat.calc_check_digit(number[:7]): raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid PPS number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ie/__init__.py0000644000000000000000000000154011720140727020164 0ustar rootroot00000000000000# __init__.py - collection of Irish numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Irish numbers.""" python-stdnum-1.2/stdnum/ie/vat.py0000644000000000000000000000576712356062477017251 0ustar rootroot00000000000000# vat.py - functions for handling Irish VAT numbers # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """VAT (Irish VAT number). The Irish VAT number consists of 8 digits. The last digit is a check letter, the second digit may be a number, a letter, "+" or "*". >>> validate('IE 6433435F') # pre-2013 format '6433435F' >>> validate('IE 6433435OA') # 2013 format '6433435OA' >>> validate('6433435E') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('8D79739I') # old style number '8D79739I' >>> validate('8?79739J') # incorrect old style Traceback (most recent call last): ... InvalidFormat: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('IE'): number = number[2:] return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" alphabet = 'WABCDEFGHIJKLMNOPQRSTUV' number = compact(number).zfill(7) return alphabet[( sum((8 - i) * int(n) for i, n in enumerate(number[:7])) + 9 * alphabet.index(number[7:])) % 23] def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number[:1].isdigit() or not number[2:7].isdigit(): raise InvalidFormat() if len(number) not in (8, 9): raise InvalidLength() if number[:7].isdigit(): # new system if number[7] != calc_check_digit(number[:7] + number[8:]): raise InvalidChecksum() elif number[1] in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ+*': # old system if number[7] != calc_check_digit(number[2:7] + number[0]): raise InvalidChecksum() else: raise InvalidFormat() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/lv/0000755000000000000000000000000012606445507016107 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/lv/__init__.py0000644000000000000000000000164011720140726020210 0ustar rootroot00000000000000# __init__.py - collection of Latvian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Latvian numbers.""" # provide vat as an alias from stdnum.lv import pvn as vat python-stdnum-1.2/stdnum/lv/pvn.py0000644000000000000000000000755112606424566017276 0ustar rootroot00000000000000# pvn.py - functions for handling Latvian PVN (VAT) numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """PVN (Pievienotās vērtības nodokļa, Latvian VAT number). The PVN is a 11-digit number that can either be a reference to a legal entity (in which case the first digit > 3) or a natural person (in which case it should be the same as the personal code (personas kods)). Personal codes start with 6 digits to denote the birth date in the form ddmmyy. >>> validate('LV 4000 3521 600') '40003521600' >>> validate('40003521601') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('161175-19997') # personal code '16117519997' >>> validate('161375-19997') # invalid date Traceback (most recent call last): ... InvalidComponent: ... """ import datetime from stdnum.exceptions import * from stdnum.util import clean # validation functions are available on-line but it is not allowed # to perform automated queries: # http://www6.vid.gov.lv/VID_PDB?aspxerrorpath=/vid_pdb/pvn.asp def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('LV'): number = number[2:] return number def checksum(number): """Calculate the checksum for legal entities.""" weights = (9, 1, 4, 8, 3, 10, 2, 5, 7, 6, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 11 def calc_check_digit_pers(number): """Calculate the check digit for personal codes. The number passed should not have the check digit included.""" # note that this algorithm has not been confirmed by an independent source weights = (10, 5, 8, 4, 2, 1, 6, 3, 7, 9) check = 1 + sum(weights[i] * int(n) for i, n in enumerate(number)) return str(check % 11 % 10) def get_birth_date(number): """Split the date parts from the number and return the birth date.""" day = int(number[0:2]) month = int(number[2:4]) year = int(number[4:6]) year += 1800 + int(number[6]) * 100 try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 11: raise InvalidLength() if number[0] > '3': # legal entity if checksum(number) != 3: raise InvalidChecksum() else: # natural resident, check if birth date is valid birth_date = get_birth_date(number) # TODO: check that the birth date is not in the future if calc_check_digit_pers(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/be/0000755000000000000000000000000012606445507016054 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/be/__init__.py0000644000000000000000000000154411720140724020156 0ustar rootroot00000000000000# __init__.py - collection of Belgian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Belgian numbers.""" python-stdnum-1.2/stdnum/be/vat.py0000644000000000000000000000443412154624370017220 0ustar rootroot00000000000000# vat.py - functions for handling Belgian VAT numbers # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """BTW, TVA, NWSt (Belgian VAT number). >>> compact('BE403019261') '0403019261' >>> compact('(0)403019261') '0403019261' >>> validate('BE 428759497') '0428759497' >>> validate('BE431150351') Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -./').upper().strip() if number.startswith('BE'): number = number[2:] if number.startswith('(0)'): number = '0' + number[3:] if len(number) == 9: number = '0' + number # old format had 9 digits return number def checksum(number): """Calculate the checksum.""" return (int(number[:-2]) + int(number[-2:])) % 97 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 10: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/mx/0000755000000000000000000000000012606445507016112 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/mx/__init__.py0000644000000000000000000000164012606424566020226 0ustar rootroot00000000000000# __init__.py - collection of Mexican numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Collection of Mexican numbers.""" # provide vat as an alias from stdnum.mx import rfc as vat python-stdnum-1.2/stdnum/mx/rfc.py0000644000000000000000000001223212606424566017240 0ustar rootroot00000000000000# rfc.py - functions for handling Mexican tax numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """RFC (Registro Federal de Contribuyentes, Mexican tax number). This number is used to identify individuals and companies for tax purposes. The company number is 12 digits where the first 3 letters or digits are derived from the name of the company, the following 6 contain the date of incorporation, followed by 3 check digits. Personal numbers consist of 13 digits where the first 4 characters from the person's name, followed by their birth date and 3 check digits. The first two check digits are calculated based on the person's or company's full name. The last check digit is calculated over all the preceding digits in the number. However, it seems a lot of numbers are in use with invalid check digits so this test is disabled by default. More information can be found at: http://www.sisi.org.mx/jspsi/documentos/2005/seguimiento/06101/0610100162005_065.doc https://es.wikipedia.org/wiki/Registro_Federal_de_Contribuyentes_(M%C3%A9xico) >>> validate('GODE 561231 GR8') # personal number 'GODE561231GR8' >>> validate('MAB-930714-8T4') # company number 'MAB9307148T4' >>> validate('COMG-600703') # personal number without serial 'COMG600703' >>> validate('VACE-460910-SX6') 'VACE460910SX6' >>> validate('VACE-460910-SX6', validate_check_digits=True) Traceback (most recent call last): ... InvalidChecksum: ... >>> format('GODE561231GR8') 'GODE 561231 GR8' """ import datetime import re from stdnum.exceptions import * from stdnum.util import clean # regular expression for matching numbers _rfc_re = re.compile(r'^[A-Z&Ñ]{3,4}[0-9]{6}[0-9A-Z]{0,5}$') # regular expression for matching the last 3 check digits _check_digits_re = re.compile(r'^[1-9A-V][1-9A-Z][0-9A]$') # these values should not appear as first part of a personal number _name_blacklist = set([ 'BUEI', 'BUEY', 'CACA', 'CACO', 'CAGA', 'CAGO', 'CAKA', 'CAKO', 'COGE', 'COJA', 'COJE', 'COJI', 'COJO', 'CULO', 'FETO', 'GUEY', 'JOTO', 'KACA', 'KACO', 'KAGA', 'KAGO', 'KAKA', 'KOGE', 'KOJO', 'KULO', 'MAME', 'MAMO', 'MEAR', 'MEAS', 'MEON', 'MION', 'MOCO', 'MULA', 'PEDA', 'PEDO', 'PENE', 'PUTA', 'PUTO', 'QULO', 'RATA', 'RUIN', ]) # characters used for checksum calculation, _alphabet = '0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ Ñ' def compact(number): """Convert the number to the minimal representation. This strips surrounding whitespace and separation dash.""" return clean(number, '-_ ').upper().strip() def _get_date(number): """Convert the part of the number that represents a date into a datetime. Note that the century may be incorrect.""" year = int(number[0:2]) month = int(number[2:4]) day = int(number[4:6]) try: return datetime.date(year + 2000, month, day) except ValueError: raise InvalidComponent() def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" number = (' ' + number)[-12:] check = sum(_alphabet.index(n) * (13 - i) for i, n in enumerate(number)) return _alphabet[(11 - check) % 11] def validate(number, validate_check_digits=False): """Checks to see if the number provided is a valid number.""" number = compact(number) if not _rfc_re.match(number): raise InvalidFormat() if len(number) in (10, 13): # number assigned to person if number[:4] in _name_blacklist: raise InvalidComponent() _get_date(number[4:10]) elif len(number) == 12: # number assigned to company _get_date(number[3:9]) else: raise InvalidLength() if validate_check_digits and len(number) >= 12: if not _check_digits_re.match(number[-3:]): raise InvalidComponent() if number[-1] != calc_check_digit(number[:-1]): raise InvalidChecksum() return number def is_valid(number, validate_check_digits=False): """Checks to see if the number provided is a valid number.""" try: return bool(validate(number, validate_check_digits)) except ValidationError: return False def format(number, separator=' '): """Reformat the passed number to the standard format.""" number = compact(number) if len(number) == 12: return separator.join(( number[:3], number[3:9], number[9:])).strip(separator) return separator.join(( number[:4], number[4:10], number[10:])).strip(separator) python-stdnum-1.2/stdnum/hr/0000755000000000000000000000000012606445507016077 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/hr/__init__.py0000644000000000000000000000164212601744731020207 0ustar rootroot00000000000000# __init__.py - collection of Croatian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Croatian numbers.""" # provide vat as an alias from stdnum.hr import oib as vat python-stdnum-1.2/stdnum/hr/oib.py0000644000000000000000000000436612154624370017226 0ustar rootroot00000000000000# cnp.py - functions for handling Croatian OIB numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """OIB (Osobni identifikacijski broj, Croatian identification number). The personal identification number is used to identify persons and legal entities in Croatia. It has 11 digits (sometimes prefixed by HR), contains no personal information and uses the ISO 7064 Mod 11, 10 checksum algorithm. >>> validate('HR 33392005961') '33392005961' >>> validate('33392005962') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.iso7064 import mod_11_10 from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('HR'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid OIB number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 11: raise InvalidLength() mod_11_10.validate(number) return number def is_valid(number): """Checks to see if the number provided is a valid OIB number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/isil.dat0000644000000000000000000000743412606431713017122 0ustar rootroot00000000000000# generated from ISIL Registration Authority, downloaded from # http://biblstandard.dk/isil/ US$ country="United States of America" ra_url="http://www.loc.gov/marc/organizations/" ra="Library of Congress" AR$ country="Argentine Republic" ra_url="http://www.iram.org.ar" ra="Argentine Standardization and Certification Institute (IRAM)" AT$ country="Austria" ra_url="http://www.obvsg.at" ra="Die Österreichische Bibliothekenverbund und Service GmbH" AU$ country="Australia" ra_url="http://www.nla.gov.au/ilrs" ra="National Library of Australia" BE$ country="Belgium" ra_url="http://www.kbr.be" ra="Royal Library of Belgium" BY$ country="Belarus" ra_url="http://www.nlb.by/portal/page/portal/index?lang=en" ra="National Library of Belarus" CA$ country="Canada" ra_url="http://www.collectionscanada.ca/ill/s16-206-e.html#3.2.2" ra="Library and Archives Canada" CH$ country="Switzerland" ra_url="http://www.nb.admin.ch/slb/slb_professionnel/01540/index.html?lang=en" ra="Swiss National Library" CY$ country="Cyprus" ra_url="http://library.cut.ac.cy/en/isil" ra="Cyprus University of Technology Library" DE$ country="Germany" ra_url="http://sigel.staatsbibliothek-berlin.de/" ra="Staatsbibliothek zu Berlin" DK$ country="Denmark" ra_url="http://www.kulturstyrelsen.dk/english/institutions/libraries/national-solutions/standards/danish-library-number/" ra="Danish Agency for Culture" EG$ country="Egypt" ra_url="http://www.sti.sci.eg/index.php?option=com_content&view=article&id=30:focal-point&catid=1:pages&Itemid=56" ra="Egyptian National Scientific and Technical Information Network (ENSTINET)" FI$ country="Finland" ra_url="http://www.nationallibrary.fi/libraries/standards/isil.html" ra="The National Library of Finland" FR$ country="France" ra_url="http://www.abes.fr" ra="Agence Bibliographique de l'Enseignement Superieur" GB$ country="United Kingdom" ra_url="http://www.bl.uk/bibliographic/isilagency.html" ra="British Library" GL$ country="Greenland" ra_url="http://www.katak.gl/ISIL/Greenlandic_library_identifiers.html" ra="Central and Public Library of Greenland" IL$ country="Israel" ra_url="http://nli.org.il/eng" ra="National Library of Israel" IR$ country="Islamic Republic of Iran" ra_url="http://www.nlai.ir/special_services/stds/isil.htm" ra="National Library and Archives of Islamic Republic of Iran of Iran" IT$ country="Italy" ra_url="http://www.iccu.sbn.it/genera.jsp?id=78&l=en" ra="Istituto Centrale per il Catalogo Unico delle biblioteche italiane e per le informazioni bibliografiche" JP$ country="Japan" ra_url="http://www.ndl.go.jp/en/library/isil/index.html" ra="National Diet Library" KR$ country="Republic of Korea" ra_url="http://www.nl.go.kr/isil/" ra="The National Library of Korea" LU$ country="Luxembourg" ra_url="http://www.anlux.lu" ra="Archives nationales de Luxembourg" NL$ country="The Netherlands" ra_url="http://www.kb.nl/expertise/voor-bibliotheken/interbibliotheciar-leenverkeer/internationale-standard-identifier-for-libraries-isil" ra="Koninklijke Bibliotheek, National Library of the Netherlands" NO$ country="Norway" ra_url="http://www.nb.no/" ra="National Library of Norway" NZ$ country="New Zealand" ra_url="http://natlib.govt.nz/" ra="National Library of New Zealand Te Puna Matauranga o Aotearoa" QA$ country="Qatar" ra_url="http://www.qnl.qa/" ra="Qatar National Library (QNL)" RU$ country="Russian Federation" ra_url="http://english.gpntb.ru/" ra="Russian National Public Library for Science and Technology" SI$ country="The Republic of Slovenia" ra_url="http://www.nuk.uni-lj.si/nukeng3.asp?id=311364382" ra="National and University Library" SK$ country="Slovak Republic" ra_url="http://www.snk.sk" ra="Slovak National Library" O$ ra="See OCLC" OCLC$ country="WorldCat Symbol" ra_url="http://www.oclc.org" ra="OCLC" ZDB$ country="Staatsbibliothek zu Berlin - Zeitschriftendatenbank" ra="Staatsbibliothek zu Berlin" python-stdnum-1.2/stdnum/meid.py0000644000000000000000000001505212606432040016745 0ustar rootroot00000000000000# meid.py - functions for handling Mobile Equipment Identifiers (MEIDs) # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """MEID (Mobile Equipment Identifier). The Mobile Equipment Identifier is used to identify a physical piece of CDMA mobile station equipment. >>> validate('AF 01 23 45 0A BC DE C') 'AF0123450ABCDE' >>> validate('29360 87365 0070 3710 0') 'AF0123450ABCDE' >>> validate('29360 87365 0070 3710 0', strip_check_digit=False) 'AF0123450ABCDEC' >>> validate('29360 87365 0070 3710 1') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('af0123450abcDEC', add_check_digit=True) 'AF 01 23 45 0A BC DE C' >>> format('af0123450abcDEC', format='dec', add_check_digit=True) '29360 87365 0070 3710 0' """ from stdnum.exceptions import * from stdnum.util import clean _hex_alphabet = '0123456789ABCDEF' def _cleanup(number): """Remove any grouping information from the number and removes surrounding whitespace.""" return clean(str(number), ' -').strip().upper() def _ishex(number): for x in number: if x not in _hex_alphabet: return False return True def _parse(number): number = _cleanup(number) if len(number) in (14, 15): # 14 or 15 digit hex representation if not _ishex(number): raise InvalidFormat() return number[0:14], number[14:] elif len(number) in (18, 19): # 18-digit decimal representation if not number.isdigit(): raise InvalidFormat() return number[0:18], number[18:] else: raise InvalidLength() def calc_check_digit(number): """Calculate the check digit for the number. The number should not already have a check digit.""" # both the 18-digit decimal format and the 14-digit hex format # containing only decimal digits should use the decimal Luhn check from stdnum import luhn if number.isdigit(): return luhn.calc_check_digit(number) else: return luhn.calc_check_digit(number, alphabet=_hex_alphabet) def compact(number, strip_check_digit=True): """Convert the MEID number to the minimal (hexadecimal) representation. This strips grouping information, removes surrounding whitespace and converts to hexadecimal if needed. If the check digit is to be preserved and conversion is done a new check digit is recalculated.""" # first parse the number number, cd = _parse(number) # strip check digit if needed if strip_check_digit: cd = '' # convert to hex if needed if len(number) == 18: number = '%08X%06X' % (int(number[0:10]), int(number[10:18])) if cd: cd = calc_check_digit(number) # put parts back together again return number + cd def validate(number, strip_check_digit=True): """Checks to see if the number provided is a valid MEID number. This converts the representation format of the number (if it is decimal it is not converted to hexadecimal).""" from stdnum import luhn # first parse the number number, cd = _parse(number) if len(number) == 18: # decimal format can be easily determined if cd: luhn.validate(number + cd) # convert to hex manufacturer_code = int(number[0:10]) serial_num = int(number[10:18]) if manufacturer_code.bit_length() > 32 or serial_num.bit_length() > 24: raise InvalidComponent() number = '%08X%06X' % (manufacturer_code, serial_num) cd = calc_check_digit(number) elif number.isdigit(): # if the remaining hex format is fully decimal it is an IMEI number from stdnum import imei imei.validate(number + cd) else: # normal hex Luhn validation if cd: luhn.validate(number + cd, alphabet=_hex_alphabet) if strip_check_digit: cd = '' return number + cd def is_valid(number): """Checks to see if the number provided is a valid MEID number.""" try: return bool(validate(number)) except ValidationError: return False def format(number, separator=' ', format=None, add_check_digit=False): """Reformat the passed number to the standard format. The separator used can be provided. If the format is specified (either 'hex' or 'dec') the number is reformatted in that format, otherwise the current representation is kept. If add_check_digit is True a check digit will be added if it is not present yet.""" # first parse the number number, cd = _parse(number) # format conversions if needed if format == 'dec' and len(number) == 14: # convert to decimal number = '%010d%08d' % (int(number[0:8], 16), int(number[8:14], 16)) if cd: cd = calc_check_digit(number) elif format == 'hex' and len(number) == 18: # convert to hex number = '%08X%06X' % (int(number[0:10]), int(number[10:18])) if cd: cd = calc_check_digit(number) # see if we need to add a check digit if add_check_digit and not cd: cd = calc_check_digit(number) # split number according to format if len(number) == 14: number = [number[i * 2:i * 2 + 2] for i in range(7)] + [cd] else: number = (number[:5], number[5:10], number[10:14], number[14:], cd) return separator.join(x for x in number if x) def to_binary(number): """Convert the number to its binary representation (without the check digit).""" from binascii import a2b_hex return a2b_hex(compact(number, strip_check_digit=True)) def to_pseudo_esn(number): """Convert the provided MEID to a pseudo ESN (pESN). The ESN is returned in compact hexadecimal representation.""" import hashlib # return the last 6 digits of the SHA1 hash prefixed with the reserved # manufacturer code return '80' + hashlib.sha1(to_binary(number)).hexdigest()[-6:].upper() python-stdnum-1.2/stdnum/iso9362.py0000644000000000000000000000501112601744732017150 0ustar rootroot00000000000000# iso9362.py - functions for handling ISO 9362 Business identifier codes # # Copyright (C) 2015 Lifealike Ltd # # 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 """ISO 9362 (Business identifier codes). An ISO 9362 identifier (also: BIC, BEI, or SWIFT code) uniquely identifies an institution. They are commonly used to route financial transactions. The code consists of a 4 letter institution code, a 2 letter country code, and a 2 character location code, optionally followed by a three character branch code. >>> validate('AGRIFRPP882') 'AGRIFRPP882' >>> validate('AGRIFRPP') 'AGRIFRPP' >>> validate('AGRIFRPP8') Traceback (most recent call last): ... InvalidLength: .. >>> validate('AGRIF2PP') # country code can't contain digits Traceback (most recent call last): ... InvalidFormat: .. >>> format('agriFRPP') # conventionally caps 'AGRIFRPP' """ import re from stdnum.exceptions import * from stdnum.util import clean _bic_re = re.compile(r'^[A-Z]{6}[0-9A-Z]{2}([0-9A-Z]{3})?$') def compact(number): """Convert the number to the minimal representation. This strips the number of any surrounding whitespace.""" return clean(number).strip().upper() def validate(number): """Checks to see if the number provided is a valid routing number. This checks the length and characters in each position.""" number = compact(number) if len(number) not in (8, 11): raise InvalidLength() match = _bic_re.search(number) if not match: raise InvalidFormat() return number def is_valid(number): """Checks to see if the number provided is a valid BIC. This checks the length and characters in each position.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" return compact(number) python-stdnum-1.2/stdnum/iban.py0000644000000000000000000000747112606432040016746 0ustar rootroot00000000000000# iban.py - functions for handling International Bank Account Numbers (IBANs) # # Copyright (C) 2011, 2012, 2013 Arthur de Jong # # 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 """IBAN (International Bank Account Number). The IBAN is used to identify bank accounts across national borders. The first two letters are a country code. The next two digits are check digits for the ISO 7064 Mod 97, 10 checksum. Each country uses its own format for the remainder of the number. Some countries may also use checksum algorithms within their number but this is currently not checked by this number. >>> validate('GR16 0110 1050 0000 1054 7023 795') 'GR1601101050000010547023795' >>> validate('BE31435411161155') 'BE31435411161155' >>> compact('GR16 0110 1050 0000 1054 7023 795') 'GR1601101050000010547023795' >>> format('GR1601101050000010547023795') 'GR16 0110 1050 0000 1054 7023 795' """ import re from stdnum import numdb from stdnum.exceptions import * from stdnum.iso7064 import mod_97_10 from stdnum.util import clean # our open copy of the IBAN database _ibandb = numdb.get('iban') # the valid characters we have _alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' # regular expression to check IBAN structure _struct_re = re.compile(r'([1-9][0-9]*)!([nac])') def compact(number): """Convert the iban number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').strip().upper() def _to_base10(number): """Prepare the number to its base10 representation (also moving the check digits to the end) so it can be checked with the ISO 7064 Mod 97, 10 algorithm.""" # TODO: find out whether this should be in the mod_97_10 module return ''.join(str(_alphabet.index(x)) for x in number[4:] + number[:4]) def _struct_to_re(structure): """Convert an IBAN structure to a refular expression that can be used to validate the number.""" def conv(match): chars = { 'n': '[0-9]', 'a': '[A-Z]', 'c': '[A-Za-z0-9]', }[match.group(2)] return '%s{%s}' % (chars, match.group(1)) return re.compile('^%s$' % _struct_re.sub(conv, structure)) def validate(number): """Checks to see if the number provided is a valid IBAN.""" number = compact(number) try: test_number = _to_base10(number) except Exception: raise InvalidFormat() # ensure that checksum is valid mod_97_10.validate(test_number) # look up the number info = _ibandb.info(number) # check if the bban part of number has the correct structure bban = number[4:] if not _struct_to_re(info[0][1].get('bban', '')).match(bban): raise InvalidFormat() # return the compact representation return number def is_valid(number): """Checks to see if the number provided is a valid IBAN.""" try: return bool(validate(number)) except ValidationError: return False def format(number, separator=' '): """Reformat the passed number to the space-separated format.""" number = compact(number) return separator.join(number[i:i + 4] for i in range(0, len(number), 4)) python-stdnum-1.2/stdnum/imei.py0000644000000000000000000000662112606432040016754 0ustar rootroot00000000000000# imei.py - functions for handling International Mobile Equipment Identity # (IMEI) numbers # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """IMEI (International Mobile Equipment Identity). The IMEI is used to identify mobile phones. The IMEI may optionally include a check digit which is validated using the Luhn algorithm. >>> validate('35686800-004141-20') '3568680000414120' >>> validate('35-417803-685978-1') Traceback (most recent call last): ... InvalidChecksum: ... >>> compact('35686800-004141-20') '3568680000414120' >>> format('354178036859789') '35-417803-685978-9' >>> format('35686800-004141', add_check_digit=True) '35-686800-004141-8' >>> imei_type('35686800-004141-20') 'IMEISV' >>> split('35686800-004141') ('35686800', '004141', '') """ from stdnum import luhn from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the IMEI number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').strip().upper() def validate(number): """Checks to see if the number provided is a valid IMEI (or IMEISV) number.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) == 15: # only 15 digit IMEI has check digit luhn.validate(number) elif len(number) not in (14, 16): # neither IMEI without check digit or IMEISV (which doesn't have one) raise InvalidLength() return number def imei_type(number): """Check the passed number and returns 'IMEI', 'IMEISV' or None (for invalid) for checking the type of number passed.""" try: number = validate(number) except ValidationError: return None if len(number) in (14, 15): return 'IMEI' else: # len(number) == 16: return 'IMEISV' def is_valid(number): """Checks to see if the number provided is a valid IMEI (or IMEISV) number.""" try: return bool(validate(number)) except ValidationError: return False def split(number): """Split the number into a Type Allocation Code (TAC), serial number and either the checksum (for IMEI) or the software version number (for IMEISV).""" number = compact(number) return (number[:8], number[8:14], number[14:]) def format(number, separator='-', add_check_digit=False): """Reformat the passed number to the standard format.""" number = compact(number) if len(number) == 14 and add_check_digit: number += luhn.calc_check_digit(number) number = (number[:2], number[2:8], number[8:14], number[14:]) return separator.join(x for x in number if x) python-stdnum-1.2/stdnum/my/0000755000000000000000000000000012606445507016113 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/my/bp.dat0000644000000000000000000001754712606431732017217 0ustar rootroot00000000000000# generated from National Registration Department of Malaysia, downloaded from # http://www.jpn.gov.my/informasi/kod-negeri/ # http://www.jpn.gov.my/en/informasi/kod-negara/ 01 state="Johor" country="Malaysia" countries="Malaysia" 02 state="Kedah" country="Malaysia" countries="Malaysia" 03 state="Kelantan" country="Malaysia" countries="Malaysia" 04 state="Melaka" country="Malaysia" countries="Malaysia" 05 state="Negeri Sembilan" country="Malaysia" countries="Malaysia" 06 state="Pahang" country="Malaysia" countries="Malaysia" 07 state="Pulau Pinang" country="Malaysia" countries="Malaysia" 08 state="Perak" country="Malaysia" countries="Malaysia" 09 state="Perlis" country="Malaysia" countries="Malaysia" 10 state="Selangor" country="Malaysia" countries="Malaysia" 11 state="Terengganu" country="Malaysia" countries="Malaysia" 12 state="Sabah" country="Malaysia" countries="Malaysia" 13 state="Sarawak" country="Malaysia" countries="Malaysia" 14 state="Wilayah Persekutuan (Kuala Lumpur)" country="Malaysia" countries="Malaysia" 15 state="Wilayah Persekutuan (Labuan)" country="Malaysia" countries="Malaysia" 16 state="Wilayah Persekutuan (Putrajaya)" country="Malaysia" countries="Malaysia" 21 state="Johor" country="Malaysia" countries="Malaysia" 22 state="Johor" country="Malaysia" countries="Malaysia" 23 state="Johor" country="Malaysia" countries="Malaysia" 24 state="Johor" country="Malaysia" countries="Malaysia" 25 state="Kedah" country="Malaysia" countries="Malaysia" 26 state="Kedah" country="Malaysia" countries="Malaysia" 27 state="Kedah" country="Malaysia" countries="Malaysia" 28 state="Kelantan" country="Malaysia" countries="Malaysia" 29 state="Kelantan" country="Malaysia" countries="Malaysia" 30 state="Melaka" country="Malaysia" countries="Malaysia" 31 state="Negeri Sembilan" country="Malaysia" countries="Malaysia" 32 state="Pahang" country="Malaysia" countries="Malaysia" 33 state="Pahang" country="Malaysia" countries="Malaysia" 34 state="Pulau Pinang" country="Malaysia" countries="Malaysia" 35 state="Pulau Pinang" country="Malaysia" countries="Malaysia" 36 state="Perak" country="Malaysia" countries="Malaysia" 37 state="Perak" country="Malaysia" countries="Malaysia" 38 state="Perak" country="Malaysia" countries="Malaysia" 39 state="Perak" country="Malaysia" countries="Malaysia" 40 state="Perlis" country="Malaysia" countries="Malaysia" 41 state="Selangor" country="Malaysia" countries="Malaysia" 42 state="Selangor" country="Malaysia" countries="Malaysia" 43 state="Selangor" country="Malaysia" countries="Malaysia" 44 state="Selangor" country="Malaysia" countries="Malaysia" 45 state="Terengganu" country="Malaysia" countries="Malaysia" 46 state="Terengganu" country="Malaysia" countries="Malaysia" 47 state="Sabah" country="Malaysia" countries="Malaysia" 48 state="Sabah" country="Malaysia" countries="Malaysia" 49 state="Sabah" country="Malaysia" countries="Malaysia" 50 state="Sarawak" country="Malaysia" countries="Malaysia" 51 state="Sarawak" country="Malaysia" countries="Malaysia" 52 state="Sarawak" country="Malaysia" countries="Malaysia" 53 state="Sarawak" country="Malaysia" countries="Malaysia" 54 state="Wilayah Persekutuan (Kuala Lumpur)" country="Malaysia" countries="Malaysia" 55 state="Wilayah Persekutuan (Kuala Lumpur)" country="Malaysia" countries="Malaysia" 56 state="Wilayah Persekutuan (Kuala Lumpur)" country="Malaysia" countries="Malaysia" 57 state="Wilayah Persekutuan (Kuala Lumpur)" country="Malaysia" countries="Malaysia" 58 state="Wilayah Persekutuan (Labuan)" country="Malaysia" countries="Malaysia" 59 state="Negeri Sembilan" country="Malaysia" countries="Malaysia" 60 country="BRUNEI" countries="BRUNEI" 61 country="INDONESIA" countries="INDONESIA" 62 countries="CAMBODIA, DEMOCRATIC KAMPUCHE, KAMPUCHEA" 63 country="LAOS" countries="LAOS" 64 countries="BURMA, MYANMAR" 65 country="PHILIPPINES" countries="PHILIPPINES" 66 country="SINGAPURA" countries="SINGAPURA" 67 country="THAILAND" countries="THAILAND" 68 country="VIETNAM" countries="VIETNAM" 71,72 country="LUAR NEGARA" countries="LUAR NEGARA" 74 country="CHINA" countries="CHINA" 75 country="INDIA" countries="INDIA" 76 country="PAKISTAN" countries="PAKISTAN" 77 countries="ARAB SAUDI, SAUDI ARABIA" 78 country="SRI LANKA" countries="SRI LANKA" 79 country="BANGLADESH" countries="BANGLADESH" 82 state="Negeri Tidak Diketahui" country="Malaysia" countries="Malaysia" 83 countries="AMERICAN SAMOA, ASIA PASIFIK, AUSTRALIA, CHRISTMAS ISLAND, COCOS(KEELING) ISLANDS, COOK ISLANDS, FIJI, FRENCH POLYNESIA, GUAM, HEARD AND MCDONALD ISLANDS, MARSHALL ISLANDS, MICRONESIA, NEW CALEDONIA, NEW ZEALAND, NIUE, NORFOLK ISLANDS, PAPUA NEW GUINEA, TIMOR LESTE, TOKELAU, UNITED STATES MINOR OUTLYING ISLANDS, WALLIS AND FUTUNA ISLANDS" 84 countries="AMERIKA SELATAN, ANGUILLA, ARGENTINA, ARUBA, BOLIVIA, BRAZIL, CHILE, COLOMBIA, ECUADOR, FRENCH GUIANA, GUADELOUPE, GUYANA, PARAGUAY, PERU, SOUTH GEORGIA & THE SOUTH SANDWICH ISLANDS, SURINAME, URUGUAY, VENEZUELA" 85 countries="AFRIKA, AFRIKA SELATAN, ALGERIA, ANGOLA, BOTSWANA, BURUNDI, CAMEROON, CENTRAL AFRICAN REPUBLIC, CHAD, CONGO-BRAZZAVILLE, CONGO-KINSHASA, DJIBOUTI, EGYPT, ERITREA, ETHIOPIA, GABON, GAMBIA, GHANA, GUINEA, KENYA, LIBERIA, MALAWI, MALI, MAURITANIA, MAYOTTE, MOROCCO, MOZAMBIQUE, NAMIBIA, NIGER, NIGERIA, REUNION, RWANDA, SENEGAL, SIERRA LEONE, SOMALIA, SUDAN, SWAZILAND, TANZANIA, TOGO, TONGA, TUNISIA, UGANDA, WESTERN SAHARA, ZAIRE, ZAMBIA, ZIMBABWE" 86 countries="ARMENIA, AUSTRIA, BELGIUM, CYPRUS, DENMARK, EUROPAH, FAEROE ISLANDS, FINLAND, FINLAND, METROPOLITAN, FRANCE, GERMANY, GERMANY (DEM.REP), GERMANY (FED.REP), GREECE, HOLY SEE (VATICAN CITY), ITALY, LUXEMBOURG, MACEDONIA, MALTA, MEDITERANEAN, MONACO, NETHERLANDS, NORWAY, PORTUGAL, REP. OF MOLDOVA, SLOVAKIA, SLOVENIA, SPAIN, SWEDEN, SWITZERLAND, UK-DEPENDENT TERRITORIES CIT, UK-NATIONAL OVERSEAS, UK-OVERSEAS CITIZEN, UK-PROTECTED PERSON, UK-SUBJECT" 87 countries="BRITAIN, GREAT BRITAIN, IRELAND" 88 countries="BAHRAIN, IRAN, IRAQ, ISRAEL, JORDAN, KUWAIT, LEBANON, OMAN, QATAR, REPUBLIC OF YEMEN, SYRIA, TIMUR TENGAH, TURKEY, UNITED ARAB EMIRATE, YEMEN ARAB REP., YEMEN PEOPLE DEM.RE" 89 countries="JAPAN, KOREA (SELATAN), KOREA (UTARA), TAIWAN, TIMUR JAUH" 90 countries="BAHAMAS, BARBADOS, BELIZE, CARIBBEAN, COSTA RICA, CUBA, DOMINICA, DOMINICAN REPUBLIC, EL SALVADOR, GRENADA, GUATEMALA, HAITI, HONDURAS, JAMAICA, MARTINIQUE, MEXICO, NICARAGUA, PANAMA, PUERTO RICO, ST. KITTS AND NEVIS, ST. LUCIA, ST. VINCENT AND THE GRENADINES, TRINIDAD & TOBAGO, TURKS AND CAICOS ISLANDS, VIRGIN ISLANDS (USA)" 91 countries="AMERIKA UTARA, CANADA, GREENLAND, NETHERLANDS ANTILLES, ST. PIERRE AND MIQUELON, UNITED STATES OF AMERICA" 92 countries="ALBANIA, BELARUS, BOSNIA HERZEGOVINA, BULGARIA, BYELORUSSIA, CROATIA, CZECH REPUBLIC, CZECHOSLOVAKIA, ESTONIA, GEORGIA, HUNGARY, LATVIA, LITHUANIA, MONTENEGRO, POLAND, REPUBLIC OF KOSOVO, ROMANIA, RUSSIAN FEDERATION, SERBIA, U.S.S.R, UKRAINE" 93 countries="AFGHANISTAN, ANDORRA/ANDORA, ANTARTICA, ANTIGUA & BARBUDA, AZERBAIJAN, BENIN, BERMUDA, BHUTAN, BORA-BORA, BOUVET ISLAND, BRITISH INDIAN OCEAN TERRITORY, BURKINA FASO/BURKINA, CAPE VERDE, CAYMAN ISLANDS, COMOROS, DAHOMEY, EQUATORIAL GUINEA, FALKLAND ISLANDS, FRENCH SOUTHERN TERRITORIES, GIBRALTAR, GUINEA-BISSAU, HONG KONG, ICELAND, IVORY COAST, KAZAKHSTAN, KIRIBATI, KYRGYZSTAN, LESOTHO, LIBYA, LIECHTENSTEIN, MACAU, MADAGASCAR, MAGHRIBI, MALAGASY, MALDIVES, MAURITIUS, MONGOLIA, MONTSERRAT, NAURU, NEPAL, NORTHERN MARIANAS ISLANDS, OUTER MONGOLIA, PALAU, PALESTINE, PITCAIRN ISLANDS, SAMAO BARAT, SAMOA, SAN MARINO, SAO TOME & PRINCIPE, SEYCHELLES, SOLOMON ISLANDS, ST. HELENA, ST.LUCIA, ST.VICENT, SVALBARD AND JAN MAYEN ISLANDS, SWAPO, TAJIKISTAN, TURKMENISTAN, TUVALU, UPPER VOLTA, UZBEKISTAN, VANUATU, VATICAN CITY, VIRGIN ISLANDS (BRITISH), WESTERN SAMOA, YUGOSLAVIA" 98 countries="STATELESS PERSON ARTICLE 1/1954, Tanpa Negara" 99 countries="MAKLUMAT TIADA, MEKAH, NEUTRAL ZONE, REFUGEE, REFUGEE ARTICLE 1/1951, UN SPECIALIZED AGENCY, UNITED NATIONS ORGANIZATION, UNSPECIFIED NATIONALITY" python-stdnum-1.2/stdnum/my/__init__.py0000644000000000000000000000155012154632227020220 0ustar rootroot00000000000000# __init__.py - collection of Malaysian numbers # coding: utf-8 # # Copyright (C) 2013 Arthur de Jong # # 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 """Collection of Malaysian numbers.""" python-stdnum-1.2/stdnum/my/nric.py0000644000000000000000000000715712517406343017426 0ustar rootroot00000000000000# nric.py - functions for handling NRIC numbers # # Copyright (C) 2013, 2014 Arthur de Jong # # 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 """NRIC No. (Malaysian National Registration Identity Card Number). The NRIC No. is the unique identifier for issued to Malaysian citizens and permanent residents. The number consist of 12 digits in three sections. The first 6 digits represent the birth date, followed by two digits represeting the birth place and finally four digits. The gender of a person can be derived from the last digit: odd numbers for males and even numbers for females. >>> validate('770305-02-1234') '770305021234' >>> validate('771305-02-1234') # invalid date Traceback (most recent call last): ... InvalidComponent: ... >>> validate('770305-17-1234') # unknown birth place code Traceback (most recent call last): ... InvalidComponent: ... >>> format('770305021234') '770305-02-1234' """ import datetime from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -*').strip() def get_birth_date(number): """Split the date parts from the number and return the birth date. Note that in some cases it may return the registration date instead of the birth date and it may be a century off.""" number = compact(number) year = int(number[0:2]) month = int(number[2:4]) day = int(number[4:6]) # this is a bit broken but it's easy try: return datetime.date(year + 1900, month, day) except ValueError: pass try: return datetime.date(year + 2000, month, day) except ValueError: raise InvalidComponent() def get_birth_place(number): """Use the number to look up the place of birth of the person. This can either be a state or federal territory within Malaysia or a country outside of Malaysia.""" from stdnum import numdb number = compact(number) results = numdb.get('my/bp').info(number[6:8])[0][1] if not results: raise InvalidComponent() return results def validate(number): """Checks to see if the number provided is a valid NRIC numbers. This checks the length, formatting and birth date and place.""" number = compact(number) if len(number) != 12: raise InvalidLength() if not number.isdigit(): raise InvalidFormat() get_birth_date(number) get_birth_place(number) return number def is_valid(number): """Checks to see if the number provided is a valid NRIC numbers. This checks the length, formatting and birth date and place.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:6] + '-' + number[6:8] + '-' + number[8:] python-stdnum-1.2/stdnum/lt/0000755000000000000000000000000012606445507016105 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/lt/pvm.py0000644000000000000000000000577612154624371017274 0ustar rootroot00000000000000# pvm.py - functions for handling Lithuanian VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number). The PVM is used for VAT purposes in Lithuania. It is 9 digits (for legal entities) or 12 digits long (for temporarily registered taxpayers). This module does not check the format of Lithuanian personal codes (Asmens kodas). >>> validate('119511515') # organisation '119511515' >>> validate('LT 100001919017') # temporarily registered '100001919017' >>> validate('100001919018') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('100004801610') # second step in check digit calculation '100004801610' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('LT'): number = number[2:] return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" check = sum((1 + i % 9) * int(n) for i, n in enumerate(number)) % 11 if check == 10: check = sum((1 + (i + 2) % 9) * int(n) for i, n in enumerate(number)) return str(check % 11 % 10) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) == 9: # legal entities if number[7] != '1': raise InvalidComponent() elif len(number) == 12: # temporary tax payers and natural persons if number[10] != '1': raise InvalidComponent() else: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/lt/__init__.py0000644000000000000000000000164611720140726020214 0ustar rootroot00000000000000# __init__.py - collection of Lithuanian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Lithuanian numbers.""" # provide vat as an alias from stdnum.lt import pvm as vat python-stdnum-1.2/stdnum/cn/0000755000000000000000000000000012606445507016066 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/cn/__init__.py0000644000000000000000000000155512517406343020201 0ustar rootroot00000000000000# __init__.py - collection of United States numbers # coding: utf-8 # # Copyright (C) 2014 Jiangge Zhang # # 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 """Collection of China (PRC) numbers.""" python-stdnum-1.2/stdnum/cn/loc.dat0000644000000000000000000075363312606432040017342 0ustar rootroot00000000000000# generated from National Bureau of Statistics of the People's # Republic of China, downloaded from https://github.com/cn/GB2260 # 2015-10-11 10:02:20.899770 110101 county="东城区" prefecture="市辖区" province="北京市" 110102 county="西城区" prefecture="市辖区" province="北京市" 110103 county="崇文区" prefecture="市辖区" province="北京市" 110104 county="宣武区" prefecture="市辖区" province="北京市" 110105 county="朝阳区" prefecture="市辖区" province="北京市" 110106 county="丰台区" prefecture="市辖区" province="北京市" 110107 county="石景山区" prefecture="市辖区" province="北京市" 110108 county="海淀区" prefecture="市辖区" province="北京市" 110109 county="门头沟区" prefecture="市辖区" province="北京市" 110111 county="房山区" prefecture="市辖区" province="北京市" 110112 county="通州区" prefecture="市辖区" province="北京市" 110113 county="顺义区" prefecture="市辖区" province="北京市" 110114 county="昌平区" prefecture="市辖区" province="北京市" 110115 county="大兴区" prefecture="市辖区" province="北京市" 110116 county="怀柔区" prefecture="市辖区" province="北京市" 110117 county="平谷区" prefecture="市辖区" province="北京市" 110228 county="密云县" prefecture="县" province="北京市" 110229 county="延庆县" prefecture="县" province="北京市" 120101 county="和平区" prefecture="市辖区" province="天津市" 120102 county="河东区" prefecture="市辖区" province="天津市" 120103 county="河西区" prefecture="市辖区" province="天津市" 120104 county="南开区" prefecture="市辖区" province="天津市" 120105 county="河北区" prefecture="市辖区" province="天津市" 120106 county="红桥区" prefecture="市辖区" province="天津市" 120107 county="塘沽区" prefecture="市辖区" province="天津市" 120108 county="汉沽区" prefecture="市辖区" province="天津市" 120109 county="大港区" prefecture="市辖区" province="天津市" 120110 county="东丽区" prefecture="市辖区" province="天津市" 120111 county="西青区" prefecture="市辖区" province="天津市" 120112 county="津南区" prefecture="市辖区" province="天津市" 120113 county="北辰区" prefecture="市辖区" province="天津市" 120114 county="武清区" prefecture="市辖区" province="天津市" 120115 county="宝坻区" prefecture="市辖区" province="天津市" 120116 county="滨海新区" prefecture="市辖区" province="天津市" 120221 county="宁河县" prefecture="县" province="天津市" 120223 county="静海县" prefecture="县" province="天津市" 120225 county="蓟县" prefecture="县" province="天津市" 130101 county="市辖区" prefecture="石家庄市" province="河北省" 130102 county="长安区" prefecture="石家庄市" province="河北省" 130103 county="桥东区" prefecture="石家庄市" province="河北省" 130104 county="桥西区" prefecture="石家庄市" province="河北省" 130105 county="新华区" prefecture="石家庄市" province="河北省" 130107 county="井陉矿区" prefecture="石家庄市" province="河北省" 130108 county="裕华区" prefecture="石家庄市" province="河北省" 130109 county="藁城区" prefecture="石家庄市" province="河北省" 130110 county="鹿泉区" prefecture="石家庄市" province="河北省" 130111 county="栾城区" prefecture="石家庄市" province="河北省" 130121 county="井陉县" prefecture="石家庄市" province="河北省" 130123 county="正定县" prefecture="石家庄市" province="河北省" 130124 county="栾城县" prefecture="石家庄市" province="河北省" 130125 county="行唐县" prefecture="石家庄市" province="河北省" 130126 county="灵寿县" prefecture="石家庄市" province="河北省" 130127 county="高邑县" prefecture="石家庄市" province="河北省" 130128 county="深泽县" prefecture="石家庄市" province="河北省" 130129 county="赞皇县" prefecture="石家庄市" province="河北省" 130130 county="无极县" prefecture="石家庄市" province="河北省" 130131 county="平山县" prefecture="石家庄市" province="河北省" 130132 county="元氏县" prefecture="石家庄市" province="河北省" 130133 county="赵县" prefecture="石家庄市" province="河北省" 130181 county="辛集市" prefecture="石家庄市" province="河北省" 130182 county="藁城市" prefecture="石家庄市" province="河北省" 130183 county="晋州市" prefecture="石家庄市" province="河北省" 130184 county="新乐市" prefecture="石家庄市" province="河北省" 130185 county="鹿泉市" prefecture="石家庄市" province="河北省" 130201 county="市辖区" prefecture="唐山市" province="河北省" 130202 county="路南区" prefecture="唐山市" province="河北省" 130203 county="路北区" prefecture="唐山市" province="河北省" 130204 county="古冶区" prefecture="唐山市" province="河北省" 130205 county="开平区" prefecture="唐山市" province="河北省" 130207 county="丰南区" prefecture="唐山市" province="河北省" 130208 county="丰润区" prefecture="唐山市" province="河北省" 130209 county="曹妃甸区" prefecture="唐山市" province="河北省" 130223 county="滦县" prefecture="唐山市" province="河北省" 130224 county="滦南县" prefecture="唐山市" province="河北省" 130225 county="乐亭县" prefecture="唐山市" province="河北省" 130227 county="迁西县" prefecture="唐山市" province="河北省" 130229 county="玉田县" prefecture="唐山市" province="河北省" 130230 county="唐海县" prefecture="唐山市" province="河北省" 130281 county="遵化市" prefecture="唐山市" province="河北省" 130283 county="迁安市" prefecture="唐山市" province="河北省" 130301 county="市辖区" prefecture="秦皇岛市" province="河北省" 130302 county="海港区" prefecture="秦皇岛市" province="河北省" 130303 county="山海关区" prefecture="秦皇岛市" province="河北省" 130304 county="北戴河区" prefecture="秦皇岛市" province="河北省" 130321 county="青龙满族自治县" prefecture="秦皇岛市" province="河北省" 130322 county="昌黎县" prefecture="秦皇岛市" province="河北省" 130323 county="抚宁县" prefecture="秦皇岛市" province="河北省" 130324 county="卢龙县" prefecture="秦皇岛市" province="河北省" 130401 county="市辖区" prefecture="邯郸市" province="河北省" 130402 county="邯山区" prefecture="邯郸市" province="河北省" 130403 county="丛台区" prefecture="邯郸市" province="河北省" 130404 county="复兴区" prefecture="邯郸市" province="河北省" 130406 county="峰峰矿区" prefecture="邯郸市" province="河北省" 130421 county="邯郸县" prefecture="邯郸市" province="河北省" 130423 county="临漳县" prefecture="邯郸市" province="河北省" 130424 county="成安县" prefecture="邯郸市" province="河北省" 130425 county="大名县" prefecture="邯郸市" province="河北省" 130426 county="涉县" prefecture="邯郸市" province="河北省" 130427 county="磁县" prefecture="邯郸市" province="河北省" 130428 county="肥乡县" prefecture="邯郸市" province="河北省" 130429 county="永年县" prefecture="邯郸市" province="河北省" 130430 county="邱县" prefecture="邯郸市" province="河北省" 130431 county="鸡泽县" prefecture="邯郸市" province="河北省" 130432 county="广平县" prefecture="邯郸市" province="河北省" 130433 county="馆陶县" prefecture="邯郸市" province="河北省" 130434 county="魏县" prefecture="邯郸市" province="河北省" 130435 county="曲周县" prefecture="邯郸市" province="河北省" 130481 county="武安市" prefecture="邯郸市" province="河北省" 130501 county="市辖区" prefecture="邢台市" province="河北省" 130502 county="桥东区" prefecture="邢台市" province="河北省" 130503 county="桥西区" prefecture="邢台市" province="河北省" 130521 county="邢台县" prefecture="邢台市" province="河北省" 130522 county="临城县" prefecture="邢台市" province="河北省" 130523 county="内丘县" prefecture="邢台市" province="河北省" 130524 county="柏乡县" prefecture="邢台市" province="河北省" 130525 county="隆尧县" prefecture="邢台市" province="河北省" 130526 county="任县" prefecture="邢台市" province="河北省" 130527 county="南和县" prefecture="邢台市" province="河北省" 130528 county="宁晋县" prefecture="邢台市" province="河北省" 130529 county="巨鹿县" prefecture="邢台市" province="河北省" 130530 county="新河县" prefecture="邢台市" province="河北省" 130531 county="广宗县" prefecture="邢台市" province="河北省" 130532 county="平乡县" prefecture="邢台市" province="河北省" 130533 county="威县" prefecture="邢台市" province="河北省" 130534 county="清河县" prefecture="邢台市" province="河北省" 130535 county="临西县" prefecture="邢台市" province="河北省" 130581 county="南宫市" prefecture="邢台市" province="河北省" 130582 county="沙河市" prefecture="邢台市" province="河北省" 130601 county="市辖区" prefecture="保定市" province="河北省" 130602 county="新市区" prefecture="保定市" province="河北省" 130603 county="北市区" prefecture="保定市" province="河北省" 130604 county="南市区" prefecture="保定市" province="河北省" 130621 county="满城县" prefecture="保定市" province="河北省" 130622 county="清苑县" prefecture="保定市" province="河北省" 130623 county="涞水县" prefecture="保定市" province="河北省" 130624 county="阜平县" prefecture="保定市" province="河北省" 130625 county="徐水县" prefecture="保定市" province="河北省" 130626 county="定兴县" prefecture="保定市" province="河北省" 130627 county="唐县" prefecture="保定市" province="河北省" 130628 county="高阳县" prefecture="保定市" province="河北省" 130629 county="容城县" prefecture="保定市" province="河北省" 130630 county="涞源县" prefecture="保定市" province="河北省" 130631 county="望都县" prefecture="保定市" province="河北省" 130632 county="安新县" prefecture="保定市" province="河北省" 130633 county="易县" prefecture="保定市" province="河北省" 130634 county="曲阳县" prefecture="保定市" province="河北省" 130635 county="蠡县" prefecture="保定市" province="河北省" 130636 county="顺平县" prefecture="保定市" province="河北省" 130637 county="博野县" prefecture="保定市" province="河北省" 130638 county="雄县" prefecture="保定市" province="河北省" 130681 county="涿州市" prefecture="保定市" province="河北省" 130682 county="定州市" prefecture="保定市" province="河北省" 130683 county="安国市" prefecture="保定市" province="河北省" 130684 county="高碑店市" prefecture="保定市" province="河北省" 130701 county="市辖区" prefecture="张家口市" province="河北省" 130702 county="桥东区" prefecture="张家口市" province="河北省" 130703 county="桥西区" prefecture="张家口市" province="河北省" 130705 county="宣化区" prefecture="张家口市" province="河北省" 130706 county="下花园区" prefecture="张家口市" province="河北省" 130721 county="宣化县" prefecture="张家口市" province="河北省" 130722 county="张北县" prefecture="张家口市" province="河北省" 130723 county="康保县" prefecture="张家口市" province="河北省" 130724 county="沽源县" prefecture="张家口市" province="河北省" 130725 county="尚义县" prefecture="张家口市" province="河北省" 130726 county="蔚县" prefecture="张家口市" province="河北省" 130727 county="阳原县" prefecture="张家口市" province="河北省" 130728 county="怀安县" prefecture="张家口市" province="河北省" 130729 county="万全县" prefecture="张家口市" province="河北省" 130730 county="怀来县" prefecture="张家口市" province="河北省" 130731 county="涿鹿县" prefecture="张家口市" province="河北省" 130732 county="赤城县" prefecture="张家口市" province="河北省" 130733 county="崇礼县" prefecture="张家口市" province="河北省" 130801 county="市辖区" prefecture="承德市" province="河北省" 130802 county="双桥区" prefecture="承德市" province="河北省" 130803 county="双滦区" prefecture="承德市" province="河北省" 130804 county="鹰手营子矿区" prefecture="承德市" province="河北省" 130821 county="承德县" prefecture="承德市" province="河北省" 130822 county="兴隆县" prefecture="承德市" province="河北省" 130823 county="平泉县" prefecture="承德市" province="河北省" 130824 county="滦平县" prefecture="承德市" province="河北省" 130825 county="隆化县" prefecture="承德市" province="河北省" 130826 county="丰宁满族自治县" prefecture="承德市" province="河北省" 130827 county="宽城满族自治县" prefecture="承德市" province="河北省" 130828 county="围场满族蒙古族自治县" prefecture="承德市" province="河北省" 130901 county="市辖区" prefecture="沧州市" province="河北省" 130902 county="新华区" prefecture="沧州市" province="河北省" 130903 county="运河区" prefecture="沧州市" province="河北省" 130921 county="沧县" prefecture="沧州市" province="河北省" 130922 county="青县" prefecture="沧州市" province="河北省" 130923 county="东光县" prefecture="沧州市" province="河北省" 130924 county="海兴县" prefecture="沧州市" province="河北省" 130925 county="盐山县" prefecture="沧州市" province="河北省" 130926 county="肃宁县" prefecture="沧州市" province="河北省" 130927 county="南皮县" prefecture="沧州市" province="河北省" 130928 county="吴桥县" prefecture="沧州市" province="河北省" 130929 county="献县" prefecture="沧州市" province="河北省" 130930 county="孟村回族自治县" prefecture="沧州市" province="河北省" 130981 county="泊头市" prefecture="沧州市" province="河北省" 130982 county="任丘市" prefecture="沧州市" province="河北省" 130983 county="黄骅市" prefecture="沧州市" province="河北省" 130984 county="河间市" prefecture="沧州市" province="河北省" 131001 county="市辖区" prefecture="廊坊市" province="河北省" 131002 county="安次区" prefecture="廊坊市" province="河北省" 131003 county="广阳区" prefecture="廊坊市" province="河北省" 131022 county="固安县" prefecture="廊坊市" province="河北省" 131023 county="永清县" prefecture="廊坊市" province="河北省" 131024 county="香河县" prefecture="廊坊市" province="河北省" 131025 county="大城县" prefecture="廊坊市" province="河北省" 131026 county="文安县" prefecture="廊坊市" province="河北省" 131028 county="大厂回族自治县" prefecture="廊坊市" province="河北省" 131081 county="霸州市" prefecture="廊坊市" province="河北省" 131082 county="三河市" prefecture="廊坊市" province="河北省" 131101 county="市辖区" prefecture="衡水市" province="河北省" 131102 county="桃城区" prefecture="衡水市" province="河北省" 131121 county="枣强县" prefecture="衡水市" province="河北省" 131122 county="武邑县" prefecture="衡水市" province="河北省" 131123 county="武强县" prefecture="衡水市" province="河北省" 131124 county="饶阳县" prefecture="衡水市" province="河北省" 131125 county="安平县" prefecture="衡水市" province="河北省" 131126 county="故城县" prefecture="衡水市" province="河北省" 131127 county="景县" prefecture="衡水市" province="河北省" 131128 county="阜城县" prefecture="衡水市" province="河北省" 131181 county="冀州市" prefecture="衡水市" province="河北省" 131182 county="深州市" prefecture="衡水市" province="河北省" 140101 county="市辖区" prefecture="太原市" province="山西省" 140105 county="小店区" prefecture="太原市" province="山西省" 140106 county="迎泽区" prefecture="太原市" province="山西省" 140107 county="杏花岭区" prefecture="太原市" province="山西省" 140108 county="尖草坪区" prefecture="太原市" province="山西省" 140109 county="万柏林区" prefecture="太原市" province="山西省" 140110 county="晋源区" prefecture="太原市" province="山西省" 140121 county="清徐县" prefecture="太原市" province="山西省" 140122 county="阳曲县" prefecture="太原市" province="山西省" 140123 county="娄烦县" prefecture="太原市" province="山西省" 140181 county="古交市" prefecture="太原市" province="山西省" 140201 county="市辖区" prefecture="大同市" province="山西省" 140202 county="城区" prefecture="大同市" province="山西省" 140203 county="矿区" prefecture="大同市" province="山西省" 140211 county="南郊区" prefecture="大同市" province="山西省" 140212 county="新荣区" prefecture="大同市" province="山西省" 140221 county="阳高县" prefecture="大同市" province="山西省" 140222 county="天镇县" prefecture="大同市" province="山西省" 140223 county="广灵县" prefecture="大同市" province="山西省" 140224 county="灵丘县" prefecture="大同市" province="山西省" 140225 county="浑源县" prefecture="大同市" province="山西省" 140226 county="左云县" prefecture="大同市" province="山西省" 140227 county="大同县" prefecture="大同市" province="山西省" 140301 county="市辖区" prefecture="阳泉市" province="山西省" 140302 county="城区" prefecture="阳泉市" province="山西省" 140303 county="矿区" prefecture="阳泉市" province="山西省" 140311 county="郊区" prefecture="阳泉市" province="山西省" 140321 county="平定县" prefecture="阳泉市" province="山西省" 140322 county="盂县" prefecture="阳泉市" province="山西省" 140401 county="市辖区" prefecture="长治市" province="山西省" 140402 county="城区" prefecture="长治市" province="山西省" 140411 county="郊区" prefecture="长治市" province="山西省" 140421 county="长治县" prefecture="长治市" province="山西省" 140423 county="襄垣县" prefecture="长治市" province="山西省" 140424 county="屯留县" prefecture="长治市" province="山西省" 140425 county="平顺县" prefecture="长治市" province="山西省" 140426 county="黎城县" prefecture="长治市" province="山西省" 140427 county="壶关县" prefecture="长治市" province="山西省" 140428 county="长子县" prefecture="长治市" province="山西省" 140429 county="武乡县" prefecture="长治市" province="山西省" 140430 county="沁县" prefecture="长治市" province="山西省" 140431 county="沁源县" prefecture="长治市" province="山西省" 140481 county="潞城市" prefecture="长治市" province="山西省" 140501 county="市辖区" prefecture="晋城市" province="山西省" 140502 county="城区" prefecture="晋城市" province="山西省" 140521 county="沁水县" prefecture="晋城市" province="山西省" 140522 county="阳城县" prefecture="晋城市" province="山西省" 140524 county="陵川县" prefecture="晋城市" province="山西省" 140525 county="泽州县" prefecture="晋城市" province="山西省" 140581 county="高平市" prefecture="晋城市" province="山西省" 140601 county="市辖区" prefecture="朔州市" province="山西省" 140602 county="朔城区" prefecture="朔州市" province="山西省" 140603 county="平鲁区" prefecture="朔州市" province="山西省" 140621 county="山阴县" prefecture="朔州市" province="山西省" 140622 county="应县" prefecture="朔州市" province="山西省" 140623 county="右玉县" prefecture="朔州市" province="山西省" 140624 county="怀仁县" prefecture="朔州市" province="山西省" 140701 county="市辖区" prefecture="晋中市" province="山西省" 140702 county="榆次区" prefecture="晋中市" province="山西省" 140721 county="榆社县" prefecture="晋中市" province="山西省" 140722 county="左权县" prefecture="晋中市" province="山西省" 140723 county="和顺县" prefecture="晋中市" province="山西省" 140724 county="昔阳县" prefecture="晋中市" province="山西省" 140725 county="寿阳县" prefecture="晋中市" province="山西省" 140726 county="太谷县" prefecture="晋中市" province="山西省" 140727 county="祁县" prefecture="晋中市" province="山西省" 140728 county="平遥县" prefecture="晋中市" province="山西省" 140729 county="灵石县" prefecture="晋中市" province="山西省" 140781 county="介休市" prefecture="晋中市" province="山西省" 140801 county="市辖区" prefecture="运城市" province="山西省" 140802 county="盐湖区" prefecture="运城市" province="山西省" 140821 county="临猗县" prefecture="运城市" province="山西省" 140822 county="万荣县" prefecture="运城市" province="山西省" 140823 county="闻喜县" prefecture="运城市" province="山西省" 140824 county="稷山县" prefecture="运城市" province="山西省" 140825 county="新绛县" prefecture="运城市" province="山西省" 140826 county="绛县" prefecture="运城市" province="山西省" 140827 county="垣曲县" prefecture="运城市" province="山西省" 140828 county="夏县" prefecture="运城市" province="山西省" 140829 county="平陆县" prefecture="运城市" province="山西省" 140830 county="芮城县" prefecture="运城市" province="山西省" 140881 county="永济市" prefecture="运城市" province="山西省" 140882 county="河津市" prefecture="运城市" province="山西省" 140901 county="市辖区" prefecture="忻州市" province="山西省" 140902 county="忻府区" prefecture="忻州市" province="山西省" 140921 county="定襄县" prefecture="忻州市" province="山西省" 140922 county="五台县" prefecture="忻州市" province="山西省" 140923 county="代县" prefecture="忻州市" province="山西省" 140924 county="繁峙县" prefecture="忻州市" province="山西省" 140925 county="宁武县" prefecture="忻州市" province="山西省" 140926 county="静乐县" prefecture="忻州市" province="山西省" 140927 county="神池县" prefecture="忻州市" province="山西省" 140928 county="五寨县" prefecture="忻州市" province="山西省" 140929 county="岢岚县" prefecture="忻州市" province="山西省" 140930 county="河曲县" prefecture="忻州市" province="山西省" 140931 county="保德县" prefecture="忻州市" province="山西省" 140932 county="偏关县" prefecture="忻州市" province="山西省" 140981 county="原平市" prefecture="忻州市" province="山西省" 141001 county="市辖区" prefecture="临汾市" province="山西省" 141002 county="尧都区" prefecture="临汾市" province="山西省" 141021 county="曲沃县" prefecture="临汾市" province="山西省" 141022 county="翼城县" prefecture="临汾市" province="山西省" 141023 county="襄汾县" prefecture="临汾市" province="山西省" 141024 county="洪洞县" prefecture="临汾市" province="山西省" 141025 county="古县" prefecture="临汾市" province="山西省" 141026 county="安泽县" prefecture="临汾市" province="山西省" 141027 county="浮山县" prefecture="临汾市" province="山西省" 141028 county="吉县" prefecture="临汾市" province="山西省" 141029 county="乡宁县" prefecture="临汾市" province="山西省" 141030 county="大宁县" prefecture="临汾市" province="山西省" 141031 county="隰县" prefecture="临汾市" province="山西省" 141032 county="永和县" prefecture="临汾市" province="山西省" 141033 county="蒲县" prefecture="临汾市" province="山西省" 141034 county="汾西县" prefecture="临汾市" province="山西省" 141081 county="侯马市" prefecture="临汾市" province="山西省" 141082 county="霍州市" prefecture="临汾市" province="山西省" 141101 county="市辖区" prefecture="吕梁市" province="山西省" 141102 county="离石区" prefecture="吕梁市" province="山西省" 141121 county="文水县" prefecture="吕梁市" province="山西省" 141122 county="交城县" prefecture="吕梁市" province="山西省" 141123 county="兴县" prefecture="吕梁市" province="山西省" 141124 county="临县" prefecture="吕梁市" province="山西省" 141125 county="柳林县" prefecture="吕梁市" province="山西省" 141126 county="石楼县" prefecture="吕梁市" province="山西省" 141127 county="岚县" prefecture="吕梁市" province="山西省" 141128 county="方山县" prefecture="吕梁市" province="山西省" 141129 county="中阳县" prefecture="吕梁市" province="山西省" 141130 county="交口县" prefecture="吕梁市" province="山西省" 141181 county="孝义市" prefecture="吕梁市" province="山西省" 141182 county="汾阳市" prefecture="吕梁市" province="山西省" 142301 county="孝义市" prefecture="吕梁地区" province="山西省" 142302 county="离石市" prefecture="吕梁地区" province="山西省" 142303 county="汾阳市" prefecture="吕梁地区" province="山西省" 142322 county="文水县" prefecture="吕梁地区" province="山西省" 142323 county="交城县" prefecture="吕梁地区" province="山西省" 142325 county="兴县" prefecture="吕梁地区" province="山西省" 142326 county="临县" prefecture="吕梁地区" province="山西省" 142327 county="柳林县" prefecture="吕梁地区" province="山西省" 142328 county="石楼县" prefecture="吕梁地区" province="山西省" 142329 county="岚县" prefecture="吕梁地区" province="山西省" 142330 county="方山县" prefecture="吕梁地区" province="山西省" 142332 county="中阳县" prefecture="吕梁地区" province="山西省" 142333 county="交口县" prefecture="吕梁地区" province="山西省" 150101 county="市辖区" prefecture="呼和浩特市" province="内蒙古自治区" 150102 county="新城区" prefecture="呼和浩特市" province="内蒙古自治区" 150103 county="回民区" prefecture="呼和浩特市" province="内蒙古自治区" 150104 county="玉泉区" prefecture="呼和浩特市" province="内蒙古自治区" 150105 county="赛罕区" prefecture="呼和浩特市" province="内蒙古自治区" 150121 county="土默特左旗" prefecture="呼和浩特市" province="内蒙古自治区" 150122 county="托克托县" prefecture="呼和浩特市" province="内蒙古自治区" 150123 county="和林格尔县" prefecture="呼和浩特市" province="内蒙古自治区" 150124 county="清水河县" prefecture="呼和浩特市" province="内蒙古自治区" 150125 county="武川县" prefecture="呼和浩特市" province="内蒙古自治区" 150201 county="市辖区" prefecture="包头市" province="内蒙古自治区" 150202 county="东河区" prefecture="包头市" province="内蒙古自治区" 150203 county="昆都仑区" prefecture="包头市" province="内蒙古自治区" 150204 county="青山区" prefecture="包头市" province="内蒙古自治区" 150205 county="石拐区" prefecture="包头市" province="内蒙古自治区" 150206 county="白云鄂博矿区" prefecture="包头市" province="内蒙古自治区" 150207 county="九原区" prefecture="包头市" province="内蒙古自治区" 150221 county="土默特右旗" prefecture="包头市" province="内蒙古自治区" 150222 county="固阳县" prefecture="包头市" province="内蒙古自治区" 150223 county="达尔罕茂明安联合旗" prefecture="包头市" province="内蒙古自治区" 150301 county="市辖区" prefecture="乌海市" province="内蒙古自治区" 150302 county="海勃湾区" prefecture="乌海市" province="内蒙古自治区" 150303 county="海南区" prefecture="乌海市" province="内蒙古自治区" 150304 county="乌达区" prefecture="乌海市" province="内蒙古自治区" 150401 county="市辖区" prefecture="赤峰市" province="内蒙古自治区" 150402 county="红山区" prefecture="赤峰市" province="内蒙古自治区" 150403 county="元宝山区" prefecture="赤峰市" province="内蒙古自治区" 150404 county="松山区" prefecture="赤峰市" province="内蒙古自治区" 150421 county="阿鲁科尔沁旗" prefecture="赤峰市" province="内蒙古自治区" 150422 county="巴林左旗" prefecture="赤峰市" province="内蒙古自治区" 150423 county="巴林右旗" prefecture="赤峰市" province="内蒙古自治区" 150424 county="林西县" prefecture="赤峰市" province="内蒙古自治区" 150425 county="克什克腾旗" prefecture="赤峰市" province="内蒙古自治区" 150426 county="翁牛特旗" prefecture="赤峰市" province="内蒙古自治区" 150428 county="喀喇沁旗" prefecture="赤峰市" province="内蒙古自治区" 150429 county="宁城县" prefecture="赤峰市" province="内蒙古自治区" 150430 county="敖汉旗" prefecture="赤峰市" province="内蒙古自治区" 150501 county="市辖区" prefecture="通辽市" province="内蒙古自治区" 150502 county="科尔沁区" prefecture="通辽市" province="内蒙古自治区" 150521 county="科尔沁左翼中旗" prefecture="通辽市" province="内蒙古自治区" 150522 county="科尔沁左翼后旗" prefecture="通辽市" province="内蒙古自治区" 150523 county="开鲁县" prefecture="通辽市" province="内蒙古自治区" 150524 county="库伦旗" prefecture="通辽市" province="内蒙古自治区" 150525 county="奈曼旗" prefecture="通辽市" province="内蒙古自治区" 150526 county="扎鲁特旗" prefecture="通辽市" province="内蒙古自治区" 150581 county="霍林郭勒市" prefecture="通辽市" province="内蒙古自治区" 150601 county="市辖区" prefecture="鄂尔多斯市" province="内蒙古自治区" 150602 county="东胜区" prefecture="鄂尔多斯市" province="内蒙古自治区" 150621 county="达拉特旗" prefecture="鄂尔多斯市" province="内蒙古自治区" 150622 county="准格尔旗" prefecture="鄂尔多斯市" province="内蒙古自治区" 150623 county="鄂托克前旗" prefecture="鄂尔多斯市" province="内蒙古自治区" 150624 county="鄂托克旗" prefecture="鄂尔多斯市" province="内蒙古自治区" 150625 county="杭锦旗" prefecture="鄂尔多斯市" province="内蒙古自治区" 150626 county="乌审旗" prefecture="鄂尔多斯市" province="内蒙古自治区" 150627 county="伊金霍洛旗" prefecture="鄂尔多斯市" province="内蒙古自治区" 150701 county="市辖区" prefecture="呼伦贝尔市" province="内蒙古自治区" 150702 county="海拉尔区" prefecture="呼伦贝尔市" province="内蒙古自治区" 150703 county="扎赉诺尔区" prefecture="呼伦贝尔市" province="内蒙古自治区" 150721 county="阿荣旗" prefecture="呼伦贝尔市" province="内蒙古自治区" 150722 county="莫力达瓦达斡尔族自治旗" prefecture="呼伦贝尔市" province="内蒙古自治区" 150723 county="鄂伦春自治旗" prefecture="呼伦贝尔市" province="内蒙古自治区" 150724 county="鄂温克族自治旗" prefecture="呼伦贝尔市" province="内蒙古自治区" 150725 county="陈巴尔虎旗" prefecture="呼伦贝尔市" province="内蒙古自治区" 150726 county="新巴尔虎左旗" prefecture="呼伦贝尔市" province="内蒙古自治区" 150727 county="新巴尔虎右旗" prefecture="呼伦贝尔市" province="内蒙古自治区" 150781 county="满洲里市" prefecture="呼伦贝尔市" province="内蒙古自治区" 150782 county="牙克石市" prefecture="呼伦贝尔市" province="内蒙古自治区" 150783 county="扎兰屯市" prefecture="呼伦贝尔市" province="内蒙古自治区" 150784 county="额尔古纳市" prefecture="呼伦贝尔市" province="内蒙古自治区" 150785 county="根河市" prefecture="呼伦贝尔市" province="内蒙古自治区" 150801 county="市辖区" prefecture="巴彦淖尔市" province="内蒙古自治区" 150802 county="临河区" prefecture="巴彦淖尔市" province="内蒙古自治区" 150821 county="五原县" prefecture="巴彦淖尔市" province="内蒙古自治区" 150822 county="磴口县" prefecture="巴彦淖尔市" province="内蒙古自治区" 150823 county="乌拉特前旗" prefecture="巴彦淖尔市" province="内蒙古自治区" 150824 county="乌拉特中旗" prefecture="巴彦淖尔市" province="内蒙古自治区" 150825 county="乌拉特后旗" prefecture="巴彦淖尔市" province="内蒙古自治区" 150826 county="杭锦后旗" prefecture="巴彦淖尔市" province="内蒙古自治区" 150901 county="市辖区" prefecture="乌兰察布市" province="内蒙古自治区" 150902 county="集宁区" prefecture="乌兰察布市" province="内蒙古自治区" 150921 county="卓资县" prefecture="乌兰察布市" province="内蒙古自治区" 150922 county="化德县" prefecture="乌兰察布市" province="内蒙古自治区" 150923 county="商都县" prefecture="乌兰察布市" province="内蒙古自治区" 150924 county="兴和县" prefecture="乌兰察布市" province="内蒙古自治区" 150925 county="凉城县" prefecture="乌兰察布市" province="内蒙古自治区" 150926 county="察哈尔右翼前旗" prefecture="乌兰察布市" province="内蒙古自治区" 150927 county="察哈尔右翼中旗" prefecture="乌兰察布市" province="内蒙古自治区" 150928 county="察哈尔右翼后旗" prefecture="乌兰察布市" province="内蒙古自治区" 150929 county="四子王旗" prefecture="乌兰察布市" province="内蒙古自治区" 150981 county="丰镇市" prefecture="乌兰察布市" province="内蒙古自治区" 152201 county="乌兰浩特市" prefecture="兴安盟" province="内蒙古自治区" 152202 county="阿尔山市" prefecture="兴安盟" province="内蒙古自治区" 152221 county="科尔沁右翼前旗" prefecture="兴安盟" province="内蒙古自治区" 152222 county="科尔沁右翼中旗" prefecture="兴安盟" province="内蒙古自治区" 152223 county="扎赉特旗" prefecture="兴安盟" province="内蒙古自治区" 152224 county="突泉县" prefecture="兴安盟" province="内蒙古自治区" 152501 county="二连浩特市" prefecture="锡林郭勒盟" province="内蒙古自治区" 152502 county="锡林浩特市" prefecture="锡林郭勒盟" province="内蒙古自治区" 152522 county="阿巴嘎旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152523 county="苏尼特左旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152524 county="苏尼特右旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152525 county="东乌珠穆沁旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152526 county="西乌珠穆沁旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152527 county="太仆寺旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152528 county="镶黄旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152529 county="正镶白旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152530 county="正蓝旗" prefecture="锡林郭勒盟" province="内蒙古自治区" 152531 county="多伦县" prefecture="锡林郭勒盟" province="内蒙古自治区" 152601 county="集宁市" prefecture="乌兰察布盟" province="内蒙古自治区" 152602 county="丰镇市" prefecture="乌兰察布盟" province="内蒙古自治区" 152624 county="卓资县" prefecture="乌兰察布盟" province="内蒙古自治区" 152625 county="化德县" prefecture="乌兰察布盟" province="内蒙古自治区" 152626 county="商都县" prefecture="乌兰察布盟" province="内蒙古自治区" 152627 county="兴和县" prefecture="乌兰察布盟" province="内蒙古自治区" 152629 county="凉城县" prefecture="乌兰察布盟" province="内蒙古自治区" 152630 county="察哈尔右翼前旗" prefecture="乌兰察布盟" province="内蒙古自治区" 152631 county="察哈尔右翼中旗" prefecture="乌兰察布盟" province="内蒙古自治区" 152632 county="察哈尔右翼后旗" prefecture="乌兰察布盟" province="内蒙古自治区" 152634 county="四子王旗" prefecture="乌兰察布盟" province="内蒙古自治区" 152801 county="临河市" prefecture="巴彦淖尔盟" province="内蒙古自治区" 152822 county="五原县" prefecture="巴彦淖尔盟" province="内蒙古自治区" 152823 county="磴口县" prefecture="巴彦淖尔盟" province="内蒙古自治区" 152824 county="乌拉特前旗" prefecture="巴彦淖尔盟" province="内蒙古自治区" 152825 county="乌拉特中旗" prefecture="巴彦淖尔盟" province="内蒙古自治区" 152826 county="乌拉特后旗" prefecture="巴彦淖尔盟" province="内蒙古自治区" 152827 county="杭锦后旗" prefecture="巴彦淖尔盟" province="内蒙古自治区" 152921 county="阿拉善左旗" prefecture="阿拉善盟" province="内蒙古自治区" 152922 county="阿拉善右旗" prefecture="阿拉善盟" province="内蒙古自治区" 152923 county="额济纳旗" prefecture="阿拉善盟" province="内蒙古自治区" 210101 county="市辖区" prefecture="沈阳市" province="辽宁省" 210102 county="和平区" prefecture="沈阳市" province="辽宁省" 210103 county="沈河区" prefecture="沈阳市" province="辽宁省" 210104 county="大东区" prefecture="沈阳市" province="辽宁省" 210105 county="皇姑区" prefecture="沈阳市" province="辽宁省" 210106 county="铁西区" prefecture="沈阳市" province="辽宁省" 210111 county="苏家屯区" prefecture="沈阳市" province="辽宁省" 210112 county="浑南区" prefecture="沈阳市" province="辽宁省" 210113 county="沈北新区" prefecture="沈阳市" province="辽宁省" 210114 county="于洪区" prefecture="沈阳市" province="辽宁省" 210122 county="辽中县" prefecture="沈阳市" province="辽宁省" 210123 county="康平县" prefecture="沈阳市" province="辽宁省" 210124 county="法库县" prefecture="沈阳市" province="辽宁省" 210181 county="新民市" prefecture="沈阳市" province="辽宁省" 210201 county="市辖区" prefecture="大连市" province="辽宁省" 210202 county="中山区" prefecture="大连市" province="辽宁省" 210203 county="西岗区" prefecture="大连市" province="辽宁省" 210204 county="沙河口区" prefecture="大连市" province="辽宁省" 210211 county="甘井子区" prefecture="大连市" province="辽宁省" 210212 county="旅顺口区" prefecture="大连市" province="辽宁省" 210213 county="金州区" prefecture="大连市" province="辽宁省" 210224 county="长海县" prefecture="大连市" province="辽宁省" 210281 county="瓦房店市" prefecture="大连市" province="辽宁省" 210282 county="普兰店市" prefecture="大连市" province="辽宁省" 210283 county="庄河市" prefecture="大连市" province="辽宁省" 210301 county="市辖区" prefecture="鞍山市" province="辽宁省" 210302 county="铁东区" prefecture="鞍山市" province="辽宁省" 210303 county="铁西区" prefecture="鞍山市" province="辽宁省" 210304 county="立山区" prefecture="鞍山市" province="辽宁省" 210311 county="千山区" prefecture="鞍山市" province="辽宁省" 210321 county="台安县" prefecture="鞍山市" province="辽宁省" 210323 county="岫岩满族自治县" prefecture="鞍山市" province="辽宁省" 210381 county="海城市" prefecture="鞍山市" province="辽宁省" 210401 county="市辖区" prefecture="抚顺市" province="辽宁省" 210402 county="新抚区" prefecture="抚顺市" province="辽宁省" 210403 county="东洲区" prefecture="抚顺市" province="辽宁省" 210404 county="望花区" prefecture="抚顺市" province="辽宁省" 210411 county="顺城区" prefecture="抚顺市" province="辽宁省" 210421 county="抚顺县" prefecture="抚顺市" province="辽宁省" 210422 county="新宾满族自治县" prefecture="抚顺市" province="辽宁省" 210423 county="清原满族自治县" prefecture="抚顺市" province="辽宁省" 210501 county="市辖区" prefecture="本溪市" province="辽宁省" 210502 county="平山区" prefecture="本溪市" province="辽宁省" 210503 county="溪湖区" prefecture="本溪市" province="辽宁省" 210504 county="明山区" prefecture="本溪市" province="辽宁省" 210505 county="南芬区" prefecture="本溪市" province="辽宁省" 210521 county="本溪满族自治县" prefecture="本溪市" province="辽宁省" 210522 county="桓仁满族自治县" prefecture="本溪市" province="辽宁省" 210601 county="市辖区" prefecture="丹东市" province="辽宁省" 210602 county="元宝区" prefecture="丹东市" province="辽宁省" 210603 county="振兴区" prefecture="丹东市" province="辽宁省" 210604 county="振安区" prefecture="丹东市" province="辽宁省" 210624 county="宽甸满族自治县" prefecture="丹东市" province="辽宁省" 210681 county="东港市" prefecture="丹东市" province="辽宁省" 210682 county="凤城市" prefecture="丹东市" province="辽宁省" 210701 county="市辖区" prefecture="锦州市" province="辽宁省" 210702 county="古塔区" prefecture="锦州市" province="辽宁省" 210703 county="凌河区" prefecture="锦州市" province="辽宁省" 210711 county="太和区" prefecture="锦州市" province="辽宁省" 210726 county="黑山县" prefecture="锦州市" province="辽宁省" 210727 county="义县" prefecture="锦州市" province="辽宁省" 210781 county="凌海市" prefecture="锦州市" province="辽宁省" 210782 county="北镇市" prefecture="锦州市" province="辽宁省" 210801 county="市辖区" prefecture="营口市" province="辽宁省" 210802 county="站前区" prefecture="营口市" province="辽宁省" 210803 county="西市区" prefecture="营口市" province="辽宁省" 210804 county="鲅鱼圈区" prefecture="营口市" province="辽宁省" 210811 county="老边区" prefecture="营口市" province="辽宁省" 210881 county="盖州市" prefecture="营口市" province="辽宁省" 210882 county="大石桥市" prefecture="营口市" province="辽宁省" 210901 county="市辖区" prefecture="阜新市" province="辽宁省" 210902 county="海州区" prefecture="阜新市" province="辽宁省" 210903 county="新邱区" prefecture="阜新市" province="辽宁省" 210904 county="太平区" prefecture="阜新市" province="辽宁省" 210905 county="清河门区" prefecture="阜新市" province="辽宁省" 210911 county="细河区" prefecture="阜新市" province="辽宁省" 210921 county="阜新蒙古族自治县" prefecture="阜新市" province="辽宁省" 210922 county="彰武县" prefecture="阜新市" province="辽宁省" 211001 county="市辖区" prefecture="辽阳市" province="辽宁省" 211002 county="白塔区" prefecture="辽阳市" province="辽宁省" 211003 county="文圣区" prefecture="辽阳市" province="辽宁省" 211004 county="宏伟区" prefecture="辽阳市" province="辽宁省" 211005 county="弓长岭区" prefecture="辽阳市" province="辽宁省" 211011 county="太子河区" prefecture="辽阳市" province="辽宁省" 211021 county="辽阳县" prefecture="辽阳市" province="辽宁省" 211081 county="灯塔市" prefecture="辽阳市" province="辽宁省" 211101 county="市辖区" prefecture="盘锦市" province="辽宁省" 211102 county="双台子区" prefecture="盘锦市" province="辽宁省" 211103 county="兴隆台区" prefecture="盘锦市" province="辽宁省" 211121 county="大洼县" prefecture="盘锦市" province="辽宁省" 211122 county="盘山县" prefecture="盘锦市" province="辽宁省" 211201 county="市辖区" prefecture="铁岭市" province="辽宁省" 211202 county="银州区" prefecture="铁岭市" province="辽宁省" 211204 county="清河区" prefecture="铁岭市" province="辽宁省" 211221 county="铁岭县" prefecture="铁岭市" province="辽宁省" 211223 county="西丰县" prefecture="铁岭市" province="辽宁省" 211224 county="昌图县" prefecture="铁岭市" province="辽宁省" 211281 county="调兵山市" prefecture="铁岭市" province="辽宁省" 211282 county="开原市" prefecture="铁岭市" province="辽宁省" 211301 county="市辖区" prefecture="朝阳市" province="辽宁省" 211302 county="双塔区" prefecture="朝阳市" province="辽宁省" 211303 county="龙城区" prefecture="朝阳市" province="辽宁省" 211321 county="朝阳县" prefecture="朝阳市" province="辽宁省" 211322 county="建平县" prefecture="朝阳市" province="辽宁省" 211324 county="喀喇沁左翼蒙古族自治县" prefecture="朝阳市" province="辽宁省" 211381 county="北票市" prefecture="朝阳市" province="辽宁省" 211382 county="凌源市" prefecture="朝阳市" province="辽宁省" 211401 county="市辖区" prefecture="葫芦岛市" province="辽宁省" 211402 county="连山区" prefecture="葫芦岛市" province="辽宁省" 211403 county="龙港区" prefecture="葫芦岛市" province="辽宁省" 211404 county="南票区" prefecture="葫芦岛市" province="辽宁省" 211421 county="绥中县" prefecture="葫芦岛市" province="辽宁省" 211422 county="建昌县" prefecture="葫芦岛市" province="辽宁省" 211481 county="兴城市" prefecture="葫芦岛市" province="辽宁省" 220101 county="市辖区" prefecture="长春市" province="吉林省" 220102 county="南关区" prefecture="长春市" province="吉林省" 220103 county="宽城区" prefecture="长春市" province="吉林省" 220104 county="朝阳区" prefecture="长春市" province="吉林省" 220105 county="二道区" prefecture="长春市" province="吉林省" 220106 county="绿园区" prefecture="长春市" province="吉林省" 220112 county="双阳区" prefecture="长春市" province="吉林省" 220113 county="九台区" prefecture="长春市" province="吉林省" 220122 county="农安县" prefecture="长春市" province="吉林省" 220181 county="九台市" prefecture="长春市" province="吉林省" 220182 county="榆树市" prefecture="长春市" province="吉林省" 220183 county="德惠市" prefecture="长春市" province="吉林省" 220201 county="市辖区" prefecture="吉林市" province="吉林省" 220202 county="昌邑区" prefecture="吉林市" province="吉林省" 220203 county="龙潭区" prefecture="吉林市" province="吉林省" 220204 county="船营区" prefecture="吉林市" province="吉林省" 220211 county="丰满区" prefecture="吉林市" province="吉林省" 220221 county="永吉县" prefecture="吉林市" province="吉林省" 220281 county="蛟河市" prefecture="吉林市" province="吉林省" 220282 county="桦甸市" prefecture="吉林市" province="吉林省" 220283 county="舒兰市" prefecture="吉林市" province="吉林省" 220284 county="磐石市" prefecture="吉林市" province="吉林省" 220301 county="市辖区" prefecture="四平市" province="吉林省" 220302 county="铁西区" prefecture="四平市" province="吉林省" 220303 county="铁东区" prefecture="四平市" province="吉林省" 220322 county="梨树县" prefecture="四平市" province="吉林省" 220323 county="伊通满族自治县" prefecture="四平市" province="吉林省" 220381 county="公主岭市" prefecture="四平市" province="吉林省" 220382 county="双辽市" prefecture="四平市" province="吉林省" 220401 county="市辖区" prefecture="辽源市" province="吉林省" 220402 county="龙山区" prefecture="辽源市" province="吉林省" 220403 county="西安区" prefecture="辽源市" province="吉林省" 220421 county="东丰县" prefecture="辽源市" province="吉林省" 220422 county="东辽县" prefecture="辽源市" province="吉林省" 220501 county="市辖区" prefecture="通化市" province="吉林省" 220502 county="东昌区" prefecture="通化市" province="吉林省" 220503 county="二道江区" prefecture="通化市" province="吉林省" 220521 county="通化县" prefecture="通化市" province="吉林省" 220523 county="辉南县" prefecture="通化市" province="吉林省" 220524 county="柳河县" prefecture="通化市" province="吉林省" 220581 county="梅河口市" prefecture="通化市" province="吉林省" 220582 county="集安市" prefecture="通化市" province="吉林省" 220601 county="市辖区" prefecture="白山市" province="吉林省" 220602 county="浑江区" prefecture="白山市" province="吉林省" 220604 county="江源区" prefecture="白山市" province="吉林省" 220605 county="江源区" prefecture="白山市" province="吉林省" 220621 county="抚松县" prefecture="白山市" province="吉林省" 220622 county="靖宇县" prefecture="白山市" province="吉林省" 220623 county="长白朝鲜族自治县" prefecture="白山市" province="吉林省" 220625 county="江源县" prefecture="白山市" province="吉林省" 220681 county="临江市" prefecture="白山市" province="吉林省" 220701 county="市辖区" prefecture="松原市" province="吉林省" 220702 county="宁江区" prefecture="松原市" province="吉林省" 220721 county="前郭尔罗斯蒙古族自治县" prefecture="松原市" province="吉林省" 220722 county="长岭县" prefecture="松原市" province="吉林省" 220723 county="乾安县" prefecture="松原市" province="吉林省" 220724 county="扶余县" prefecture="松原市" province="吉林省" 220781 county="扶余市" prefecture="松原市" province="吉林省" 220801 county="市辖区" prefecture="白城市" province="吉林省" 220802 county="洮北区" prefecture="白城市" province="吉林省" 220821 county="镇赉县" prefecture="白城市" province="吉林省" 220822 county="通榆县" prefecture="白城市" province="吉林省" 220881 county="洮南市" prefecture="白城市" province="吉林省" 220882 county="大安市" prefecture="白城市" province="吉林省" 222401 county="延吉市" prefecture="延边朝鲜族自治州" province="吉林省" 222402 county="图们市" prefecture="延边朝鲜族自治州" province="吉林省" 222403 county="敦化市" prefecture="延边朝鲜族自治州" province="吉林省" 222404 county="珲春市" prefecture="延边朝鲜族自治州" province="吉林省" 222405 county="龙井市" prefecture="延边朝鲜族自治州" province="吉林省" 222406 county="和龙市" prefecture="延边朝鲜族自治州" province="吉林省" 222424 county="汪清县" prefecture="延边朝鲜族自治州" province="吉林省" 222426 county="安图县" prefecture="延边朝鲜族自治州" province="吉林省" 230101 county="市辖区" prefecture="哈尔滨市" province="黑龙江省" 230102 county="道里区" prefecture="哈尔滨市" province="黑龙江省" 230103 county="南岗区" prefecture="哈尔滨市" province="黑龙江省" 230104 county="道外区" prefecture="哈尔滨市" province="黑龙江省" 230105 county="太平区" prefecture="哈尔滨市" province="黑龙江省" 230106 county="香坊区" prefecture="哈尔滨市" province="黑龙江省" 230107 county="动力区" prefecture="哈尔滨市" province="黑龙江省" 230108 county="平房区" prefecture="哈尔滨市" province="黑龙江省" 230109 county="松北区" prefecture="哈尔滨市" province="黑龙江省" 230110 county="香坊区" prefecture="哈尔滨市" province="黑龙江省" 230111 county="呼兰区" prefecture="哈尔滨市" province="黑龙江省" 230112 county="阿城区" prefecture="哈尔滨市" province="黑龙江省" 230121 county="呼兰县" prefecture="哈尔滨市" province="黑龙江省" 230123 county="依兰县" prefecture="哈尔滨市" province="黑龙江省" 230124 county="方正县" prefecture="哈尔滨市" province="黑龙江省" 230125 county="宾县" prefecture="哈尔滨市" province="黑龙江省" 230126 county="巴彦县" prefecture="哈尔滨市" province="黑龙江省" 230127 county="木兰县" prefecture="哈尔滨市" province="黑龙江省" 230128 county="通河县" prefecture="哈尔滨市" province="黑龙江省" 230129 county="延寿县" prefecture="哈尔滨市" province="黑龙江省" 230181 county="阿城市" prefecture="哈尔滨市" province="黑龙江省" 230182 county="双城市" prefecture="哈尔滨市" province="黑龙江省" 230183 county="尚志市" prefecture="哈尔滨市" province="黑龙江省" 230184 county="五常市" prefecture="哈尔滨市" province="黑龙江省" 230201 county="市辖区" prefecture="齐齐哈尔市" province="黑龙江省" 230202 county="龙沙区" prefecture="齐齐哈尔市" province="黑龙江省" 230203 county="建华区" prefecture="齐齐哈尔市" province="黑龙江省" 230204 county="铁锋区" prefecture="齐齐哈尔市" province="黑龙江省" 230205 county="昂昂溪区" prefecture="齐齐哈尔市" province="黑龙江省" 230206 county="富拉尔基区" prefecture="齐齐哈尔市" province="黑龙江省" 230207 county="碾子山区" prefecture="齐齐哈尔市" province="黑龙江省" 230208 county="梅里斯达斡尔族区" prefecture="齐齐哈尔市" province="黑龙江省" 230221 county="龙江县" prefecture="齐齐哈尔市" province="黑龙江省" 230223 county="依安县" prefecture="齐齐哈尔市" province="黑龙江省" 230224 county="泰来县" prefecture="齐齐哈尔市" province="黑龙江省" 230225 county="甘南县" prefecture="齐齐哈尔市" province="黑龙江省" 230227 county="富裕县" prefecture="齐齐哈尔市" province="黑龙江省" 230229 county="克山县" prefecture="齐齐哈尔市" province="黑龙江省" 230230 county="克东县" prefecture="齐齐哈尔市" province="黑龙江省" 230231 county="拜泉县" prefecture="齐齐哈尔市" province="黑龙江省" 230281 county="讷河市" prefecture="齐齐哈尔市" province="黑龙江省" 230301 county="市辖区" prefecture="鸡西市" province="黑龙江省" 230302 county="鸡冠区" prefecture="鸡西市" province="黑龙江省" 230303 county="恒山区" prefecture="鸡西市" province="黑龙江省" 230304 county="滴道区" prefecture="鸡西市" province="黑龙江省" 230305 county="梨树区" prefecture="鸡西市" province="黑龙江省" 230306 county="城子河区" prefecture="鸡西市" province="黑龙江省" 230307 county="麻山区" prefecture="鸡西市" province="黑龙江省" 230321 county="鸡东县" prefecture="鸡西市" province="黑龙江省" 230381 county="虎林市" prefecture="鸡西市" province="黑龙江省" 230382 county="密山市" prefecture="鸡西市" province="黑龙江省" 230401 county="市辖区" prefecture="鹤岗市" province="黑龙江省" 230402 county="向阳区" prefecture="鹤岗市" province="黑龙江省" 230403 county="工农区" prefecture="鹤岗市" province="黑龙江省" 230404 county="南山区" prefecture="鹤岗市" province="黑龙江省" 230405 county="兴安区" prefecture="鹤岗市" province="黑龙江省" 230406 county="东山区" prefecture="鹤岗市" province="黑龙江省" 230407 county="兴山区" prefecture="鹤岗市" province="黑龙江省" 230421 county="萝北县" prefecture="鹤岗市" province="黑龙江省" 230422 county="绥滨县" prefecture="鹤岗市" province="黑龙江省" 230501 county="市辖区" prefecture="双鸭山市" province="黑龙江省" 230502 county="尖山区" prefecture="双鸭山市" province="黑龙江省" 230503 county="岭东区" prefecture="双鸭山市" province="黑龙江省" 230505 county="四方台区" prefecture="双鸭山市" province="黑龙江省" 230506 county="宝山区" prefecture="双鸭山市" province="黑龙江省" 230521 county="集贤县" prefecture="双鸭山市" province="黑龙江省" 230522 county="友谊县" prefecture="双鸭山市" province="黑龙江省" 230523 county="宝清县" prefecture="双鸭山市" province="黑龙江省" 230524 county="饶河县" prefecture="双鸭山市" province="黑龙江省" 230601 county="市辖区" prefecture="大庆市" province="黑龙江省" 230602 county="萨尔图区" prefecture="大庆市" province="黑龙江省" 230603 county="龙凤区" prefecture="大庆市" province="黑龙江省" 230604 county="让胡路区" prefecture="大庆市" province="黑龙江省" 230605 county="红岗区" prefecture="大庆市" province="黑龙江省" 230606 county="大同区" prefecture="大庆市" province="黑龙江省" 230621 county="肇州县" prefecture="大庆市" province="黑龙江省" 230622 county="肇源县" prefecture="大庆市" province="黑龙江省" 230623 county="林甸县" prefecture="大庆市" province="黑龙江省" 230624 county="杜尔伯特蒙古族自治县" prefecture="大庆市" province="黑龙江省" 230701 county="市辖区" prefecture="伊春市" province="黑龙江省" 230702 county="伊春区" prefecture="伊春市" province="黑龙江省" 230703 county="南岔区" prefecture="伊春市" province="黑龙江省" 230704 county="友好区" prefecture="伊春市" province="黑龙江省" 230705 county="西林区" prefecture="伊春市" province="黑龙江省" 230706 county="翠峦区" prefecture="伊春市" province="黑龙江省" 230707 county="新青区" prefecture="伊春市" province="黑龙江省" 230708 county="美溪区" prefecture="伊春市" province="黑龙江省" 230709 county="金山屯区" prefecture="伊春市" province="黑龙江省" 230710 county="五营区" prefecture="伊春市" province="黑龙江省" 230711 county="乌马河区" prefecture="伊春市" province="黑龙江省" 230712 county="汤旺河区" prefecture="伊春市" province="黑龙江省" 230713 county="带岭区" prefecture="伊春市" province="黑龙江省" 230714 county="乌伊岭区" prefecture="伊春市" province="黑龙江省" 230715 county="红星区" prefecture="伊春市" province="黑龙江省" 230716 county="上甘岭区" prefecture="伊春市" province="黑龙江省" 230722 county="嘉荫县" prefecture="伊春市" province="黑龙江省" 230781 county="铁力市" prefecture="伊春市" province="黑龙江省" 230801 county="市辖区" prefecture="佳木斯市" province="黑龙江省" 230802 county="永红区" prefecture="佳木斯市" province="黑龙江省" 230803 county="向阳区" prefecture="佳木斯市" province="黑龙江省" 230804 county="前进区" prefecture="佳木斯市" province="黑龙江省" 230805 county="东风区" prefecture="佳木斯市" province="黑龙江省" 230811 county="郊区" prefecture="佳木斯市" province="黑龙江省" 230822 county="桦南县" prefecture="佳木斯市" province="黑龙江省" 230826 county="桦川县" prefecture="佳木斯市" province="黑龙江省" 230828 county="汤原县" prefecture="佳木斯市" province="黑龙江省" 230833 county="抚远县" prefecture="佳木斯市" province="黑龙江省" 230881 county="同江市" prefecture="佳木斯市" province="黑龙江省" 230882 county="富锦市" prefecture="佳木斯市" province="黑龙江省" 230901 county="市辖区" prefecture="七台河市" province="黑龙江省" 230902 county="新兴区" prefecture="七台河市" province="黑龙江省" 230903 county="桃山区" prefecture="七台河市" province="黑龙江省" 230904 county="茄子河区" prefecture="七台河市" province="黑龙江省" 230921 county="勃利县" prefecture="七台河市" province="黑龙江省" 231001 county="市辖区" prefecture="牡丹江市" province="黑龙江省" 231002 county="东安区" prefecture="牡丹江市" province="黑龙江省" 231003 county="阳明区" prefecture="牡丹江市" province="黑龙江省" 231004 county="爱民区" prefecture="牡丹江市" province="黑龙江省" 231005 county="西安区" prefecture="牡丹江市" province="黑龙江省" 231024 county="东宁县" prefecture="牡丹江市" province="黑龙江省" 231025 county="林口县" prefecture="牡丹江市" province="黑龙江省" 231081 county="绥芬河市" prefecture="牡丹江市" province="黑龙江省" 231083 county="海林市" prefecture="牡丹江市" province="黑龙江省" 231084 county="宁安市" prefecture="牡丹江市" province="黑龙江省" 231085 county="穆棱市" prefecture="牡丹江市" province="黑龙江省" 231101 county="市辖区" prefecture="黑河市" province="黑龙江省" 231102 county="爱辉区" prefecture="黑河市" province="黑龙江省" 231121 county="嫩江县" prefecture="黑河市" province="黑龙江省" 231123 county="逊克县" prefecture="黑河市" province="黑龙江省" 231124 county="孙吴县" prefecture="黑河市" province="黑龙江省" 231181 county="北安市" prefecture="黑河市" province="黑龙江省" 231182 county="五大连池市" prefecture="黑河市" province="黑龙江省" 231201 county="市辖区" prefecture="绥化市" province="黑龙江省" 231202 county="北林区" prefecture="绥化市" province="黑龙江省" 231221 county="望奎县" prefecture="绥化市" province="黑龙江省" 231222 county="兰西县" prefecture="绥化市" province="黑龙江省" 231223 county="青冈县" prefecture="绥化市" province="黑龙江省" 231224 county="庆安县" prefecture="绥化市" province="黑龙江省" 231225 county="明水县" prefecture="绥化市" province="黑龙江省" 231226 county="绥棱县" prefecture="绥化市" province="黑龙江省" 231281 county="安达市" prefecture="绥化市" province="黑龙江省" 231282 county="肇东市" prefecture="绥化市" province="黑龙江省" 231283 county="海伦市" prefecture="绥化市" province="黑龙江省" 232701 county="加格达奇区" prefecture="大兴安岭地区" province="黑龙江省" 232702 county="松岭区" prefecture="大兴安岭地区" province="黑龙江省" 232703 county="新林区" prefecture="大兴安岭地区" province="黑龙江省" 232704 county="呼中区" prefecture="大兴安岭地区" province="黑龙江省" 232721 county="呼玛县" prefecture="大兴安岭地区" province="黑龙江省" 232722 county="塔河县" prefecture="大兴安岭地区" province="黑龙江省" 232723 county="漠河县" prefecture="大兴安岭地区" province="黑龙江省" 310101 county="黄浦区" prefecture="市辖区" province="上海市" 310103 county="卢湾区" prefecture="市辖区" province="上海市" 310104 county="徐汇区" prefecture="市辖区" province="上海市" 310105 county="长宁区" prefecture="市辖区" province="上海市" 310106 county="静安区" prefecture="市辖区" province="上海市" 310107 county="普陀区" prefecture="市辖区" province="上海市" 310108 county="闸北区" prefecture="市辖区" province="上海市" 310109 county="虹口区" prefecture="市辖区" province="上海市" 310110 county="杨浦区" prefecture="市辖区" province="上海市" 310112 county="闵行区" prefecture="市辖区" province="上海市" 310113 county="宝山区" prefecture="市辖区" province="上海市" 310114 county="嘉定区" prefecture="市辖区" province="上海市" 310115 county="浦东新区" prefecture="市辖区" province="上海市" 310116 county="金山区" prefecture="市辖区" province="上海市" 310117 county="松江区" prefecture="市辖区" province="上海市" 310118 county="青浦区" prefecture="市辖区" province="上海市" 310119 county="南汇区" prefecture="市辖区" province="上海市" 310120 county="奉贤区" prefecture="市辖区" province="上海市" 310230 county="崇明县" prefecture="县" province="上海市" 320101 county="市辖区" prefecture="南京市" province="江苏省" 320102 county="玄武区" prefecture="南京市" province="江苏省" 320103 county="白下区" prefecture="南京市" province="江苏省" 320104 county="秦淮区" prefecture="南京市" province="江苏省" 320105 county="建邺区" prefecture="南京市" province="江苏省" 320106 county="鼓楼区" prefecture="南京市" province="江苏省" 320107 county="下关区" prefecture="南京市" province="江苏省" 320111 county="浦口区" prefecture="南京市" province="江苏省" 320113 county="栖霞区" prefecture="南京市" province="江苏省" 320114 county="雨花台区" prefecture="南京市" province="江苏省" 320115 county="江宁区" prefecture="南京市" province="江苏省" 320116 county="六合区" prefecture="南京市" province="江苏省" 320117 county="溧水区" prefecture="南京市" province="江苏省" 320118 county="高淳区" prefecture="南京市" province="江苏省" 320124 county="溧水县" prefecture="南京市" province="江苏省" 320125 county="高淳县" prefecture="南京市" province="江苏省" 320201 county="市辖区" prefecture="无锡市" province="江苏省" 320202 county="崇安区" prefecture="无锡市" province="江苏省" 320203 county="南长区" prefecture="无锡市" province="江苏省" 320204 county="北塘区" prefecture="无锡市" province="江苏省" 320205 county="锡山区" prefecture="无锡市" province="江苏省" 320206 county="惠山区" prefecture="无锡市" province="江苏省" 320211 county="滨湖区" prefecture="无锡市" province="江苏省" 320281 county="江阴市" prefecture="无锡市" province="江苏省" 320282 county="宜兴市" prefecture="无锡市" province="江苏省" 320301 county="市辖区" prefecture="徐州市" province="江苏省" 320302 county="鼓楼区" prefecture="徐州市" province="江苏省" 320303 county="云龙区" prefecture="徐州市" province="江苏省" 320304 county="九里区" prefecture="徐州市" province="江苏省" 320305 county="贾汪区" prefecture="徐州市" province="江苏省" 320311 county="泉山区" prefecture="徐州市" province="江苏省" 320312 county="铜山区" prefecture="徐州市" province="江苏省" 320321 county="丰县" prefecture="徐州市" province="江苏省" 320322 county="沛县" prefecture="徐州市" province="江苏省" 320323 county="铜山县" prefecture="徐州市" province="江苏省" 320324 county="睢宁县" prefecture="徐州市" province="江苏省" 320381 county="新沂市" prefecture="徐州市" province="江苏省" 320382 county="邳州市" prefecture="徐州市" province="江苏省" 320401 county="市辖区" prefecture="常州市" province="江苏省" 320402 county="天宁区" prefecture="常州市" province="江苏省" 320404 county="钟楼区" prefecture="常州市" province="江苏省" 320405 county="戚墅堰区" prefecture="常州市" province="江苏省" 320411 county="新北区" prefecture="常州市" province="江苏省" 320412 county="武进区" prefecture="常州市" province="江苏省" 320481 county="溧阳市" prefecture="常州市" province="江苏省" 320482 county="金坛市" prefecture="常州市" province="江苏省" 320501 county="市辖区" prefecture="苏州市" province="江苏省" 320502 county="沧浪区" prefecture="苏州市" province="江苏省" 320503 county="平江区" prefecture="苏州市" province="江苏省" 320504 county="金阊区" prefecture="苏州市" province="江苏省" 320505 county="虎丘区" prefecture="苏州市" province="江苏省" 320506 county="吴中区" prefecture="苏州市" province="江苏省" 320507 county="相城区" prefecture="苏州市" province="江苏省" 320508 county="姑苏区" prefecture="苏州市" province="江苏省" 320509 county="吴江区" prefecture="苏州市" province="江苏省" 320581 county="常熟市" prefecture="苏州市" province="江苏省" 320582 county="张家港市" prefecture="苏州市" province="江苏省" 320583 county="昆山市" prefecture="苏州市" province="江苏省" 320584 county="吴江市" prefecture="苏州市" province="江苏省" 320585 county="太仓市" prefecture="苏州市" province="江苏省" 320601 county="市辖区" prefecture="南通市" province="江苏省" 320602 county="崇川区" prefecture="南通市" province="江苏省" 320611 county="港闸区" prefecture="南通市" province="江苏省" 320612 county="通州区" prefecture="南通市" province="江苏省" 320621 county="海安县" prefecture="南通市" province="江苏省" 320623 county="如东县" prefecture="南通市" province="江苏省" 320681 county="启东市" prefecture="南通市" province="江苏省" 320682 county="如皋市" prefecture="南通市" province="江苏省" 320683 county="通州市" prefecture="南通市" province="江苏省" 320684 county="海门市" prefecture="南通市" province="江苏省" 320701 county="市辖区" prefecture="连云港市" province="江苏省" 320703 county="连云区" prefecture="连云港市" province="江苏省" 320705 county="新浦区" prefecture="连云港市" province="江苏省" 320706 county="海州区" prefecture="连云港市" province="江苏省" 320707 county="赣榆区" prefecture="连云港市" province="江苏省" 320721 county="赣榆县" prefecture="连云港市" province="江苏省" 320722 county="东海县" prefecture="连云港市" province="江苏省" 320723 county="灌云县" prefecture="连云港市" province="江苏省" 320724 county="灌南县" prefecture="连云港市" province="江苏省" 320801 county="市辖区" prefecture="淮安市" province="江苏省" 320802 county="清河区" prefecture="淮安市" province="江苏省" 320803 county="淮安区" prefecture="淮安市" province="江苏省" 320804 county="淮阴区" prefecture="淮安市" province="江苏省" 320811 county="清浦区" prefecture="淮安市" province="江苏省" 320826 county="涟水县" prefecture="淮安市" province="江苏省" 320829 county="洪泽县" prefecture="淮安市" province="江苏省" 320830 county="盱眙县" prefecture="淮安市" province="江苏省" 320831 county="金湖县" prefecture="淮安市" province="江苏省" 320901 county="市辖区" prefecture="盐城市" province="江苏省" 320902 county="亭湖区" prefecture="盐城市" province="江苏省" 320903 county="盐都区" prefecture="盐城市" province="江苏省" 320921 county="响水县" prefecture="盐城市" province="江苏省" 320922 county="滨海县" prefecture="盐城市" province="江苏省" 320923 county="阜宁县" prefecture="盐城市" province="江苏省" 320924 county="射阳县" prefecture="盐城市" province="江苏省" 320925 county="建湖县" prefecture="盐城市" province="江苏省" 320928 county="盐都县" prefecture="盐城市" province="江苏省" 320981 county="东台市" prefecture="盐城市" province="江苏省" 320982 county="大丰市" prefecture="盐城市" province="江苏省" 321001 county="市辖区" prefecture="扬州市" province="江苏省" 321002 county="广陵区" prefecture="扬州市" province="江苏省" 321003 county="邗江区" prefecture="扬州市" province="江苏省" 321011 county="维扬区" prefecture="扬州市" province="江苏省" 321012 county="江都区" prefecture="扬州市" province="江苏省" 321023 county="宝应县" prefecture="扬州市" province="江苏省" 321081 county="仪征市" prefecture="扬州市" province="江苏省" 321084 county="高邮市" prefecture="扬州市" province="江苏省" 321088 county="江都市" prefecture="扬州市" province="江苏省" 321101 county="市辖区" prefecture="镇江市" province="江苏省" 321102 county="京口区" prefecture="镇江市" province="江苏省" 321111 county="润州区" prefecture="镇江市" province="江苏省" 321112 county="丹徒区" prefecture="镇江市" province="江苏省" 321181 county="丹阳市" prefecture="镇江市" province="江苏省" 321182 county="扬中市" prefecture="镇江市" province="江苏省" 321183 county="句容市" prefecture="镇江市" province="江苏省" 321201 county="市辖区" prefecture="泰州市" province="江苏省" 321202 county="海陵区" prefecture="泰州市" province="江苏省" 321203 county="高港区" prefecture="泰州市" province="江苏省" 321204 county="姜堰区" prefecture="泰州市" province="江苏省" 321281 county="兴化市" prefecture="泰州市" province="江苏省" 321282 county="靖江市" prefecture="泰州市" province="江苏省" 321283 county="泰兴市" prefecture="泰州市" province="江苏省" 321284 county="姜堰市" prefecture="泰州市" province="江苏省" 321301 county="市辖区" prefecture="宿迁市" province="江苏省" 321302 county="宿城区" prefecture="宿迁市" province="江苏省" 321311 county="宿豫区" prefecture="宿迁市" province="江苏省" 321321 county="宿豫县" prefecture="宿迁市" province="江苏省" 321322 county="沭阳县" prefecture="宿迁市" province="江苏省" 321323 county="泗阳县" prefecture="宿迁市" province="江苏省" 321324 county="泗洪县" prefecture="宿迁市" province="江苏省" 330101 county="市辖区" prefecture="杭州市" province="浙江省" 330102 county="上城区" prefecture="杭州市" province="浙江省" 330103 county="下城区" prefecture="杭州市" province="浙江省" 330104 county="江干区" prefecture="杭州市" province="浙江省" 330105 county="拱墅区" prefecture="杭州市" province="浙江省" 330106 county="西湖区" prefecture="杭州市" province="浙江省" 330108 county="滨江区" prefecture="杭州市" province="浙江省" 330109 county="萧山区" prefecture="杭州市" province="浙江省" 330110 county="余杭区" prefecture="杭州市" province="浙江省" 330122 county="桐庐县" prefecture="杭州市" province="浙江省" 330127 county="淳安县" prefecture="杭州市" province="浙江省" 330182 county="建德市" prefecture="杭州市" province="浙江省" 330183 county="富阳市" prefecture="杭州市" province="浙江省" 330185 county="临安市" prefecture="杭州市" province="浙江省" 330201 county="市辖区" prefecture="宁波市" province="浙江省" 330203 county="海曙区" prefecture="宁波市" province="浙江省" 330204 county="江东区" prefecture="宁波市" province="浙江省" 330205 county="江北区" prefecture="宁波市" province="浙江省" 330206 county="北仑区" prefecture="宁波市" province="浙江省" 330211 county="镇海区" prefecture="宁波市" province="浙江省" 330212 county="鄞州区" prefecture="宁波市" province="浙江省" 330225 county="象山县" prefecture="宁波市" province="浙江省" 330226 county="宁海县" prefecture="宁波市" province="浙江省" 330281 county="余姚市" prefecture="宁波市" province="浙江省" 330282 county="慈溪市" prefecture="宁波市" province="浙江省" 330283 county="奉化市" prefecture="宁波市" province="浙江省" 330301 county="市辖区" prefecture="温州市" province="浙江省" 330302 county="鹿城区" prefecture="温州市" province="浙江省" 330303 county="龙湾区" prefecture="温州市" province="浙江省" 330304 county="瓯海区" prefecture="温州市" province="浙江省" 330322 county="洞头县" prefecture="温州市" province="浙江省" 330324 county="永嘉县" prefecture="温州市" province="浙江省" 330326 county="平阳县" prefecture="温州市" province="浙江省" 330327 county="苍南县" prefecture="温州市" province="浙江省" 330328 county="文成县" prefecture="温州市" province="浙江省" 330329 county="泰顺县" prefecture="温州市" province="浙江省" 330381 county="瑞安市" prefecture="温州市" province="浙江省" 330382 county="乐清市" prefecture="温州市" province="浙江省" 330401 county="市辖区" prefecture="嘉兴市" province="浙江省" 330402 county="南湖区" prefecture="嘉兴市" province="浙江省" 330411 county="秀洲区" prefecture="嘉兴市" province="浙江省" 330421 county="嘉善县" prefecture="嘉兴市" province="浙江省" 330424 county="海盐县" prefecture="嘉兴市" province="浙江省" 330481 county="海宁市" prefecture="嘉兴市" province="浙江省" 330482 county="平湖市" prefecture="嘉兴市" province="浙江省" 330483 county="桐乡市" prefecture="嘉兴市" province="浙江省" 330501 county="市辖区" prefecture="湖州市" province="浙江省" 330502 county="吴兴区" prefecture="湖州市" province="浙江省" 330503 county="南浔区" prefecture="湖州市" province="浙江省" 330521 county="德清县" prefecture="湖州市" province="浙江省" 330522 county="长兴县" prefecture="湖州市" province="浙江省" 330523 county="安吉县" prefecture="湖州市" province="浙江省" 330601 county="市辖区" prefecture="绍兴市" province="浙江省" 330602 county="越城区" prefecture="绍兴市" province="浙江省" 330603 county="柯桥区" prefecture="绍兴市" province="浙江省" 330604 county="上虞区" prefecture="绍兴市" province="浙江省" 330621 county="绍兴县" prefecture="绍兴市" province="浙江省" 330624 county="新昌县" prefecture="绍兴市" province="浙江省" 330681 county="诸暨市" prefecture="绍兴市" province="浙江省" 330682 county="上虞市" prefecture="绍兴市" province="浙江省" 330683 county="嵊州市" prefecture="绍兴市" province="浙江省" 330701 county="市辖区" prefecture="金华市" province="浙江省" 330702 county="婺城区" prefecture="金华市" province="浙江省" 330703 county="金东区" prefecture="金华市" province="浙江省" 330723 county="武义县" prefecture="金华市" province="浙江省" 330726 county="浦江县" prefecture="金华市" province="浙江省" 330727 county="磐安县" prefecture="金华市" province="浙江省" 330781 county="兰溪市" prefecture="金华市" province="浙江省" 330782 county="义乌市" prefecture="金华市" province="浙江省" 330783 county="东阳市" prefecture="金华市" province="浙江省" 330784 county="永康市" prefecture="金华市" province="浙江省" 330801 county="市辖区" prefecture="衢州市" province="浙江省" 330802 county="柯城区" prefecture="衢州市" province="浙江省" 330803 county="衢江区" prefecture="衢州市" province="浙江省" 330822 county="常山县" prefecture="衢州市" province="浙江省" 330824 county="开化县" prefecture="衢州市" province="浙江省" 330825 county="龙游县" prefecture="衢州市" province="浙江省" 330881 county="江山市" prefecture="衢州市" province="浙江省" 330901 county="市辖区" prefecture="舟山市" province="浙江省" 330902 county="定海区" prefecture="舟山市" province="浙江省" 330903 county="普陀区" prefecture="舟山市" province="浙江省" 330921 county="岱山县" prefecture="舟山市" province="浙江省" 330922 county="嵊泗县" prefecture="舟山市" province="浙江省" 331001 county="市辖区" prefecture="台州市" province="浙江省" 331002 county="椒江区" prefecture="台州市" province="浙江省" 331003 county="黄岩区" prefecture="台州市" province="浙江省" 331004 county="路桥区" prefecture="台州市" province="浙江省" 331021 county="玉环县" prefecture="台州市" province="浙江省" 331022 county="三门县" prefecture="台州市" province="浙江省" 331023 county="天台县" prefecture="台州市" province="浙江省" 331024 county="仙居县" prefecture="台州市" province="浙江省" 331081 county="温岭市" prefecture="台州市" province="浙江省" 331082 county="临海市" prefecture="台州市" province="浙江省" 331101 county="市辖区" prefecture="丽水市" province="浙江省" 331102 county="莲都区" prefecture="丽水市" province="浙江省" 331121 county="青田县" prefecture="丽水市" province="浙江省" 331122 county="缙云县" prefecture="丽水市" province="浙江省" 331123 county="遂昌县" prefecture="丽水市" province="浙江省" 331124 county="松阳县" prefecture="丽水市" province="浙江省" 331125 county="云和县" prefecture="丽水市" province="浙江省" 331126 county="庆元县" prefecture="丽水市" province="浙江省" 331127 county="景宁畲族自治县" prefecture="丽水市" province="浙江省" 331181 county="龙泉市" prefecture="丽水市" province="浙江省" 340101 county="市辖区" prefecture="合肥市" province="安徽省" 340102 county="瑶海区" prefecture="合肥市" province="安徽省" 340103 county="庐阳区" prefecture="合肥市" province="安徽省" 340104 county="蜀山区" prefecture="合肥市" province="安徽省" 340111 county="包河区" prefecture="合肥市" province="安徽省" 340121 county="长丰县" prefecture="合肥市" province="安徽省" 340122 county="肥东县" prefecture="合肥市" province="安徽省" 340123 county="肥西县" prefecture="合肥市" province="安徽省" 340124 county="庐江县" prefecture="合肥市" province="安徽省" 340181 county="巢湖市" prefecture="合肥市" province="安徽省" 340201 county="市辖区" prefecture="芜湖市" province="安徽省" 340202 county="镜湖区" prefecture="芜湖市" province="安徽省" 340203 county="弋江区" prefecture="芜湖市" province="安徽省" 340204 county="新芜区" prefecture="芜湖市" province="安徽省" 340207 county="鸠江区" prefecture="芜湖市" province="安徽省" 340208 county="三山区" prefecture="芜湖市" province="安徽省" 340221 county="芜湖县" prefecture="芜湖市" province="安徽省" 340222 county="繁昌县" prefecture="芜湖市" province="安徽省" 340223 county="南陵县" prefecture="芜湖市" province="安徽省" 340225 county="无为县" prefecture="芜湖市" province="安徽省" 340301 county="市辖区" prefecture="蚌埠市" province="安徽省" 340302 county="龙子湖区" prefecture="蚌埠市" province="安徽省" 340303 county="蚌山区" prefecture="蚌埠市" province="安徽省" 340304 county="禹会区" prefecture="蚌埠市" province="安徽省" 340311 county="淮上区" prefecture="蚌埠市" province="安徽省" 340321 county="怀远县" prefecture="蚌埠市" province="安徽省" 340322 county="五河县" prefecture="蚌埠市" province="安徽省" 340323 county="固镇县" prefecture="蚌埠市" province="安徽省" 340401 county="市辖区" prefecture="淮南市" province="安徽省" 340402 county="大通区" prefecture="淮南市" province="安徽省" 340403 county="田家庵区" prefecture="淮南市" province="安徽省" 340404 county="谢家集区" prefecture="淮南市" province="安徽省" 340405 county="八公山区" prefecture="淮南市" province="安徽省" 340406 county="潘集区" prefecture="淮南市" province="安徽省" 340421 county="凤台县" prefecture="淮南市" province="安徽省" 340501 county="市辖区" prefecture="马鞍山市" province="安徽省" 340502 county="金家庄区" prefecture="马鞍山市" province="安徽省" 340503 county="花山区" prefecture="马鞍山市" province="安徽省" 340504 county="雨山区" prefecture="马鞍山市" province="安徽省" 340506 county="博望区" prefecture="马鞍山市" province="安徽省" 340521 county="当涂县" prefecture="马鞍山市" province="安徽省" 340522 county="含山县" prefecture="马鞍山市" province="安徽省" 340523 county="和县" prefecture="马鞍山市" province="安徽省" 340601 county="市辖区" prefecture="淮北市" province="安徽省" 340602 county="杜集区" prefecture="淮北市" province="安徽省" 340603 county="相山区" prefecture="淮北市" province="安徽省" 340604 county="烈山区" prefecture="淮北市" province="安徽省" 340621 county="濉溪县" prefecture="淮北市" province="安徽省" 340701 county="市辖区" prefecture="铜陵市" province="安徽省" 340702 county="铜官山区" prefecture="铜陵市" province="安徽省" 340703 county="狮子山区" prefecture="铜陵市" province="安徽省" 340711 county="郊区" prefecture="铜陵市" province="安徽省" 340721 county="铜陵县" prefecture="铜陵市" province="安徽省" 340801 county="市辖区" prefecture="安庆市" province="安徽省" 340802 county="迎江区" prefecture="安庆市" province="安徽省" 340803 county="大观区" prefecture="安庆市" province="安徽省" 340811 county="宜秀区" prefecture="安庆市" province="安徽省" 340822 county="怀宁县" prefecture="安庆市" province="安徽省" 340823 county="枞阳县" prefecture="安庆市" province="安徽省" 340824 county="潜山县" prefecture="安庆市" province="安徽省" 340825 county="太湖县" prefecture="安庆市" province="安徽省" 340826 county="宿松县" prefecture="安庆市" province="安徽省" 340827 county="望江县" prefecture="安庆市" province="安徽省" 340828 county="岳西县" prefecture="安庆市" province="安徽省" 340881 county="桐城市" prefecture="安庆市" province="安徽省" 341001 county="市辖区" prefecture="黄山市" province="安徽省" 341002 county="屯溪区" prefecture="黄山市" province="安徽省" 341003 county="黄山区" prefecture="黄山市" province="安徽省" 341004 county="徽州区" prefecture="黄山市" province="安徽省" 341021 county="歙县" prefecture="黄山市" province="安徽省" 341022 county="休宁县" prefecture="黄山市" province="安徽省" 341023 county="黟县" prefecture="黄山市" province="安徽省" 341024 county="祁门县" prefecture="黄山市" province="安徽省" 341101 county="市辖区" prefecture="滁州市" province="安徽省" 341102 county="琅琊区" prefecture="滁州市" province="安徽省" 341103 county="南谯区" prefecture="滁州市" province="安徽省" 341122 county="来安县" prefecture="滁州市" province="安徽省" 341124 county="全椒县" prefecture="滁州市" province="安徽省" 341125 county="定远县" prefecture="滁州市" province="安徽省" 341126 county="凤阳县" prefecture="滁州市" province="安徽省" 341181 county="天长市" prefecture="滁州市" province="安徽省" 341182 county="明光市" prefecture="滁州市" province="安徽省" 341201 county="市辖区" prefecture="阜阳市" province="安徽省" 341202 county="颍州区" prefecture="阜阳市" province="安徽省" 341203 county="颍东区" prefecture="阜阳市" province="安徽省" 341204 county="颍泉区" prefecture="阜阳市" province="安徽省" 341221 county="临泉县" prefecture="阜阳市" province="安徽省" 341222 county="太和县" prefecture="阜阳市" province="安徽省" 341225 county="阜南县" prefecture="阜阳市" province="安徽省" 341226 county="颍上县" prefecture="阜阳市" province="安徽省" 341282 county="界首市" prefecture="阜阳市" province="安徽省" 341301 county="市辖区" prefecture="宿州市" province="安徽省" 341302 county="埇桥区" prefecture="宿州市" province="安徽省" 341321 county="砀山县" prefecture="宿州市" province="安徽省" 341322 county="萧县" prefecture="宿州市" province="安徽省" 341323 county="灵璧县" prefecture="宿州市" province="安徽省" 341324 county="泗县" prefecture="宿州市" province="安徽省" 341401 county="市辖区" prefecture="巢湖市" province="安徽省" 341402 county="居巢区" prefecture="巢湖市" province="安徽省" 341421 county="庐江县" prefecture="巢湖市" province="安徽省" 341422 county="无为县" prefecture="巢湖市" province="安徽省" 341423 county="含山县" prefecture="巢湖市" province="安徽省" 341424 county="和县" prefecture="巢湖市" province="安徽省" 341501 county="市辖区" prefecture="六安市" province="安徽省" 341502 county="金安区" prefecture="六安市" province="安徽省" 341503 county="裕安区" prefecture="六安市" province="安徽省" 341521 county="寿县" prefecture="六安市" province="安徽省" 341522 county="霍邱县" prefecture="六安市" province="安徽省" 341523 county="舒城县" prefecture="六安市" province="安徽省" 341524 county="金寨县" prefecture="六安市" province="安徽省" 341525 county="霍山县" prefecture="六安市" province="安徽省" 341601 county="市辖区" prefecture="亳州市" province="安徽省" 341602 county="谯城区" prefecture="亳州市" province="安徽省" 341621 county="涡阳县" prefecture="亳州市" province="安徽省" 341622 county="蒙城县" prefecture="亳州市" province="安徽省" 341623 county="利辛县" prefecture="亳州市" province="安徽省" 341701 county="市辖区" prefecture="池州市" province="安徽省" 341702 county="贵池区" prefecture="池州市" province="安徽省" 341721 county="东至县" prefecture="池州市" province="安徽省" 341722 county="石台县" prefecture="池州市" province="安徽省" 341723 county="青阳县" prefecture="池州市" province="安徽省" 341801 county="市辖区" prefecture="宣城市" province="安徽省" 341802 county="宣州区" prefecture="宣城市" province="安徽省" 341821 county="郎溪县" prefecture="宣城市" province="安徽省" 341822 county="广德县" prefecture="宣城市" province="安徽省" 341823 county="泾县" prefecture="宣城市" province="安徽省" 341824 county="绩溪县" prefecture="宣城市" province="安徽省" 341825 county="旌德县" prefecture="宣城市" province="安徽省" 341881 county="宁国市" prefecture="宣城市" province="安徽省" 350101 county="市辖区" prefecture="福州市" province="福建省" 350102 county="鼓楼区" prefecture="福州市" province="福建省" 350103 county="台江区" prefecture="福州市" province="福建省" 350104 county="仓山区" prefecture="福州市" province="福建省" 350105 county="马尾区" prefecture="福州市" province="福建省" 350111 county="晋安区" prefecture="福州市" province="福建省" 350121 county="闽侯县" prefecture="福州市" province="福建省" 350122 county="连江县" prefecture="福州市" province="福建省" 350123 county="罗源县" prefecture="福州市" province="福建省" 350124 county="闽清县" prefecture="福州市" province="福建省" 350125 county="永泰县" prefecture="福州市" province="福建省" 350128 county="平潭县" prefecture="福州市" province="福建省" 350181 county="福清市" prefecture="福州市" province="福建省" 350182 county="长乐市" prefecture="福州市" province="福建省" 350201 county="市辖区" prefecture="厦门市" province="福建省" 350202 county="鼓浪屿区" prefecture="厦门市" province="福建省" 350203 county="思明区" prefecture="厦门市" province="福建省" 350204 county="开元区" prefecture="厦门市" province="福建省" 350205 county="海沧区" prefecture="厦门市" province="福建省" 350206 county="湖里区" prefecture="厦门市" province="福建省" 350211 county="集美区" prefecture="厦门市" province="福建省" 350212 county="同安区" prefecture="厦门市" province="福建省" 350213 county="翔安区" prefecture="厦门市" province="福建省" 350301 county="市辖区" prefecture="莆田市" province="福建省" 350302 county="城厢区" prefecture="莆田市" province="福建省" 350303 county="涵江区" prefecture="莆田市" province="福建省" 350304 county="荔城区" prefecture="莆田市" province="福建省" 350305 county="秀屿区" prefecture="莆田市" province="福建省" 350322 county="仙游县" prefecture="莆田市" province="福建省" 350401 county="市辖区" prefecture="三明市" province="福建省" 350402 county="梅列区" prefecture="三明市" province="福建省" 350403 county="三元区" prefecture="三明市" province="福建省" 350421 county="明溪县" prefecture="三明市" province="福建省" 350423 county="清流县" prefecture="三明市" province="福建省" 350424 county="宁化县" prefecture="三明市" province="福建省" 350425 county="大田县" prefecture="三明市" province="福建省" 350426 county="尤溪县" prefecture="三明市" province="福建省" 350427 county="沙县" prefecture="三明市" province="福建省" 350428 county="将乐县" prefecture="三明市" province="福建省" 350429 county="泰宁县" prefecture="三明市" province="福建省" 350430 county="建宁县" prefecture="三明市" province="福建省" 350481 county="永安市" prefecture="三明市" province="福建省" 350501 county="市辖区" prefecture="泉州市" province="福建省" 350502 county="鲤城区" prefecture="泉州市" province="福建省" 350503 county="丰泽区" prefecture="泉州市" province="福建省" 350504 county="洛江区" prefecture="泉州市" province="福建省" 350505 county="泉港区" prefecture="泉州市" province="福建省" 350521 county="惠安县" prefecture="泉州市" province="福建省" 350524 county="安溪县" prefecture="泉州市" province="福建省" 350525 county="永春县" prefecture="泉州市" province="福建省" 350526 county="德化县" prefecture="泉州市" province="福建省" 350527 county="金门县" prefecture="泉州市" province="福建省" 350581 county="石狮市" prefecture="泉州市" province="福建省" 350582 county="晋江市" prefecture="泉州市" province="福建省" 350583 county="南安市" prefecture="泉州市" province="福建省" 350601 county="市辖区" prefecture="漳州市" province="福建省" 350602 county="芗城区" prefecture="漳州市" province="福建省" 350603 county="龙文区" prefecture="漳州市" province="福建省" 350622 county="云霄县" prefecture="漳州市" province="福建省" 350623 county="漳浦县" prefecture="漳州市" province="福建省" 350624 county="诏安县" prefecture="漳州市" province="福建省" 350625 county="长泰县" prefecture="漳州市" province="福建省" 350626 county="东山县" prefecture="漳州市" province="福建省" 350627 county="南靖县" prefecture="漳州市" province="福建省" 350628 county="平和县" prefecture="漳州市" province="福建省" 350629 county="华安县" prefecture="漳州市" province="福建省" 350681 county="龙海市" prefecture="漳州市" province="福建省" 350701 county="市辖区" prefecture="南平市" province="福建省" 350702 county="延平区" prefecture="南平市" province="福建省" 350721 county="顺昌县" prefecture="南平市" province="福建省" 350722 county="浦城县" prefecture="南平市" province="福建省" 350723 county="光泽县" prefecture="南平市" province="福建省" 350724 county="松溪县" prefecture="南平市" province="福建省" 350725 county="政和县" prefecture="南平市" province="福建省" 350781 county="邵武市" prefecture="南平市" province="福建省" 350782 county="武夷山市" prefecture="南平市" province="福建省" 350783 county="建瓯市" prefecture="南平市" province="福建省" 350784 county="建阳市" prefecture="南平市" province="福建省" 350801 county="市辖区" prefecture="龙岩市" province="福建省" 350802 county="新罗区" prefecture="龙岩市" province="福建省" 350821 county="长汀县" prefecture="龙岩市" province="福建省" 350822 county="永定县" prefecture="龙岩市" province="福建省" 350823 county="上杭县" prefecture="龙岩市" province="福建省" 350824 county="武平县" prefecture="龙岩市" province="福建省" 350825 county="连城县" prefecture="龙岩市" province="福建省" 350881 county="漳平市" prefecture="龙岩市" province="福建省" 350901 county="市辖区" prefecture="宁德市" province="福建省" 350902 county="蕉城区" prefecture="宁德市" province="福建省" 350921 county="霞浦县" prefecture="宁德市" province="福建省" 350922 county="古田县" prefecture="宁德市" province="福建省" 350923 county="屏南县" prefecture="宁德市" province="福建省" 350924 county="寿宁县" prefecture="宁德市" province="福建省" 350925 county="周宁县" prefecture="宁德市" province="福建省" 350926 county="柘荣县" prefecture="宁德市" province="福建省" 350981 county="福安市" prefecture="宁德市" province="福建省" 350982 county="福鼎市" prefecture="宁德市" province="福建省" 360101 county="市辖区" prefecture="南昌市" province="江西省" 360102 county="东湖区" prefecture="南昌市" province="江西省" 360103 county="西湖区" prefecture="南昌市" province="江西省" 360104 county="青云谱区" prefecture="南昌市" province="江西省" 360105 county="湾里区" prefecture="南昌市" province="江西省" 360111 county="青山湖区" prefecture="南昌市" province="江西省" 360121 county="南昌县" prefecture="南昌市" province="江西省" 360122 county="新建县" prefecture="南昌市" province="江西省" 360123 county="安义县" prefecture="南昌市" province="江西省" 360124 county="进贤县" prefecture="南昌市" province="江西省" 360201 county="市辖区" prefecture="景德镇市" province="江西省" 360202 county="昌江区" prefecture="景德镇市" province="江西省" 360203 county="珠山区" prefecture="景德镇市" province="江西省" 360222 county="浮梁县" prefecture="景德镇市" province="江西省" 360281 county="乐平市" prefecture="景德镇市" province="江西省" 360301 county="市辖区" prefecture="萍乡市" province="江西省" 360302 county="安源区" prefecture="萍乡市" province="江西省" 360313 county="湘东区" prefecture="萍乡市" province="江西省" 360321 county="莲花县" prefecture="萍乡市" province="江西省" 360322 county="上栗县" prefecture="萍乡市" province="江西省" 360323 county="芦溪县" prefecture="萍乡市" province="江西省" 360401 county="市辖区" prefecture="九江市" province="江西省" 360402 county="庐山区" prefecture="九江市" province="江西省" 360403 county="浔阳区" prefecture="九江市" province="江西省" 360421 county="九江县" prefecture="九江市" province="江西省" 360423 county="武宁县" prefecture="九江市" province="江西省" 360424 county="修水县" prefecture="九江市" province="江西省" 360425 county="永修县" prefecture="九江市" province="江西省" 360426 county="德安县" prefecture="九江市" province="江西省" 360427 county="星子县" prefecture="九江市" province="江西省" 360428 county="都昌县" prefecture="九江市" province="江西省" 360429 county="湖口县" prefecture="九江市" province="江西省" 360430 county="彭泽县" prefecture="九江市" province="江西省" 360481 county="瑞昌市" prefecture="九江市" province="江西省" 360482 county="共青城市" prefecture="九江市" province="江西省" 360501 county="市辖区" prefecture="新余市" province="江西省" 360502 county="渝水区" prefecture="新余市" province="江西省" 360521 county="分宜县" prefecture="新余市" province="江西省" 360601 county="市辖区" prefecture="鹰潭市" province="江西省" 360602 county="月湖区" prefecture="鹰潭市" province="江西省" 360622 county="余江县" prefecture="鹰潭市" province="江西省" 360681 county="贵溪市" prefecture="鹰潭市" province="江西省" 360701 county="市辖区" prefecture="赣州市" province="江西省" 360702 county="章贡区" prefecture="赣州市" province="江西省" 360703 county="南康区" prefecture="赣州市" province="江西省" 360721 county="赣县" prefecture="赣州市" province="江西省" 360722 county="信丰县" prefecture="赣州市" province="江西省" 360723 county="大余县" prefecture="赣州市" province="江西省" 360724 county="上犹县" prefecture="赣州市" province="江西省" 360725 county="崇义县" prefecture="赣州市" province="江西省" 360726 county="安远县" prefecture="赣州市" province="江西省" 360727 county="龙南县" prefecture="赣州市" province="江西省" 360728 county="定南县" prefecture="赣州市" province="江西省" 360729 county="全南县" prefecture="赣州市" province="江西省" 360730 county="宁都县" prefecture="赣州市" province="江西省" 360731 county="于都县" prefecture="赣州市" province="江西省" 360732 county="兴国县" prefecture="赣州市" province="江西省" 360733 county="会昌县" prefecture="赣州市" province="江西省" 360734 county="寻乌县" prefecture="赣州市" province="江西省" 360735 county="石城县" prefecture="赣州市" province="江西省" 360781 county="瑞金市" prefecture="赣州市" province="江西省" 360782 county="南康市" prefecture="赣州市" province="江西省" 360801 county="市辖区" prefecture="吉安市" province="江西省" 360802 county="吉州区" prefecture="吉安市" province="江西省" 360803 county="青原区" prefecture="吉安市" province="江西省" 360821 county="吉安县" prefecture="吉安市" province="江西省" 360822 county="吉水县" prefecture="吉安市" province="江西省" 360823 county="峡江县" prefecture="吉安市" province="江西省" 360824 county="新干县" prefecture="吉安市" province="江西省" 360825 county="永丰县" prefecture="吉安市" province="江西省" 360826 county="泰和县" prefecture="吉安市" province="江西省" 360827 county="遂川县" prefecture="吉安市" province="江西省" 360828 county="万安县" prefecture="吉安市" province="江西省" 360829 county="安福县" prefecture="吉安市" province="江西省" 360830 county="永新县" prefecture="吉安市" province="江西省" 360881 county="井冈山市" prefecture="吉安市" province="江西省" 360901 county="市辖区" prefecture="宜春市" province="江西省" 360902 county="袁州区" prefecture="宜春市" province="江西省" 360921 county="奉新县" prefecture="宜春市" province="江西省" 360922 county="万载县" prefecture="宜春市" province="江西省" 360923 county="上高县" prefecture="宜春市" province="江西省" 360924 county="宜丰县" prefecture="宜春市" province="江西省" 360925 county="靖安县" prefecture="宜春市" province="江西省" 360926 county="铜鼓县" prefecture="宜春市" province="江西省" 360981 county="丰城市" prefecture="宜春市" province="江西省" 360982 county="樟树市" prefecture="宜春市" province="江西省" 360983 county="高安市" prefecture="宜春市" province="江西省" 361001 county="市辖区" prefecture="抚州市" province="江西省" 361002 county="临川区" prefecture="抚州市" province="江西省" 361021 county="南城县" prefecture="抚州市" province="江西省" 361022 county="黎川县" prefecture="抚州市" province="江西省" 361023 county="南丰县" prefecture="抚州市" province="江西省" 361024 county="崇仁县" prefecture="抚州市" province="江西省" 361025 county="乐安县" prefecture="抚州市" province="江西省" 361026 county="宜黄县" prefecture="抚州市" province="江西省" 361027 county="金溪县" prefecture="抚州市" province="江西省" 361028 county="资溪县" prefecture="抚州市" province="江西省" 361029 county="东乡县" prefecture="抚州市" province="江西省" 361030 county="广昌县" prefecture="抚州市" province="江西省" 361101 county="市辖区" prefecture="上饶市" province="江西省" 361102 county="信州区" prefecture="上饶市" province="江西省" 361121 county="上饶县" prefecture="上饶市" province="江西省" 361122 county="广丰县" prefecture="上饶市" province="江西省" 361123 county="玉山县" prefecture="上饶市" province="江西省" 361124 county="铅山县" prefecture="上饶市" province="江西省" 361125 county="横峰县" prefecture="上饶市" province="江西省" 361126 county="弋阳县" prefecture="上饶市" province="江西省" 361127 county="余干县" prefecture="上饶市" province="江西省" 361128 county="鄱阳县" prefecture="上饶市" province="江西省" 361129 county="万年县" prefecture="上饶市" province="江西省" 361130 county="婺源县" prefecture="上饶市" province="江西省" 361181 county="德兴市" prefecture="上饶市" province="江西省" 370101 county="市辖区" prefecture="济南市" province="山东省" 370102 county="历下区" prefecture="济南市" province="山东省" 370103 county="市中区" prefecture="济南市" province="山东省" 370104 county="槐荫区" prefecture="济南市" province="山东省" 370105 county="天桥区" prefecture="济南市" province="山东省" 370112 county="历城区" prefecture="济南市" province="山东省" 370113 county="长清区" prefecture="济南市" province="山东省" 370124 county="平阴县" prefecture="济南市" province="山东省" 370125 county="济阳县" prefecture="济南市" province="山东省" 370126 county="商河县" prefecture="济南市" province="山东省" 370181 county="章丘市" prefecture="济南市" province="山东省" 370201 county="市辖区" prefecture="青岛市" province="山东省" 370202 county="市南区" prefecture="青岛市" province="山东省" 370203 county="市北区" prefecture="青岛市" province="山东省" 370205 county="四方区" prefecture="青岛市" province="山东省" 370211 county="黄岛区" prefecture="青岛市" province="山东省" 370212 county="崂山区" prefecture="青岛市" province="山东省" 370213 county="李沧区" prefecture="青岛市" province="山东省" 370214 county="城阳区" prefecture="青岛市" province="山东省" 370281 county="胶州市" prefecture="青岛市" province="山东省" 370282 county="即墨市" prefecture="青岛市" province="山东省" 370283 county="平度市" prefecture="青岛市" province="山东省" 370284 county="胶南市" prefecture="青岛市" province="山东省" 370285 county="莱西市" prefecture="青岛市" province="山东省" 370301 county="市辖区" prefecture="淄博市" province="山东省" 370302 county="淄川区" prefecture="淄博市" province="山东省" 370303 county="张店区" prefecture="淄博市" province="山东省" 370304 county="博山区" prefecture="淄博市" province="山东省" 370305 county="临淄区" prefecture="淄博市" province="山东省" 370306 county="周村区" prefecture="淄博市" province="山东省" 370321 county="桓台县" prefecture="淄博市" province="山东省" 370322 county="高青县" prefecture="淄博市" province="山东省" 370323 county="沂源县" prefecture="淄博市" province="山东省" 370401 county="市辖区" prefecture="枣庄市" province="山东省" 370402 county="市中区" prefecture="枣庄市" province="山东省" 370403 county="薛城区" prefecture="枣庄市" province="山东省" 370404 county="峄城区" prefecture="枣庄市" province="山东省" 370405 county="台儿庄区" prefecture="枣庄市" province="山东省" 370406 county="山亭区" prefecture="枣庄市" province="山东省" 370481 county="滕州市" prefecture="枣庄市" province="山东省" 370501 county="市辖区" prefecture="东营市" province="山东省" 370502 county="东营区" prefecture="东营市" province="山东省" 370503 county="河口区" prefecture="东营市" province="山东省" 370521 county="垦利县" prefecture="东营市" province="山东省" 370522 county="利津县" prefecture="东营市" province="山东省" 370523 county="广饶县" prefecture="东营市" province="山东省" 370601 county="市辖区" prefecture="烟台市" province="山东省" 370602 county="芝罘区" prefecture="烟台市" province="山东省" 370611 county="福山区" prefecture="烟台市" province="山东省" 370612 county="牟平区" prefecture="烟台市" province="山东省" 370613 county="莱山区" prefecture="烟台市" province="山东省" 370634 county="长岛县" prefecture="烟台市" province="山东省" 370681 county="龙口市" prefecture="烟台市" province="山东省" 370682 county="莱阳市" prefecture="烟台市" province="山东省" 370683 county="莱州市" prefecture="烟台市" province="山东省" 370684 county="蓬莱市" prefecture="烟台市" province="山东省" 370685 county="招远市" prefecture="烟台市" province="山东省" 370686 county="栖霞市" prefecture="烟台市" province="山东省" 370687 county="海阳市" prefecture="烟台市" province="山东省" 370701 county="市辖区" prefecture="潍坊市" province="山东省" 370702 county="潍城区" prefecture="潍坊市" province="山东省" 370703 county="寒亭区" prefecture="潍坊市" province="山东省" 370704 county="坊子区" prefecture="潍坊市" province="山东省" 370705 county="奎文区" prefecture="潍坊市" province="山东省" 370724 county="临朐县" prefecture="潍坊市" province="山东省" 370725 county="昌乐县" prefecture="潍坊市" province="山东省" 370781 county="青州市" prefecture="潍坊市" province="山东省" 370782 county="诸城市" prefecture="潍坊市" province="山东省" 370783 county="寿光市" prefecture="潍坊市" province="山东省" 370784 county="安丘市" prefecture="潍坊市" province="山东省" 370785 county="高密市" prefecture="潍坊市" province="山东省" 370786 county="昌邑市" prefecture="潍坊市" province="山东省" 370801 county="市辖区" prefecture="济宁市" province="山东省" 370802 county="市中区" prefecture="济宁市" province="山东省" 370811 county="任城区" prefecture="济宁市" province="山东省" 370812 county="兖州区" prefecture="济宁市" province="山东省" 370826 county="微山县" prefecture="济宁市" province="山东省" 370827 county="鱼台县" prefecture="济宁市" province="山东省" 370828 county="金乡县" prefecture="济宁市" province="山东省" 370829 county="嘉祥县" prefecture="济宁市" province="山东省" 370830 county="汶上县" prefecture="济宁市" province="山东省" 370831 county="泗水县" prefecture="济宁市" province="山东省" 370832 county="梁山县" prefecture="济宁市" province="山东省" 370881 county="曲阜市" prefecture="济宁市" province="山东省" 370882 county="兖州市" prefecture="济宁市" province="山东省" 370883 county="邹城市" prefecture="济宁市" province="山东省" 370901 county="市辖区" prefecture="泰安市" province="山东省" 370902 county="泰山区" prefecture="泰安市" province="山东省" 370903 county="岱岳区" prefecture="泰安市" province="山东省" 370911 county="岱岳区" prefecture="泰安市" province="山东省" 370921 county="宁阳县" prefecture="泰安市" province="山东省" 370923 county="东平县" prefecture="泰安市" province="山东省" 370982 county="新泰市" prefecture="泰安市" province="山东省" 370983 county="肥城市" prefecture="泰安市" province="山东省" 371001 county="市辖区" prefecture="威海市" province="山东省" 371002 county="环翠区" prefecture="威海市" province="山东省" 371003 county="文登区" prefecture="威海市" province="山东省" 371081 county="文登市" prefecture="威海市" province="山东省" 371082 county="荣成市" prefecture="威海市" province="山东省" 371083 county="乳山市" prefecture="威海市" province="山东省" 371101 county="市辖区" prefecture="日照市" province="山东省" 371102 county="东港区" prefecture="日照市" province="山东省" 371103 county="岚山区" prefecture="日照市" province="山东省" 371121 county="五莲县" prefecture="日照市" province="山东省" 371122 county="莒县" prefecture="日照市" province="山东省" 371201 county="市辖区" prefecture="莱芜市" province="山东省" 371202 county="莱城区" prefecture="莱芜市" province="山东省" 371203 county="钢城区" prefecture="莱芜市" province="山东省" 371301 county="市辖区" prefecture="临沂市" province="山东省" 371302 county="兰山区" prefecture="临沂市" province="山东省" 371311 county="罗庄区" prefecture="临沂市" province="山东省" 371312 county="河东区" prefecture="临沂市" province="山东省" 371321 county="沂南县" prefecture="临沂市" province="山东省" 371322 county="郯城县" prefecture="临沂市" province="山东省" 371323 county="沂水县" prefecture="临沂市" province="山东省" 371324 county="兰陵县" prefecture="临沂市" province="山东省" 371325 county="费县" prefecture="临沂市" province="山东省" 371326 county="平邑县" prefecture="临沂市" province="山东省" 371327 county="莒南县" prefecture="临沂市" province="山东省" 371328 county="蒙阴县" prefecture="临沂市" province="山东省" 371329 county="临沭县" prefecture="临沂市" province="山东省" 371401 county="市辖区" prefecture="德州市" province="山东省" 371402 county="德城区" prefecture="德州市" province="山东省" 371403 county="陵城区" prefecture="德州市" province="山东省" 371421 county="陵县" prefecture="德州市" province="山东省" 371422 county="宁津县" prefecture="德州市" province="山东省" 371423 county="庆云县" prefecture="德州市" province="山东省" 371424 county="临邑县" prefecture="德州市" province="山东省" 371425 county="齐河县" prefecture="德州市" province="山东省" 371426 county="平原县" prefecture="德州市" province="山东省" 371427 county="夏津县" prefecture="德州市" province="山东省" 371428 county="武城县" prefecture="德州市" province="山东省" 371481 county="乐陵市" prefecture="德州市" province="山东省" 371482 county="禹城市" prefecture="德州市" province="山东省" 371501 county="市辖区" prefecture="聊城市" province="山东省" 371502 county="东昌府区" prefecture="聊城市" province="山东省" 371521 county="阳谷县" prefecture="聊城市" province="山东省" 371522 county="莘县" prefecture="聊城市" province="山东省" 371523 county="茌平县" prefecture="聊城市" province="山东省" 371524 county="东阿县" prefecture="聊城市" province="山东省" 371525 county="冠县" prefecture="聊城市" province="山东省" 371526 county="高唐县" prefecture="聊城市" province="山东省" 371581 county="临清市" prefecture="聊城市" province="山东省" 371601 county="市辖区" prefecture="滨州市" province="山东省" 371602 county="滨城区" prefecture="滨州市" province="山东省" 371603 county="沾化区" prefecture="滨州市" province="山东省" 371621 county="惠民县" prefecture="滨州市" province="山东省" 371622 county="阳信县" prefecture="滨州市" province="山东省" 371623 county="无棣县" prefecture="滨州市" province="山东省" 371624 county="沾化县" prefecture="滨州市" province="山东省" 371625 county="博兴县" prefecture="滨州市" province="山东省" 371626 county="邹平县" prefecture="滨州市" province="山东省" 371701 county="市辖区" prefecture="菏泽市" province="山东省" 371702 county="牡丹区" prefecture="菏泽市" province="山东省" 371721 county="曹县" prefecture="菏泽市" province="山东省" 371722 county="单县" prefecture="菏泽市" province="山东省" 371723 county="成武县" prefecture="菏泽市" province="山东省" 371724 county="巨野县" prefecture="菏泽市" province="山东省" 371725 county="郓城县" prefecture="菏泽市" province="山东省" 371726 county="鄄城县" prefecture="菏泽市" province="山东省" 371727 county="定陶县" prefecture="菏泽市" province="山东省" 371728 county="东明县" prefecture="菏泽市" province="山东省" 410101 county="市辖区" prefecture="郑州市" province="河南省" 410102 county="中原区" prefecture="郑州市" province="河南省" 410103 county="二七区" prefecture="郑州市" province="河南省" 410104 county="管城回族区" prefecture="郑州市" province="河南省" 410105 county="金水区" prefecture="郑州市" province="河南省" 410106 county="上街区" prefecture="郑州市" province="河南省" 410108 county="惠济区" prefecture="郑州市" province="河南省" 410122 county="中牟县" prefecture="郑州市" province="河南省" 410181 county="巩义市" prefecture="郑州市" province="河南省" 410182 county="荥阳市" prefecture="郑州市" province="河南省" 410183 county="新密市" prefecture="郑州市" province="河南省" 410184 county="新郑市" prefecture="郑州市" province="河南省" 410185 county="登封市" prefecture="郑州市" province="河南省" 410201 county="市辖区" prefecture="开封市" province="河南省" 410202 county="龙亭区" prefecture="开封市" province="河南省" 410203 county="顺河回族区" prefecture="开封市" province="河南省" 410204 county="鼓楼区" prefecture="开封市" province="河南省" 410205 county="禹王台区" prefecture="开封市" province="河南省" 410211 county="金明区" prefecture="开封市" province="河南省" 410221 county="杞县" prefecture="开封市" province="河南省" 410222 county="通许县" prefecture="开封市" province="河南省" 410223 county="尉氏县" prefecture="开封市" province="河南省" 410224 county="开封县" prefecture="开封市" province="河南省" 410225 county="兰考县" prefecture="开封市" province="河南省" 410301 county="市辖区" prefecture="洛阳市" province="河南省" 410302 county="老城区" prefecture="洛阳市" province="河南省" 410303 county="西工区" prefecture="洛阳市" province="河南省" 410304 county="瀍河回族区" prefecture="洛阳市" province="河南省" 410305 county="涧西区" prefecture="洛阳市" province="河南省" 410306 county="吉利区" prefecture="洛阳市" province="河南省" 410307 county="洛龙区" prefecture="洛阳市" province="河南省" 410311 county="洛龙区" prefecture="洛阳市" province="河南省" 410322 county="孟津县" prefecture="洛阳市" province="河南省" 410323 county="新安县" prefecture="洛阳市" province="河南省" 410324 county="栾川县" prefecture="洛阳市" province="河南省" 410325 county="嵩县" prefecture="洛阳市" province="河南省" 410326 county="汝阳县" prefecture="洛阳市" province="河南省" 410327 county="宜阳县" prefecture="洛阳市" province="河南省" 410328 county="洛宁县" prefecture="洛阳市" province="河南省" 410329 county="伊川县" prefecture="洛阳市" province="河南省" 410381 county="偃师市" prefecture="洛阳市" province="河南省" 410401 county="市辖区" prefecture="平顶山市" province="河南省" 410402 county="新华区" prefecture="平顶山市" province="河南省" 410403 county="卫东区" prefecture="平顶山市" province="河南省" 410404 county="石龙区" prefecture="平顶山市" province="河南省" 410411 county="湛河区" prefecture="平顶山市" province="河南省" 410421 county="宝丰县" prefecture="平顶山市" province="河南省" 410422 county="叶县" prefecture="平顶山市" province="河南省" 410423 county="鲁山县" prefecture="平顶山市" province="河南省" 410425 county="郏县" prefecture="平顶山市" province="河南省" 410481 county="舞钢市" prefecture="平顶山市" province="河南省" 410482 county="汝州市" prefecture="平顶山市" province="河南省" 410501 county="市辖区" prefecture="安阳市" province="河南省" 410502 county="文峰区" prefecture="安阳市" province="河南省" 410503 county="北关区" prefecture="安阳市" province="河南省" 410505 county="殷都区" prefecture="安阳市" province="河南省" 410506 county="龙安区" prefecture="安阳市" province="河南省" 410522 county="安阳县" prefecture="安阳市" province="河南省" 410523 county="汤阴县" prefecture="安阳市" province="河南省" 410526 county="滑县" prefecture="安阳市" province="河南省" 410527 county="内黄县" prefecture="安阳市" province="河南省" 410581 county="林州市" prefecture="安阳市" province="河南省" 410601 county="市辖区" prefecture="鹤壁市" province="河南省" 410602 county="鹤山区" prefecture="鹤壁市" province="河南省" 410603 county="山城区" prefecture="鹤壁市" province="河南省" 410611 county="淇滨区" prefecture="鹤壁市" province="河南省" 410621 county="浚县" prefecture="鹤壁市" province="河南省" 410622 county="淇县" prefecture="鹤壁市" province="河南省" 410701 county="市辖区" prefecture="新乡市" province="河南省" 410702 county="红旗区" prefecture="新乡市" province="河南省" 410703 county="卫滨区" prefecture="新乡市" province="河南省" 410704 county="凤泉区" prefecture="新乡市" province="河南省" 410711 county="牧野区" prefecture="新乡市" province="河南省" 410721 county="新乡县" prefecture="新乡市" province="河南省" 410724 county="获嘉县" prefecture="新乡市" province="河南省" 410725 county="原阳县" prefecture="新乡市" province="河南省" 410726 county="延津县" prefecture="新乡市" province="河南省" 410727 county="封丘县" prefecture="新乡市" province="河南省" 410728 county="长垣县" prefecture="新乡市" province="河南省" 410781 county="卫辉市" prefecture="新乡市" province="河南省" 410782 county="辉县市" prefecture="新乡市" province="河南省" 410801 county="市辖区" prefecture="焦作市" province="河南省" 410802 county="解放区" prefecture="焦作市" province="河南省" 410803 county="中站区" prefecture="焦作市" province="河南省" 410804 county="马村区" prefecture="焦作市" province="河南省" 410811 county="山阳区" prefecture="焦作市" province="河南省" 410821 county="修武县" prefecture="焦作市" province="河南省" 410822 county="博爱县" prefecture="焦作市" province="河南省" 410823 county="武陟县" prefecture="焦作市" province="河南省" 410825 county="温县" prefecture="焦作市" province="河南省" 410881 county="济源市" prefecture="焦作市" province="河南省" 410882 county="沁阳市" prefecture="焦作市" province="河南省" 410883 county="孟州市" prefecture="焦作市" province="河南省" 410901 county="市辖区" prefecture="濮阳市" province="河南省" 410902 county="华龙区" prefecture="濮阳市" province="河南省" 410922 county="清丰县" prefecture="濮阳市" province="河南省" 410923 county="南乐县" prefecture="濮阳市" province="河南省" 410926 county="范县" prefecture="濮阳市" province="河南省" 410927 county="台前县" prefecture="濮阳市" province="河南省" 410928 county="濮阳县" prefecture="濮阳市" province="河南省" 411001 county="市辖区" prefecture="许昌市" province="河南省" 411002 county="魏都区" prefecture="许昌市" province="河南省" 411023 county="许昌县" prefecture="许昌市" province="河南省" 411024 county="鄢陵县" prefecture="许昌市" province="河南省" 411025 county="襄城县" prefecture="许昌市" province="河南省" 411081 county="禹州市" prefecture="许昌市" province="河南省" 411082 county="长葛市" prefecture="许昌市" province="河南省" 411101 county="市辖区" prefecture="漯河市" province="河南省" 411102 county="源汇区" prefecture="漯河市" province="河南省" 411103 county="郾城区" prefecture="漯河市" province="河南省" 411104 county="召陵区" prefecture="漯河市" province="河南省" 411121 county="舞阳县" prefecture="漯河市" province="河南省" 411122 county="临颍县" prefecture="漯河市" province="河南省" 411123 county="郾城县" prefecture="漯河市" province="河南省" 411201 county="市辖区" prefecture="三门峡市" province="河南省" 411202 county="湖滨区" prefecture="三门峡市" province="河南省" 411221 county="渑池县" prefecture="三门峡市" province="河南省" 411222 county="陕县" prefecture="三门峡市" province="河南省" 411224 county="卢氏县" prefecture="三门峡市" province="河南省" 411281 county="义马市" prefecture="三门峡市" province="河南省" 411282 county="灵宝市" prefecture="三门峡市" province="河南省" 411301 county="市辖区" prefecture="南阳市" province="河南省" 411302 county="宛城区" prefecture="南阳市" province="河南省" 411303 county="卧龙区" prefecture="南阳市" province="河南省" 411321 county="南召县" prefecture="南阳市" province="河南省" 411322 county="方城县" prefecture="南阳市" province="河南省" 411323 county="西峡县" prefecture="南阳市" province="河南省" 411324 county="镇平县" prefecture="南阳市" province="河南省" 411325 county="内乡县" prefecture="南阳市" province="河南省" 411326 county="淅川县" prefecture="南阳市" province="河南省" 411327 county="社旗县" prefecture="南阳市" province="河南省" 411328 county="唐河县" prefecture="南阳市" province="河南省" 411329 county="新野县" prefecture="南阳市" province="河南省" 411330 county="桐柏县" prefecture="南阳市" province="河南省" 411381 county="邓州市" prefecture="南阳市" province="河南省" 411401 county="市辖区" prefecture="商丘市" province="河南省" 411402 county="梁园区" prefecture="商丘市" province="河南省" 411403 county="睢阳区" prefecture="商丘市" province="河南省" 411421 county="民权县" prefecture="商丘市" province="河南省" 411422 county="睢县" prefecture="商丘市" province="河南省" 411423 county="宁陵县" prefecture="商丘市" province="河南省" 411424 county="柘城县" prefecture="商丘市" province="河南省" 411425 county="虞城县" prefecture="商丘市" province="河南省" 411426 county="夏邑县" prefecture="商丘市" province="河南省" 411481 county="永城市" prefecture="商丘市" province="河南省" 411501 county="市辖区" prefecture="信阳市" province="河南省" 411502 county="浉河区" prefecture="信阳市" province="河南省" 411503 county="平桥区" prefecture="信阳市" province="河南省" 411521 county="罗山县" prefecture="信阳市" province="河南省" 411522 county="光山县" prefecture="信阳市" province="河南省" 411523 county="新县" prefecture="信阳市" province="河南省" 411524 county="商城县" prefecture="信阳市" province="河南省" 411525 county="固始县" prefecture="信阳市" province="河南省" 411526 county="潢川县" prefecture="信阳市" province="河南省" 411527 county="淮滨县" prefecture="信阳市" province="河南省" 411528 county="息县" prefecture="信阳市" province="河南省" 411601 county="市辖区" prefecture="周口市" province="河南省" 411602 county="川汇区" prefecture="周口市" province="河南省" 411621 county="扶沟县" prefecture="周口市" province="河南省" 411622 county="西华县" prefecture="周口市" province="河南省" 411623 county="商水县" prefecture="周口市" province="河南省" 411624 county="沈丘县" prefecture="周口市" province="河南省" 411625 county="郸城县" prefecture="周口市" province="河南省" 411626 county="淮阳县" prefecture="周口市" province="河南省" 411627 county="太康县" prefecture="周口市" province="河南省" 411628 county="鹿邑县" prefecture="周口市" province="河南省" 411681 county="项城市" prefecture="周口市" province="河南省" 411701 county="市辖区" prefecture="驻马店市" province="河南省" 411702 county="驿城区" prefecture="驻马店市" province="河南省" 411721 county="西平县" prefecture="驻马店市" province="河南省" 411722 county="上蔡县" prefecture="驻马店市" province="河南省" 411723 county="平舆县" prefecture="驻马店市" province="河南省" 411724 county="正阳县" prefecture="驻马店市" province="河南省" 411725 county="确山县" prefecture="驻马店市" province="河南省" 411726 county="泌阳县" prefecture="驻马店市" province="河南省" 411727 county="汝南县" prefecture="驻马店市" province="河南省" 411728 county="遂平县" prefecture="驻马店市" province="河南省" 411729 county="新蔡县" prefecture="驻马店市" province="河南省" 419001 county="济源市" prefecture="省直辖县级行政区划" province="河南省" 420101 county="市辖区" prefecture="武汉市" province="湖北省" 420102 county="江岸区" prefecture="武汉市" province="湖北省" 420103 county="江汉区" prefecture="武汉市" province="湖北省" 420104 county="硚口区" prefecture="武汉市" province="湖北省" 420105 county="汉阳区" prefecture="武汉市" province="湖北省" 420106 county="武昌区" prefecture="武汉市" province="湖北省" 420107 county="青山区" prefecture="武汉市" province="湖北省" 420111 county="洪山区" prefecture="武汉市" province="湖北省" 420112 county="东西湖区" prefecture="武汉市" province="湖北省" 420113 county="汉南区" prefecture="武汉市" province="湖北省" 420114 county="蔡甸区" prefecture="武汉市" province="湖北省" 420115 county="江夏区" prefecture="武汉市" province="湖北省" 420116 county="黄陂区" prefecture="武汉市" province="湖北省" 420117 county="新洲区" prefecture="武汉市" province="湖北省" 420201 county="市辖区" prefecture="黄石市" province="湖北省" 420202 county="黄石港区" prefecture="黄石市" province="湖北省" 420203 county="西塞山区" prefecture="黄石市" province="湖北省" 420204 county="下陆区" prefecture="黄石市" province="湖北省" 420205 county="铁山区" prefecture="黄石市" province="湖北省" 420222 county="阳新县" prefecture="黄石市" province="湖北省" 420281 county="大冶市" prefecture="黄石市" province="湖北省" 420301 county="市辖区" prefecture="十堰市" province="湖北省" 420302 county="茅箭区" prefecture="十堰市" province="湖北省" 420303 county="张湾区" prefecture="十堰市" province="湖北省" 420304 county="郧阳区" prefecture="十堰市" province="湖北省" 420321 county="郧县" prefecture="十堰市" province="湖北省" 420322 county="郧西县" prefecture="十堰市" province="湖北省" 420323 county="竹山县" prefecture="十堰市" province="湖北省" 420324 county="竹溪县" prefecture="十堰市" province="湖北省" 420325 county="房县" prefecture="十堰市" province="湖北省" 420381 county="丹江口市" prefecture="十堰市" province="湖北省" 420501 county="市辖区" prefecture="宜昌市" province="湖北省" 420502 county="西陵区" prefecture="宜昌市" province="湖北省" 420503 county="伍家岗区" prefecture="宜昌市" province="湖北省" 420504 county="点军区" prefecture="宜昌市" province="湖北省" 420505 county="猇亭区" prefecture="宜昌市" province="湖北省" 420506 county="夷陵区" prefecture="宜昌市" province="湖北省" 420525 county="远安县" prefecture="宜昌市" province="湖北省" 420526 county="兴山县" prefecture="宜昌市" province="湖北省" 420527 county="秭归县" prefecture="宜昌市" province="湖北省" 420528 county="长阳土家族自治县" prefecture="宜昌市" province="湖北省" 420529 county="五峰土家族自治县" prefecture="宜昌市" province="湖北省" 420581 county="宜都市" prefecture="宜昌市" province="湖北省" 420582 county="当阳市" prefecture="宜昌市" province="湖北省" 420583 county="枝江市" prefecture="宜昌市" province="湖北省" 420601 county="市辖区" prefecture="襄阳市" province="湖北省" 420602 county="襄城区" prefecture="襄阳市" province="湖北省" 420606 county="樊城区" prefecture="襄阳市" province="湖北省" 420607 county="襄州区" prefecture="襄阳市" province="湖北省" 420624 county="南漳县" prefecture="襄阳市" province="湖北省" 420625 county="谷城县" prefecture="襄阳市" province="湖北省" 420626 county="保康县" prefecture="襄阳市" province="湖北省" 420682 county="老河口市" prefecture="襄阳市" province="湖北省" 420683 county="枣阳市" prefecture="襄阳市" province="湖北省" 420684 county="宜城市" prefecture="襄阳市" province="湖北省" 420701 county="市辖区" prefecture="鄂州市" province="湖北省" 420702 county="梁子湖区" prefecture="鄂州市" province="湖北省" 420703 county="华容区" prefecture="鄂州市" province="湖北省" 420704 county="鄂城区" prefecture="鄂州市" province="湖北省" 420801 county="市辖区" prefecture="荆门市" province="湖北省" 420802 county="东宝区" prefecture="荆门市" province="湖北省" 420804 county="掇刀区" prefecture="荆门市" province="湖北省" 420821 county="京山县" prefecture="荆门市" province="湖北省" 420822 county="沙洋县" prefecture="荆门市" province="湖北省" 420881 county="钟祥市" prefecture="荆门市" province="湖北省" 420901 county="市辖区" prefecture="孝感市" province="湖北省" 420902 county="孝南区" prefecture="孝感市" province="湖北省" 420921 county="孝昌县" prefecture="孝感市" province="湖北省" 420922 county="大悟县" prefecture="孝感市" province="湖北省" 420923 county="云梦县" prefecture="孝感市" province="湖北省" 420981 county="应城市" prefecture="孝感市" province="湖北省" 420982 county="安陆市" prefecture="孝感市" province="湖北省" 420984 county="汉川市" prefecture="孝感市" province="湖北省" 421001 county="市辖区" prefecture="荆州市" province="湖北省" 421002 county="沙市区" prefecture="荆州市" province="湖北省" 421003 county="荆州区" prefecture="荆州市" province="湖北省" 421022 county="公安县" prefecture="荆州市" province="湖北省" 421023 county="监利县" prefecture="荆州市" province="湖北省" 421024 county="江陵县" prefecture="荆州市" province="湖北省" 421081 county="石首市" prefecture="荆州市" province="湖北省" 421083 county="洪湖市" prefecture="荆州市" province="湖北省" 421087 county="松滋市" prefecture="荆州市" province="湖北省" 421101 county="市辖区" prefecture="黄冈市" province="湖北省" 421102 county="黄州区" prefecture="黄冈市" province="湖北省" 421121 county="团风县" prefecture="黄冈市" province="湖北省" 421122 county="红安县" prefecture="黄冈市" province="湖北省" 421123 county="罗田县" prefecture="黄冈市" province="湖北省" 421124 county="英山县" prefecture="黄冈市" province="湖北省" 421125 county="浠水县" prefecture="黄冈市" province="湖北省" 421126 county="蕲春县" prefecture="黄冈市" province="湖北省" 421127 county="黄梅县" prefecture="黄冈市" province="湖北省" 421181 county="麻城市" prefecture="黄冈市" province="湖北省" 421182 county="武穴市" prefecture="黄冈市" province="湖北省" 421201 county="市辖区" prefecture="咸宁市" province="湖北省" 421202 county="咸安区" prefecture="咸宁市" province="湖北省" 421221 county="嘉鱼县" prefecture="咸宁市" province="湖北省" 421222 county="通城县" prefecture="咸宁市" province="湖北省" 421223 county="崇阳县" prefecture="咸宁市" province="湖北省" 421224 county="通山县" prefecture="咸宁市" province="湖北省" 421281 county="赤壁市" prefecture="咸宁市" province="湖北省" 421301 county="市辖区" prefecture="随州市" province="湖北省" 421302 county="曾都区" prefecture="随州市" province="湖北省" 421303 county="曾都区" prefecture="随州市" province="湖北省" 421321 county="随县" prefecture="随州市" province="湖北省" 421381 county="广水市" prefecture="随州市" province="湖北省" 422801 county="恩施市" prefecture="恩施土家族苗族自治州" province="湖北省" 422802 county="利川市" prefecture="恩施土家族苗族自治州" province="湖北省" 422822 county="建始县" prefecture="恩施土家族苗族自治州" province="湖北省" 422823 county="巴东县" prefecture="恩施土家族苗族自治州" province="湖北省" 422825 county="宣恩县" prefecture="恩施土家族苗族自治州" province="湖北省" 422826 county="咸丰县" prefecture="恩施土家族苗族自治州" province="湖北省" 422827 county="来凤县" prefecture="恩施土家族苗族自治州" province="湖北省" 422828 county="鹤峰县" prefecture="恩施土家族苗族自治州" province="湖北省" 429004 county="仙桃市" prefecture="省直辖县级行政区划" province="湖北省" 429005 county="潜江市" prefecture="省直辖县级行政区划" province="湖北省" 429006 county="天门市" prefecture="省直辖县级行政区划" province="湖北省" 429021 county="神农架林区" prefecture="省直辖县级行政区划" province="湖北省" 430101 county="市辖区" prefecture="长沙市" province="湖南省" 430102 county="芙蓉区" prefecture="长沙市" province="湖南省" 430103 county="天心区" prefecture="长沙市" province="湖南省" 430104 county="岳麓区" prefecture="长沙市" province="湖南省" 430105 county="开福区" prefecture="长沙市" province="湖南省" 430111 county="雨花区" prefecture="长沙市" province="湖南省" 430112 county="望城区" prefecture="长沙市" province="湖南省" 430121 county="长沙县" prefecture="长沙市" province="湖南省" 430122 county="望城县" prefecture="长沙市" province="湖南省" 430124 county="宁乡县" prefecture="长沙市" province="湖南省" 430181 county="浏阳市" prefecture="长沙市" province="湖南省" 430201 county="市辖区" prefecture="株洲市" province="湖南省" 430202 county="荷塘区" prefecture="株洲市" province="湖南省" 430203 county="芦淞区" prefecture="株洲市" province="湖南省" 430204 county="石峰区" prefecture="株洲市" province="湖南省" 430211 county="天元区" prefecture="株洲市" province="湖南省" 430221 county="株洲县" prefecture="株洲市" province="湖南省" 430223 county="攸县" prefecture="株洲市" province="湖南省" 430224 county="茶陵县" prefecture="株洲市" province="湖南省" 430225 county="炎陵县" prefecture="株洲市" province="湖南省" 430281 county="醴陵市" prefecture="株洲市" province="湖南省" 430301 county="市辖区" prefecture="湘潭市" province="湖南省" 430302 county="雨湖区" prefecture="湘潭市" province="湖南省" 430304 county="岳塘区" prefecture="湘潭市" province="湖南省" 430321 county="湘潭县" prefecture="湘潭市" province="湖南省" 430381 county="湘乡市" prefecture="湘潭市" province="湖南省" 430382 county="韶山市" prefecture="湘潭市" province="湖南省" 430401 county="市辖区" prefecture="衡阳市" province="湖南省" 430405 county="珠晖区" prefecture="衡阳市" province="湖南省" 430406 county="雁峰区" prefecture="衡阳市" province="湖南省" 430407 county="石鼓区" prefecture="衡阳市" province="湖南省" 430408 county="蒸湘区" prefecture="衡阳市" province="湖南省" 430412 county="南岳区" prefecture="衡阳市" province="湖南省" 430421 county="衡阳县" prefecture="衡阳市" province="湖南省" 430422 county="衡南县" prefecture="衡阳市" province="湖南省" 430423 county="衡山县" prefecture="衡阳市" province="湖南省" 430424 county="衡东县" prefecture="衡阳市" province="湖南省" 430426 county="祁东县" prefecture="衡阳市" province="湖南省" 430481 county="耒阳市" prefecture="衡阳市" province="湖南省" 430482 county="常宁市" prefecture="衡阳市" province="湖南省" 430501 county="市辖区" prefecture="邵阳市" province="湖南省" 430502 county="双清区" prefecture="邵阳市" province="湖南省" 430503 county="大祥区" prefecture="邵阳市" province="湖南省" 430511 county="北塔区" prefecture="邵阳市" province="湖南省" 430521 county="邵东县" prefecture="邵阳市" province="湖南省" 430522 county="新邵县" prefecture="邵阳市" province="湖南省" 430523 county="邵阳县" prefecture="邵阳市" province="湖南省" 430524 county="隆回县" prefecture="邵阳市" province="湖南省" 430525 county="洞口县" prefecture="邵阳市" province="湖南省" 430527 county="绥宁县" prefecture="邵阳市" province="湖南省" 430528 county="新宁县" prefecture="邵阳市" province="湖南省" 430529 county="城步苗族自治县" prefecture="邵阳市" province="湖南省" 430581 county="武冈市" prefecture="邵阳市" province="湖南省" 430601 county="市辖区" prefecture="岳阳市" province="湖南省" 430602 county="岳阳楼区" prefecture="岳阳市" province="湖南省" 430603 county="云溪区" prefecture="岳阳市" province="湖南省" 430611 county="君山区" prefecture="岳阳市" province="湖南省" 430621 county="岳阳县" prefecture="岳阳市" province="湖南省" 430623 county="华容县" prefecture="岳阳市" province="湖南省" 430624 county="湘阴县" prefecture="岳阳市" province="湖南省" 430626 county="平江县" prefecture="岳阳市" province="湖南省" 430681 county="汨罗市" prefecture="岳阳市" province="湖南省" 430682 county="临湘市" prefecture="岳阳市" province="湖南省" 430701 county="市辖区" prefecture="常德市" province="湖南省" 430702 county="武陵区" prefecture="常德市" province="湖南省" 430703 county="鼎城区" prefecture="常德市" province="湖南省" 430721 county="安乡县" prefecture="常德市" province="湖南省" 430722 county="汉寿县" prefecture="常德市" province="湖南省" 430723 county="澧县" prefecture="常德市" province="湖南省" 430724 county="临澧县" prefecture="常德市" province="湖南省" 430725 county="桃源县" prefecture="常德市" province="湖南省" 430726 county="石门县" prefecture="常德市" province="湖南省" 430781 county="津市市" prefecture="常德市" province="湖南省" 430801 county="市辖区" prefecture="张家界市" province="湖南省" 430802 county="永定区" prefecture="张家界市" province="湖南省" 430811 county="武陵源区" prefecture="张家界市" province="湖南省" 430821 county="慈利县" prefecture="张家界市" province="湖南省" 430822 county="桑植县" prefecture="张家界市" province="湖南省" 430901 county="市辖区" prefecture="益阳市" province="湖南省" 430902 county="资阳区" prefecture="益阳市" province="湖南省" 430903 county="赫山区" prefecture="益阳市" province="湖南省" 430921 county="南县" prefecture="益阳市" province="湖南省" 430922 county="桃江县" prefecture="益阳市" province="湖南省" 430923 county="安化县" prefecture="益阳市" province="湖南省" 430981 county="沅江市" prefecture="益阳市" province="湖南省" 431001 county="市辖区" prefecture="郴州市" province="湖南省" 431002 county="北湖区" prefecture="郴州市" province="湖南省" 431003 county="苏仙区" prefecture="郴州市" province="湖南省" 431021 county="桂阳县" prefecture="郴州市" province="湖南省" 431022 county="宜章县" prefecture="郴州市" province="湖南省" 431023 county="永兴县" prefecture="郴州市" province="湖南省" 431024 county="嘉禾县" prefecture="郴州市" province="湖南省" 431025 county="临武县" prefecture="郴州市" province="湖南省" 431026 county="汝城县" prefecture="郴州市" province="湖南省" 431027 county="桂东县" prefecture="郴州市" province="湖南省" 431028 county="安仁县" prefecture="郴州市" province="湖南省" 431081 county="资兴市" prefecture="郴州市" province="湖南省" 431101 county="市辖区" prefecture="永州市" province="湖南省" 431102 county="零陵区" prefecture="永州市" province="湖南省" 431103 county="冷水滩区" prefecture="永州市" province="湖南省" 431121 county="祁阳县" prefecture="永州市" province="湖南省" 431122 county="东安县" prefecture="永州市" province="湖南省" 431123 county="双牌县" prefecture="永州市" province="湖南省" 431124 county="道县" prefecture="永州市" province="湖南省" 431125 county="江永县" prefecture="永州市" province="湖南省" 431126 county="宁远县" prefecture="永州市" province="湖南省" 431127 county="蓝山县" prefecture="永州市" province="湖南省" 431128 county="新田县" prefecture="永州市" province="湖南省" 431129 county="江华瑶族自治县" prefecture="永州市" province="湖南省" 431201 county="市辖区" prefecture="怀化市" province="湖南省" 431202 county="鹤城区" prefecture="怀化市" province="湖南省" 431221 county="中方县" prefecture="怀化市" province="湖南省" 431222 county="沅陵县" prefecture="怀化市" province="湖南省" 431223 county="辰溪县" prefecture="怀化市" province="湖南省" 431224 county="溆浦县" prefecture="怀化市" province="湖南省" 431225 county="会同县" prefecture="怀化市" province="湖南省" 431226 county="麻阳苗族自治县" prefecture="怀化市" province="湖南省" 431227 county="新晃侗族自治县" prefecture="怀化市" province="湖南省" 431228 county="芷江侗族自治县" prefecture="怀化市" province="湖南省" 431229 county="靖州苗族侗族自治县" prefecture="怀化市" province="湖南省" 431230 county="通道侗族自治县" prefecture="怀化市" province="湖南省" 431281 county="洪江市" prefecture="怀化市" province="湖南省" 431301 county="市辖区" prefecture="娄底市" province="湖南省" 431302 county="娄星区" prefecture="娄底市" province="湖南省" 431321 county="双峰县" prefecture="娄底市" province="湖南省" 431322 county="新化县" prefecture="娄底市" province="湖南省" 431381 county="冷水江市" prefecture="娄底市" province="湖南省" 431382 county="涟源市" prefecture="娄底市" province="湖南省" 433101 county="吉首市" prefecture="湘西土家族苗族自治州" province="湖南省" 433122 county="泸溪县" prefecture="湘西土家族苗族自治州" province="湖南省" 433123 county="凤凰县" prefecture="湘西土家族苗族自治州" province="湖南省" 433124 county="花垣县" prefecture="湘西土家族苗族自治州" province="湖南省" 433125 county="保靖县" prefecture="湘西土家族苗族自治州" province="湖南省" 433126 county="古丈县" prefecture="湘西土家族苗族自治州" province="湖南省" 433127 county="永顺县" prefecture="湘西土家族苗族自治州" province="湖南省" 433130 county="龙山县" prefecture="湘西土家族苗族自治州" province="湖南省" 440101 county="市辖区" prefecture="广州市" province="广东省" 440102 county="东山区" prefecture="广州市" province="广东省" 440103 county="荔湾区" prefecture="广州市" province="广东省" 440104 county="越秀区" prefecture="广州市" province="广东省" 440105 county="海珠区" prefecture="广州市" province="广东省" 440106 county="天河区" prefecture="广州市" province="广东省" 440107 county="芳村区" prefecture="广州市" province="广东省" 440111 county="白云区" prefecture="广州市" province="广东省" 440112 county="黄埔区" prefecture="广州市" province="广东省" 440113 county="番禺区" prefecture="广州市" province="广东省" 440114 county="花都区" prefecture="广州市" province="广东省" 440115 county="南沙区" prefecture="广州市" province="广东省" 440116 county="萝岗区" prefecture="广州市" province="广东省" 440117 county="从化区" prefecture="广州市" province="广东省" 440118 county="增城区" prefecture="广州市" province="广东省" 440183 county="增城市" prefecture="广州市" province="广东省" 440184 county="从化市" prefecture="广州市" province="广东省" 440201 county="市辖区" prefecture="韶关市" province="广东省" 440202 county="北江区" prefecture="韶关市" province="广东省" 440203 county="武江区" prefecture="韶关市" province="广东省" 440204 county="浈江区" prefecture="韶关市" province="广东省" 440205 county="曲江区" prefecture="韶关市" province="广东省" 440221 county="曲江县" prefecture="韶关市" province="广东省" 440222 county="始兴县" prefecture="韶关市" province="广东省" 440224 county="仁化县" prefecture="韶关市" province="广东省" 440229 county="翁源县" prefecture="韶关市" province="广东省" 440232 county="乳源瑶族自治县" prefecture="韶关市" province="广东省" 440233 county="新丰县" prefecture="韶关市" province="广东省" 440281 county="乐昌市" prefecture="韶关市" province="广东省" 440282 county="南雄市" prefecture="韶关市" province="广东省" 440301 county="市辖区" prefecture="深圳市" province="广东省" 440303 county="罗湖区" prefecture="深圳市" province="广东省" 440304 county="福田区" prefecture="深圳市" province="广东省" 440305 county="南山区" prefecture="深圳市" province="广东省" 440306 county="宝安区" prefecture="深圳市" province="广东省" 440307 county="龙岗区" prefecture="深圳市" province="广东省" 440308 county="盐田区" prefecture="深圳市" province="广东省" 440401 county="市辖区" prefecture="珠海市" province="广东省" 440402 county="香洲区" prefecture="珠海市" province="广东省" 440403 county="斗门区" prefecture="珠海市" province="广东省" 440404 county="金湾区" prefecture="珠海市" province="广东省" 440501 county="市辖区" prefecture="汕头市" province="广东省" 440506 county="达濠区" prefecture="汕头市" province="广东省" 440507 county="龙湖区" prefecture="汕头市" province="广东省" 440508 county="金园区" prefecture="汕头市" province="广东省" 440509 county="升平区" prefecture="汕头市" province="广东省" 440510 county="河浦区" prefecture="汕头市" province="广东省" 440511 county="金平区" prefecture="汕头市" province="广东省" 440512 county="濠江区" prefecture="汕头市" province="广东省" 440513 county="潮阳区" prefecture="汕头市" province="广东省" 440514 county="潮南区" prefecture="汕头市" province="广东省" 440515 county="澄海区" prefecture="汕头市" province="广东省" 440523 county="南澳县" prefecture="汕头市" province="广东省" 440582 county="潮阳市" prefecture="汕头市" province="广东省" 440583 county="澄海市" prefecture="汕头市" province="广东省" 440601 county="市辖区" prefecture="佛山市" province="广东省" 440604 county="禅城区" prefecture="佛山市" province="广东省" 440605 county="南海区" prefecture="佛山市" province="广东省" 440606 county="顺德区" prefecture="佛山市" province="广东省" 440607 county="三水区" prefecture="佛山市" province="广东省" 440608 county="高明区" prefecture="佛山市" province="广东省" 440701 county="市辖区" prefecture="江门市" province="广东省" 440703 county="蓬江区" prefecture="江门市" province="广东省" 440704 county="江海区" prefecture="江门市" province="广东省" 440705 county="新会区" prefecture="江门市" province="广东省" 440781 county="台山市" prefecture="江门市" province="广东省" 440783 county="开平市" prefecture="江门市" province="广东省" 440784 county="鹤山市" prefecture="江门市" province="广东省" 440785 county="恩平市" prefecture="江门市" province="广东省" 440801 county="市辖区" prefecture="湛江市" province="广东省" 440802 county="赤坎区" prefecture="湛江市" province="广东省" 440803 county="霞山区" prefecture="湛江市" province="广东省" 440804 county="坡头区" prefecture="湛江市" province="广东省" 440811 county="麻章区" prefecture="湛江市" province="广东省" 440823 county="遂溪县" prefecture="湛江市" province="广东省" 440825 county="徐闻县" prefecture="湛江市" province="广东省" 440881 county="廉江市" prefecture="湛江市" province="广东省" 440882 county="雷州市" prefecture="湛江市" province="广东省" 440883 county="吴川市" prefecture="湛江市" province="广东省" 440901 county="市辖区" prefecture="茂名市" province="广东省" 440902 county="茂南区" prefecture="茂名市" province="广东省" 440903 county="茂港区" prefecture="茂名市" province="广东省" 440904 county="电白区" prefecture="茂名市" province="广东省" 440923 county="电白县" prefecture="茂名市" province="广东省" 440981 county="高州市" prefecture="茂名市" province="广东省" 440982 county="化州市" prefecture="茂名市" province="广东省" 440983 county="信宜市" prefecture="茂名市" province="广东省" 441201 county="市辖区" prefecture="肇庆市" province="广东省" 441202 county="端州区" prefecture="肇庆市" province="广东省" 441203 county="鼎湖区" prefecture="肇庆市" province="广东省" 441223 county="广宁县" prefecture="肇庆市" province="广东省" 441224 county="怀集县" prefecture="肇庆市" province="广东省" 441225 county="封开县" prefecture="肇庆市" province="广东省" 441226 county="德庆县" prefecture="肇庆市" province="广东省" 441283 county="高要市" prefecture="肇庆市" province="广东省" 441284 county="四会市" prefecture="肇庆市" province="广东省" 441301 county="市辖区" prefecture="惠州市" province="广东省" 441302 county="惠城区" prefecture="惠州市" province="广东省" 441303 county="惠阳区" prefecture="惠州市" province="广东省" 441322 county="博罗县" prefecture="惠州市" province="广东省" 441323 county="惠东县" prefecture="惠州市" province="广东省" 441324 county="龙门县" prefecture="惠州市" province="广东省" 441381 county="惠阳市" prefecture="惠州市" province="广东省" 441401 county="市辖区" prefecture="梅州市" province="广东省" 441402 county="梅江区" prefecture="梅州市" province="广东省" 441403 county="梅县区" prefecture="梅州市" province="广东省" 441421 county="梅县" prefecture="梅州市" province="广东省" 441422 county="大埔县" prefecture="梅州市" province="广东省" 441423 county="丰顺县" prefecture="梅州市" province="广东省" 441424 county="五华县" prefecture="梅州市" province="广东省" 441426 county="平远县" prefecture="梅州市" province="广东省" 441427 county="蕉岭县" prefecture="梅州市" province="广东省" 441481 county="兴宁市" prefecture="梅州市" province="广东省" 441501 county="市辖区" prefecture="汕尾市" province="广东省" 441502 county="城区" prefecture="汕尾市" province="广东省" 441521 county="海丰县" prefecture="汕尾市" province="广东省" 441523 county="陆河县" prefecture="汕尾市" province="广东省" 441581 county="陆丰市" prefecture="汕尾市" province="广东省" 441601 county="市辖区" prefecture="河源市" province="广东省" 441602 county="源城区" prefecture="河源市" province="广东省" 441621 county="紫金县" prefecture="河源市" province="广东省" 441622 county="龙川县" prefecture="河源市" province="广东省" 441623 county="连平县" prefecture="河源市" province="广东省" 441624 county="和平县" prefecture="河源市" province="广东省" 441625 county="东源县" prefecture="河源市" province="广东省" 441701 county="市辖区" prefecture="阳江市" province="广东省" 441702 county="江城区" prefecture="阳江市" province="广东省" 441721 county="阳西县" prefecture="阳江市" province="广东省" 441723 county="阳东县" prefecture="阳江市" province="广东省" 441781 county="阳春市" prefecture="阳江市" province="广东省" 441801 county="市辖区" prefecture="清远市" province="广东省" 441802 county="清城区" prefecture="清远市" province="广东省" 441803 county="清新区" prefecture="清远市" province="广东省" 441821 county="佛冈县" prefecture="清远市" province="广东省" 441823 county="阳山县" prefecture="清远市" province="广东省" 441825 county="连山壮族瑶族自治县" prefecture="清远市" province="广东省" 441826 county="连南瑶族自治县" prefecture="清远市" province="广东省" 441827 county="清新县" prefecture="清远市" province="广东省" 441881 county="英德市" prefecture="清远市" province="广东省" 441882 county="连州市" prefecture="清远市" province="广东省" 445101 county="市辖区" prefecture="潮州市" province="广东省" 445102 county="湘桥区" prefecture="潮州市" province="广东省" 445103 county="潮安区" prefecture="潮州市" province="广东省" 445121 county="潮安县" prefecture="潮州市" province="广东省" 445122 county="饶平县" prefecture="潮州市" province="广东省" 445201 county="市辖区" prefecture="揭阳市" province="广东省" 445202 county="榕城区" prefecture="揭阳市" province="广东省" 445203 county="揭东区" prefecture="揭阳市" province="广东省" 445221 county="揭东县" prefecture="揭阳市" province="广东省" 445222 county="揭西县" prefecture="揭阳市" province="广东省" 445224 county="惠来县" prefecture="揭阳市" province="广东省" 445281 county="普宁市" prefecture="揭阳市" province="广东省" 445301 county="市辖区" prefecture="云浮市" province="广东省" 445302 county="云城区" prefecture="云浮市" province="广东省" 445303 county="云安区" prefecture="云浮市" province="广东省" 445321 county="新兴县" prefecture="云浮市" province="广东省" 445322 county="郁南县" prefecture="云浮市" province="广东省" 445323 county="云安县" prefecture="云浮市" province="广东省" 445381 county="罗定市" prefecture="云浮市" province="广东省" 450101 county="市辖区" prefecture="南宁市" province="广西壮族自治区" 450102 county="兴宁区" prefecture="南宁市" province="广西壮族自治区" 450103 county="青秀区" prefecture="南宁市" province="广西壮族自治区" 450104 county="城北区" prefecture="南宁市" province="广西壮族自治区" 450105 county="江南区" prefecture="南宁市" province="广西壮族自治区" 450106 county="永新区" prefecture="南宁市" province="广西壮族自治区" 450107 county="西乡塘区" prefecture="南宁市" province="广西壮族自治区" 450108 county="良庆区" prefecture="南宁市" province="广西壮族自治区" 450109 county="邕宁区" prefecture="南宁市" province="广西壮族自治区" 450121 county="邕宁县" prefecture="南宁市" province="广西壮族自治区" 450122 county="武鸣县" prefecture="南宁市" province="广西壮族自治区" 450123 county="隆安县" prefecture="南宁市" province="广西壮族自治区" 450124 county="马山县" prefecture="南宁市" province="广西壮族自治区" 450125 county="上林县" prefecture="南宁市" province="广西壮族自治区" 450126 county="宾阳县" prefecture="南宁市" province="广西壮族自治区" 450127 county="横县" prefecture="南宁市" province="广西壮族自治区" 450201 county="市辖区" prefecture="柳州市" province="广西壮族自治区" 450202 county="城中区" prefecture="柳州市" province="广西壮族自治区" 450203 county="鱼峰区" prefecture="柳州市" province="广西壮族自治区" 450204 county="柳南区" prefecture="柳州市" province="广西壮族自治区" 450205 county="柳北区" prefecture="柳州市" province="广西壮族自治区" 450221 county="柳江县" prefecture="柳州市" province="广西壮族自治区" 450222 county="柳城县" prefecture="柳州市" province="广西壮族自治区" 450223 county="鹿寨县" prefecture="柳州市" province="广西壮族自治区" 450224 county="融安县" prefecture="柳州市" province="广西壮族自治区" 450225 county="融水苗族自治县" prefecture="柳州市" province="广西壮族自治区" 450226 county="三江侗族自治县" prefecture="柳州市" province="广西壮族自治区" 450301 county="市辖区" prefecture="桂林市" province="广西壮族自治区" 450302 county="秀峰区" prefecture="桂林市" province="广西壮族自治区" 450303 county="叠彩区" prefecture="桂林市" province="广西壮族自治区" 450304 county="象山区" prefecture="桂林市" province="广西壮族自治区" 450305 county="七星区" prefecture="桂林市" province="广西壮族自治区" 450311 county="雁山区" prefecture="桂林市" province="广西壮族自治区" 450312 county="临桂区" prefecture="桂林市" province="广西壮族自治区" 450321 county="阳朔县" prefecture="桂林市" province="广西壮族自治区" 450322 county="临桂县" prefecture="桂林市" province="广西壮族自治区" 450323 county="灵川县" prefecture="桂林市" province="广西壮族自治区" 450324 county="全州县" prefecture="桂林市" province="广西壮族自治区" 450325 county="兴安县" prefecture="桂林市" province="广西壮族自治区" 450326 county="永福县" prefecture="桂林市" province="广西壮族自治区" 450327 county="灌阳县" prefecture="桂林市" province="广西壮族自治区" 450328 county="龙胜各族自治县" prefecture="桂林市" province="广西壮族自治区" 450329 county="资源县" prefecture="桂林市" province="广西壮族自治区" 450330 county="平乐县" prefecture="桂林市" province="广西壮族自治区" 450331 county="荔浦县" prefecture="桂林市" province="广西壮族自治区" 450332 county="恭城瑶族自治县" prefecture="桂林市" province="广西壮族自治区" 450401 county="市辖区" prefecture="梧州市" province="广西壮族自治区" 450403 county="万秀区" prefecture="梧州市" province="广西壮族自治区" 450404 county="蝶山区" prefecture="梧州市" province="广西壮族自治区" 450405 county="长洲区" prefecture="梧州市" province="广西壮族自治区" 450406 county="龙圩区" prefecture="梧州市" province="广西壮族自治区" 450411 county="市郊区" prefecture="梧州市" province="广西壮族自治区" 450421 county="苍梧县" prefecture="梧州市" province="广西壮族自治区" 450422 county="藤县" prefecture="梧州市" province="广西壮族自治区" 450423 county="蒙山县" prefecture="梧州市" province="广西壮族自治区" 450481 county="岑溪市" prefecture="梧州市" province="广西壮族自治区" 450501 county="市辖区" prefecture="北海市" province="广西壮族自治区" 450502 county="海城区" prefecture="北海市" province="广西壮族自治区" 450503 county="银海区" prefecture="北海市" province="广西壮族自治区" 450512 county="铁山港区" prefecture="北海市" province="广西壮族自治区" 450521 county="合浦县" prefecture="北海市" province="广西壮族自治区" 450601 county="市辖区" prefecture="防城港市" province="广西壮族自治区" 450602 county="港口区" prefecture="防城港市" province="广西壮族自治区" 450603 county="防城区" prefecture="防城港市" province="广西壮族自治区" 450621 county="上思县" prefecture="防城港市" province="广西壮族自治区" 450681 county="东兴市" prefecture="防城港市" province="广西壮族自治区" 450701 county="市辖区" prefecture="钦州市" province="广西壮族自治区" 450702 county="钦南区" prefecture="钦州市" province="广西壮族自治区" 450703 county="钦北区" prefecture="钦州市" province="广西壮族自治区" 450721 county="灵山县" prefecture="钦州市" province="广西壮族自治区" 450722 county="浦北县" prefecture="钦州市" province="广西壮族自治区" 450801 county="市辖区" prefecture="贵港市" province="广西壮族自治区" 450802 county="港北区" prefecture="贵港市" province="广西壮族自治区" 450803 county="港南区" prefecture="贵港市" province="广西壮族自治区" 450804 county="覃塘区" prefecture="贵港市" province="广西壮族自治区" 450821 county="平南县" prefecture="贵港市" province="广西壮族自治区" 450881 county="桂平市" prefecture="贵港市" province="广西壮族自治区" 450901 county="市辖区" prefecture="玉林市" province="广西壮族自治区" 450902 county="玉州区" prefecture="玉林市" province="广西壮族自治区" 450903 county="福绵区" prefecture="玉林市" province="广西壮族自治区" 450921 county="容县" prefecture="玉林市" province="广西壮族自治区" 450922 county="陆川县" prefecture="玉林市" province="广西壮族自治区" 450923 county="博白县" prefecture="玉林市" province="广西壮族自治区" 450924 county="兴业县" prefecture="玉林市" province="广西壮族自治区" 450981 county="北流市" prefecture="玉林市" province="广西壮族自治区" 451001 county="市辖区" prefecture="百色市" province="广西壮族自治区" 451002 county="右江区" prefecture="百色市" province="广西壮族自治区" 451021 county="田阳县" prefecture="百色市" province="广西壮族自治区" 451022 county="田东县" prefecture="百色市" province="广西壮族自治区" 451023 county="平果县" prefecture="百色市" province="广西壮族自治区" 451024 county="德保县" prefecture="百色市" province="广西壮族自治区" 451025 county="靖西县" prefecture="百色市" province="广西壮族自治区" 451026 county="那坡县" prefecture="百色市" province="广西壮族自治区" 451027 county="凌云县" prefecture="百色市" province="广西壮族自治区" 451028 county="乐业县" prefecture="百色市" province="广西壮族自治区" 451029 county="田林县" prefecture="百色市" province="广西壮族自治区" 451030 county="西林县" prefecture="百色市" province="广西壮族自治区" 451031 county="隆林各族自治县" prefecture="百色市" province="广西壮族自治区" 451101 county="市辖区" prefecture="贺州市" province="广西壮族自治区" 451102 county="八步区" prefecture="贺州市" province="广西壮族自治区" 451121 county="昭平县" prefecture="贺州市" province="广西壮族自治区" 451122 county="钟山县" prefecture="贺州市" province="广西壮族自治区" 451123 county="富川瑶族自治县" prefecture="贺州市" province="广西壮族自治区" 451201 county="市辖区" prefecture="河池市" province="广西壮族自治区" 451202 county="金城江区" prefecture="河池市" province="广西壮族自治区" 451221 county="南丹县" prefecture="河池市" province="广西壮族自治区" 451222 county="天峨县" prefecture="河池市" province="广西壮族自治区" 451223 county="凤山县" prefecture="河池市" province="广西壮族自治区" 451224 county="东兰县" prefecture="河池市" province="广西壮族自治区" 451225 county="罗城仫佬族自治县" prefecture="河池市" province="广西壮族自治区" 451226 county="环江毛南族自治县" prefecture="河池市" province="广西壮族自治区" 451227 county="巴马瑶族自治县" prefecture="河池市" province="广西壮族自治区" 451228 county="都安瑶族自治县" prefecture="河池市" province="广西壮族自治区" 451229 county="大化瑶族自治县" prefecture="河池市" province="广西壮族自治区" 451281 county="宜州市" prefecture="河池市" province="广西壮族自治区" 451301 county="市辖区" prefecture="来宾市" province="广西壮族自治区" 451302 county="兴宾区" prefecture="来宾市" province="广西壮族自治区" 451321 county="忻城县" prefecture="来宾市" province="广西壮族自治区" 451322 county="象州县" prefecture="来宾市" province="广西壮族自治区" 451323 county="武宣县" prefecture="来宾市" province="广西壮族自治区" 451324 county="金秀瑶族自治县" prefecture="来宾市" province="广西壮族自治区" 451381 county="合山市" prefecture="来宾市" province="广西壮族自治区" 451401 county="市辖区" prefecture="崇左市" province="广西壮族自治区" 451402 county="江州区" prefecture="崇左市" province="广西壮族自治区" 451421 county="扶绥县" prefecture="崇左市" province="广西壮族自治区" 451422 county="宁明县" prefecture="崇左市" province="广西壮族自治区" 451423 county="龙州县" prefecture="崇左市" province="广西壮族自治区" 451424 county="大新县" prefecture="崇左市" province="广西壮族自治区" 451425 county="天等县" prefecture="崇左市" province="广西壮族自治区" 451481 county="凭祥市" prefecture="崇左市" province="广西壮族自治区" 460101 county="市辖区" prefecture="海口市" province="海南省" 460105 county="秀英区" prefecture="海口市" province="海南省" 460106 county="龙华区" prefecture="海口市" province="海南省" 460107 county="琼山区" prefecture="海口市" province="海南省" 460108 county="美兰区" prefecture="海口市" province="海南省" 460201 county="市辖区" prefecture="三亚市" province="海南省" 460202 county="海棠区" prefecture="三亚市" province="海南省" 460203 county="吉阳区" prefecture="三亚市" province="海南省" 460204 county="天涯区" prefecture="三亚市" province="海南省" 460205 county="崖州区" prefecture="三亚市" province="海南省" 460321 county="西沙群岛" prefecture="三沙市" province="海南省" 460322 county="南沙群岛" prefecture="三沙市" province="海南省" 460323 county="中沙群岛的岛礁及其海域" prefecture="三沙市" province="海南省" 469001 county="五指山市" prefecture="省直辖县级行政区划" province="海南省" 469002 county="琼海市" prefecture="省直辖县级行政区划" province="海南省" 469003 county="儋州市" prefecture="省直辖县级行政区划" province="海南省" 469005 county="文昌市" prefecture="省直辖县级行政区划" province="海南省" 469006 county="万宁市" prefecture="省直辖县级行政区划" province="海南省" 469007 county="东方市" prefecture="省直辖县级行政区划" province="海南省" 469021 county="定安县" prefecture="省直辖县级行政区划" province="海南省" 469022 county="屯昌县" prefecture="省直辖县级行政区划" province="海南省" 469023 county="澄迈县" prefecture="省直辖县级行政区划" province="海南省" 469024 county="临高县" prefecture="省直辖县级行政区划" province="海南省" 469025 county="白沙黎族自治县" prefecture="省直辖县级行政区划" province="海南省" 469026 county="昌江黎族自治县" prefecture="省直辖县级行政区划" province="海南省" 469027 county="乐东黎族自治县" prefecture="省直辖县级行政区划" province="海南省" 469028 county="陵水黎族自治县" prefecture="省直辖县级行政区划" province="海南省" 469029 county="保亭黎族苗族自治县" prefecture="省直辖县级行政区划" province="海南省" 469030 county="琼中黎族苗族自治县" prefecture="省直辖县级行政区划" province="海南省" 469031 county="西沙群岛" prefecture="省直辖县级行政区划" province="海南省" 469032 county="南沙群岛" prefecture="省直辖县级行政区划" province="海南省" 469033 county="中沙群岛的岛礁及其海域" prefecture="省直辖县级行政区划" province="海南省" 469034 county="陵水黎族自治县" prefecture="省直辖县级行政区划" province="海南省" 469035 county="保亭黎族苗族自治县" prefecture="省直辖县级行政区划" province="海南省" 469036 county="琼中黎族苗族自治县" prefecture="省直辖县级行政区划" province="海南省" 469037 county="西沙群岛" prefecture="省直辖县级行政区划" province="海南省" 469038 county="南沙群岛" prefecture="省直辖县级行政区划" province="海南省" 469039 county="中沙群岛的岛礁及其海域" prefecture="省直辖县级行政区划" province="海南省" 500101 county="万州区" prefecture="市辖区" province="重庆市" 500102 county="涪陵区" prefecture="市辖区" province="重庆市" 500103 county="渝中区" prefecture="市辖区" province="重庆市" 500104 county="大渡口区" prefecture="市辖区" province="重庆市" 500105 county="江北区" prefecture="市辖区" province="重庆市" 500106 county="沙坪坝区" prefecture="市辖区" province="重庆市" 500107 county="九龙坡区" prefecture="市辖区" province="重庆市" 500108 county="南岸区" prefecture="市辖区" province="重庆市" 500109 county="北碚区" prefecture="市辖区" province="重庆市" 500110 county="綦江区" prefecture="市辖区" province="重庆市" 500111 county="大足区" prefecture="市辖区" province="重庆市" 500112 county="渝北区" prefecture="市辖区" province="重庆市" 500113 county="巴南区" prefecture="市辖区" province="重庆市" 500114 county="黔江区" prefecture="市辖区" province="重庆市" 500115 county="长寿区" prefecture="市辖区" province="重庆市" 500116 county="江津区" prefecture="市辖区" province="重庆市" 500117 county="合川区" prefecture="市辖区" province="重庆市" 500118 county="永川区" prefecture="市辖区" province="重庆市" 500119 county="南川区" prefecture="市辖区" province="重庆市" 500120 county="璧山区" prefecture="市辖区" province="重庆市" 500151 county="铜梁区" prefecture="市辖区" province="重庆市" 500222 county="綦江县" prefecture="县" province="重庆市" 500223 county="潼南县" prefecture="县" province="重庆市" 500224 county="铜梁县" prefecture="县" province="重庆市" 500225 county="大足县" prefecture="县" province="重庆市" 500226 county="荣昌县" prefecture="县" province="重庆市" 500227 county="璧山县" prefecture="县" province="重庆市" 500228 county="梁平县" prefecture="县" province="重庆市" 500229 county="城口县" prefecture="县" province="重庆市" 500230 county="丰都县" prefecture="县" province="重庆市" 500231 county="垫江县" prefecture="县" province="重庆市" 500232 county="武隆县" prefecture="县" province="重庆市" 500233 county="忠县" prefecture="县" province="重庆市" 500234 county="开县" prefecture="县" province="重庆市" 500235 county="云阳县" prefecture="县" province="重庆市" 500236 county="奉节县" prefecture="县" province="重庆市" 500237 county="巫山县" prefecture="县" province="重庆市" 500238 county="巫溪县" prefecture="县" province="重庆市" 500240 county="石柱土家族自治县" prefecture="县" province="重庆市" 500241 county="秀山土家族苗族自治县" prefecture="县" province="重庆市" 500242 county="酉阳土家族苗族自治县" prefecture="县" province="重庆市" 500243 county="彭水苗族土家族自治县" prefecture="县" province="重庆市" 500381 county="江津市" prefecture="市" province="重庆市" 500382 county="合川市" prefecture="市" province="重庆市" 500383 county="永川市" prefecture="市" province="重庆市" 500384 county="南川市" prefecture="市" province="重庆市" 510101 county="市辖区" prefecture="成都市" province="四川省" 510104 county="锦江区" prefecture="成都市" province="四川省" 510105 county="青羊区" prefecture="成都市" province="四川省" 510106 county="金牛区" prefecture="成都市" province="四川省" 510107 county="武侯区" prefecture="成都市" province="四川省" 510108 county="成华区" prefecture="成都市" province="四川省" 510112 county="龙泉驿区" prefecture="成都市" province="四川省" 510113 county="青白江区" prefecture="成都市" province="四川省" 510114 county="新都区" prefecture="成都市" province="四川省" 510115 county="温江区" prefecture="成都市" province="四川省" 510121 county="金堂县" prefecture="成都市" province="四川省" 510122 county="双流县" prefecture="成都市" province="四川省" 510123 county="温江县" prefecture="成都市" province="四川省" 510124 county="郫县" prefecture="成都市" province="四川省" 510129 county="大邑县" prefecture="成都市" province="四川省" 510131 county="蒲江县" prefecture="成都市" province="四川省" 510132 county="新津县" prefecture="成都市" province="四川省" 510181 county="都江堰市" prefecture="成都市" province="四川省" 510182 county="彭州市" prefecture="成都市" province="四川省" 510183 county="邛崃市" prefecture="成都市" province="四川省" 510184 county="崇州市" prefecture="成都市" province="四川省" 510301 county="市辖区" prefecture="自贡市" province="四川省" 510302 county="自流井区" prefecture="自贡市" province="四川省" 510303 county="贡井区" prefecture="自贡市" province="四川省" 510304 county="大安区" prefecture="自贡市" province="四川省" 510311 county="沿滩区" prefecture="自贡市" province="四川省" 510321 county="荣县" prefecture="自贡市" province="四川省" 510322 county="富顺县" prefecture="自贡市" province="四川省" 510401 county="市辖区" prefecture="攀枝花市" province="四川省" 510402 county="东区" prefecture="攀枝花市" province="四川省" 510403 county="西区" prefecture="攀枝花市" province="四川省" 510411 county="仁和区" prefecture="攀枝花市" province="四川省" 510421 county="米易县" prefecture="攀枝花市" province="四川省" 510422 county="盐边县" prefecture="攀枝花市" province="四川省" 510501 county="市辖区" prefecture="泸州市" province="四川省" 510502 county="江阳区" prefecture="泸州市" province="四川省" 510503 county="纳溪区" prefecture="泸州市" province="四川省" 510504 county="龙马潭区" prefecture="泸州市" province="四川省" 510521 county="泸县" prefecture="泸州市" province="四川省" 510522 county="合江县" prefecture="泸州市" province="四川省" 510524 county="叙永县" prefecture="泸州市" province="四川省" 510525 county="古蔺县" prefecture="泸州市" province="四川省" 510601 county="市辖区" prefecture="德阳市" province="四川省" 510603 county="旌阳区" prefecture="德阳市" province="四川省" 510623 county="中江县" prefecture="德阳市" province="四川省" 510626 county="罗江县" prefecture="德阳市" province="四川省" 510681 county="广汉市" prefecture="德阳市" province="四川省" 510682 county="什邡市" prefecture="德阳市" province="四川省" 510683 county="绵竹市" prefecture="德阳市" province="四川省" 510701 county="市辖区" prefecture="绵阳市" province="四川省" 510703 county="涪城区" prefecture="绵阳市" province="四川省" 510704 county="游仙区" prefecture="绵阳市" province="四川省" 510722 county="三台县" prefecture="绵阳市" province="四川省" 510723 county="盐亭县" prefecture="绵阳市" province="四川省" 510724 county="安县" prefecture="绵阳市" province="四川省" 510725 county="梓潼县" prefecture="绵阳市" province="四川省" 510726 county="北川羌族自治县" prefecture="绵阳市" province="四川省" 510727 county="平武县" prefecture="绵阳市" province="四川省" 510781 county="江油市" prefecture="绵阳市" province="四川省" 510801 county="市辖区" prefecture="广元市" province="四川省" 510802 county="利州区" prefecture="广元市" province="四川省" 510811 county="昭化区" prefecture="广元市" province="四川省" 510812 county="朝天区" prefecture="广元市" province="四川省" 510821 county="旺苍县" prefecture="广元市" province="四川省" 510822 county="青川县" prefecture="广元市" province="四川省" 510823 county="剑阁县" prefecture="广元市" province="四川省" 510824 county="苍溪县" prefecture="广元市" province="四川省" 510901 county="市辖区" prefecture="遂宁市" province="四川省" 510902 county="市中区" prefecture="遂宁市" province="四川省" 510903 county="船山区" prefecture="遂宁市" province="四川省" 510904 county="安居区" prefecture="遂宁市" province="四川省" 510921 county="蓬溪县" prefecture="遂宁市" province="四川省" 510922 county="射洪县" prefecture="遂宁市" province="四川省" 510923 county="大英县" prefecture="遂宁市" province="四川省" 511001 county="市辖区" prefecture="内江市" province="四川省" 511002 county="市中区" prefecture="内江市" province="四川省" 511011 county="东兴区" prefecture="内江市" province="四川省" 511024 county="威远县" prefecture="内江市" province="四川省" 511025 county="资中县" prefecture="内江市" province="四川省" 511028 county="隆昌县" prefecture="内江市" province="四川省" 511101 county="市辖区" prefecture="乐山市" province="四川省" 511102 county="市中区" prefecture="乐山市" province="四川省" 511111 county="沙湾区" prefecture="乐山市" province="四川省" 511112 county="五通桥区" prefecture="乐山市" province="四川省" 511113 county="金口河区" prefecture="乐山市" province="四川省" 511123 county="犍为县" prefecture="乐山市" province="四川省" 511124 county="井研县" prefecture="乐山市" province="四川省" 511126 county="夹江县" prefecture="乐山市" province="四川省" 511129 county="沐川县" prefecture="乐山市" province="四川省" 511132 county="峨边彝族自治县" prefecture="乐山市" province="四川省" 511133 county="马边彝族自治县" prefecture="乐山市" province="四川省" 511181 county="峨眉山市" prefecture="乐山市" province="四川省" 511301 county="市辖区" prefecture="南充市" province="四川省" 511302 county="顺庆区" prefecture="南充市" province="四川省" 511303 county="高坪区" prefecture="南充市" province="四川省" 511304 county="嘉陵区" prefecture="南充市" province="四川省" 511321 county="南部县" prefecture="南充市" province="四川省" 511322 county="营山县" prefecture="南充市" province="四川省" 511323 county="蓬安县" prefecture="南充市" province="四川省" 511324 county="仪陇县" prefecture="南充市" province="四川省" 511325 county="西充县" prefecture="南充市" province="四川省" 511381 county="阆中市" prefecture="南充市" province="四川省" 511401 county="市辖区" prefecture="眉山市" province="四川省" 511402 county="东坡区" prefecture="眉山市" province="四川省" 511421 county="仁寿县" prefecture="眉山市" province="四川省" 511422 county="彭山县" prefecture="眉山市" province="四川省" 511423 county="洪雅县" prefecture="眉山市" province="四川省" 511424 county="丹棱县" prefecture="眉山市" province="四川省" 511425 county="青神县" prefecture="眉山市" province="四川省" 511501 county="市辖区" prefecture="宜宾市" province="四川省" 511502 county="翠屏区" prefecture="宜宾市" province="四川省" 511503 county="南溪区" prefecture="宜宾市" province="四川省" 511521 county="宜宾县" prefecture="宜宾市" province="四川省" 511522 county="南溪县" prefecture="宜宾市" province="四川省" 511523 county="江安县" prefecture="宜宾市" province="四川省" 511524 county="长宁县" prefecture="宜宾市" province="四川省" 511525 county="高县" prefecture="宜宾市" province="四川省" 511526 county="珙县" prefecture="宜宾市" province="四川省" 511527 county="筠连县" prefecture="宜宾市" province="四川省" 511528 county="兴文县" prefecture="宜宾市" province="四川省" 511529 county="屏山县" prefecture="宜宾市" province="四川省" 511601 county="市辖区" prefecture="广安市" province="四川省" 511602 county="广安区" prefecture="广安市" province="四川省" 511603 county="前锋区" prefecture="广安市" province="四川省" 511621 county="岳池县" prefecture="广安市" province="四川省" 511622 county="武胜县" prefecture="广安市" province="四川省" 511623 county="邻水县" prefecture="广安市" province="四川省" 511681 county="华蓥市" prefecture="广安市" province="四川省" 511701 county="市辖区" prefecture="达州市" province="四川省" 511702 county="通川区" prefecture="达州市" province="四川省" 511703 county="达川区" prefecture="达州市" province="四川省" 511721 county="达县" prefecture="达州市" province="四川省" 511722 county="宣汉县" prefecture="达州市" province="四川省" 511723 county="开江县" prefecture="达州市" province="四川省" 511724 county="大竹县" prefecture="达州市" province="四川省" 511725 county="渠县" prefecture="达州市" province="四川省" 511781 county="万源市" prefecture="达州市" province="四川省" 511801 county="市辖区" prefecture="雅安市" province="四川省" 511802 county="雨城区" prefecture="雅安市" province="四川省" 511803 county="名山区" prefecture="雅安市" province="四川省" 511821 county="名山县" prefecture="雅安市" province="四川省" 511822 county="荥经县" prefecture="雅安市" province="四川省" 511823 county="汉源县" prefecture="雅安市" province="四川省" 511824 county="石棉县" prefecture="雅安市" province="四川省" 511825 county="天全县" prefecture="雅安市" province="四川省" 511826 county="芦山县" prefecture="雅安市" province="四川省" 511827 county="宝兴县" prefecture="雅安市" province="四川省" 511901 county="市辖区" prefecture="巴中市" province="四川省" 511902 county="巴州区" prefecture="巴中市" province="四川省" 511903 county="恩阳区" prefecture="巴中市" province="四川省" 511921 county="通江县" prefecture="巴中市" province="四川省" 511922 county="南江县" prefecture="巴中市" province="四川省" 511923 county="平昌县" prefecture="巴中市" province="四川省" 512001 county="市辖区" prefecture="资阳市" province="四川省" 512002 county="雁江区" prefecture="资阳市" province="四川省" 512021 county="安岳县" prefecture="资阳市" province="四川省" 512022 county="乐至县" prefecture="资阳市" province="四川省" 512081 county="简阳市" prefecture="资阳市" province="四川省" 513221 county="汶川县" prefecture="阿坝藏族羌族自治州" province="四川省" 513222 county="理县" prefecture="阿坝藏族羌族自治州" province="四川省" 513223 county="茂县" prefecture="阿坝藏族羌族自治州" province="四川省" 513224 county="松潘县" prefecture="阿坝藏族羌族自治州" province="四川省" 513225 county="九寨沟县" prefecture="阿坝藏族羌族自治州" province="四川省" 513226 county="金川县" prefecture="阿坝藏族羌族自治州" province="四川省" 513227 county="小金县" prefecture="阿坝藏族羌族自治州" province="四川省" 513228 county="黑水县" prefecture="阿坝藏族羌族自治州" province="四川省" 513229 county="马尔康县" prefecture="阿坝藏族羌族自治州" province="四川省" 513230 county="壤塘县" prefecture="阿坝藏族羌族自治州" province="四川省" 513231 county="阿坝县" prefecture="阿坝藏族羌族自治州" province="四川省" 513232 county="若尔盖县" prefecture="阿坝藏族羌族自治州" province="四川省" 513233 county="红原县" prefecture="阿坝藏族羌族自治州" province="四川省" 513321 county="康定县" prefecture="甘孜藏族自治州" province="四川省" 513322 county="泸定县" prefecture="甘孜藏族自治州" province="四川省" 513323 county="丹巴县" prefecture="甘孜藏族自治州" province="四川省" 513324 county="九龙县" prefecture="甘孜藏族自治州" province="四川省" 513325 county="雅江县" prefecture="甘孜藏族自治州" province="四川省" 513326 county="道孚县" prefecture="甘孜藏族自治州" province="四川省" 513327 county="炉霍县" prefecture="甘孜藏族自治州" province="四川省" 513328 county="甘孜县" prefecture="甘孜藏族自治州" province="四川省" 513329 county="新龙县" prefecture="甘孜藏族自治州" province="四川省" 513330 county="德格县" prefecture="甘孜藏族自治州" province="四川省" 513331 county="白玉县" prefecture="甘孜藏族自治州" province="四川省" 513332 county="石渠县" prefecture="甘孜藏族自治州" province="四川省" 513333 county="色达县" prefecture="甘孜藏族自治州" province="四川省" 513334 county="理塘县" prefecture="甘孜藏族自治州" province="四川省" 513335 county="巴塘县" prefecture="甘孜藏族自治州" province="四川省" 513336 county="乡城县" prefecture="甘孜藏族自治州" province="四川省" 513337 county="稻城县" prefecture="甘孜藏族自治州" province="四川省" 513338 county="得荣县" prefecture="甘孜藏族自治州" province="四川省" 513401 county="西昌市" prefecture="凉山彝族自治州" province="四川省" 513422 county="木里藏族自治县" prefecture="凉山彝族自治州" province="四川省" 513423 county="盐源县" prefecture="凉山彝族自治州" province="四川省" 513424 county="德昌县" prefecture="凉山彝族自治州" province="四川省" 513425 county="会理县" prefecture="凉山彝族自治州" province="四川省" 513426 county="会东县" prefecture="凉山彝族自治州" province="四川省" 513427 county="宁南县" prefecture="凉山彝族自治州" province="四川省" 513428 county="普格县" prefecture="凉山彝族自治州" province="四川省" 513429 county="布拖县" prefecture="凉山彝族自治州" province="四川省" 513430 county="金阳县" prefecture="凉山彝族自治州" province="四川省" 513431 county="昭觉县" prefecture="凉山彝族自治州" province="四川省" 513432 county="喜德县" prefecture="凉山彝族自治州" province="四川省" 513433 county="冕宁县" prefecture="凉山彝族自治州" province="四川省" 513434 county="越西县" prefecture="凉山彝族自治州" province="四川省" 513435 county="甘洛县" prefecture="凉山彝族自治州" province="四川省" 513436 county="美姑县" prefecture="凉山彝族自治州" province="四川省" 513437 county="雷波县" prefecture="凉山彝族自治州" province="四川省" 520101 county="市辖区" prefecture="贵阳市" province="贵州省" 520102 county="南明区" prefecture="贵阳市" province="贵州省" 520103 county="云岩区" prefecture="贵阳市" province="贵州省" 520111 county="花溪区" prefecture="贵阳市" province="贵州省" 520112 county="乌当区" prefecture="贵阳市" province="贵州省" 520113 county="白云区" prefecture="贵阳市" province="贵州省" 520114 county="小河区" prefecture="贵阳市" province="贵州省" 520115 county="观山湖区" prefecture="贵阳市" province="贵州省" 520121 county="开阳县" prefecture="贵阳市" province="贵州省" 520122 county="息烽县" prefecture="贵阳市" province="贵州省" 520123 county="修文县" prefecture="贵阳市" province="贵州省" 520181 county="清镇市" prefecture="贵阳市" province="贵州省" 520201 county="钟山区" prefecture="六盘水市" province="贵州省" 520203 county="六枝特区" prefecture="六盘水市" province="贵州省" 520221 county="水城县" prefecture="六盘水市" province="贵州省" 520222 county="盘县" prefecture="六盘水市" province="贵州省" 520301 county="市辖区" prefecture="遵义市" province="贵州省" 520302 county="红花岗区" prefecture="遵义市" province="贵州省" 520303 county="汇川区" prefecture="遵义市" province="贵州省" 520321 county="遵义县" prefecture="遵义市" province="贵州省" 520322 county="桐梓县" prefecture="遵义市" province="贵州省" 520323 county="绥阳县" prefecture="遵义市" province="贵州省" 520324 county="正安县" prefecture="遵义市" province="贵州省" 520325 county="道真仡佬族苗族自治县" prefecture="遵义市" province="贵州省" 520326 county="务川仡佬族苗族自治县" prefecture="遵义市" province="贵州省" 520327 county="凤冈县" prefecture="遵义市" province="贵州省" 520328 county="湄潭县" prefecture="遵义市" province="贵州省" 520329 county="余庆县" prefecture="遵义市" province="贵州省" 520330 county="习水县" prefecture="遵义市" province="贵州省" 520381 county="赤水市" prefecture="遵义市" province="贵州省" 520382 county="仁怀市" prefecture="遵义市" province="贵州省" 520401 county="市辖区" prefecture="安顺市" province="贵州省" 520402 county="西秀区" prefecture="安顺市" province="贵州省" 520421 county="平坝县" prefecture="安顺市" province="贵州省" 520422 county="普定县" prefecture="安顺市" province="贵州省" 520423 county="镇宁布依族苗族自治县" prefecture="安顺市" province="贵州省" 520424 county="关岭布依族苗族自治县" prefecture="安顺市" province="贵州省" 520425 county="紫云苗族布依族自治县" prefecture="安顺市" province="贵州省" 520501 county="市辖区" prefecture="毕节市" province="贵州省" 520502 county="七星关区" prefecture="毕节市" province="贵州省" 520521 county="大方县" prefecture="毕节市" province="贵州省" 520522 county="黔西县" prefecture="毕节市" province="贵州省" 520523 county="金沙县" prefecture="毕节市" province="贵州省" 520524 county="织金县" prefecture="毕节市" province="贵州省" 520525 county="纳雍县" prefecture="毕节市" province="贵州省" 520526 county="威宁彝族回族苗族自治县" prefecture="毕节市" province="贵州省" 520527 county="赫章县" prefecture="毕节市" province="贵州省" 520601 county="市辖区" prefecture="铜仁市" province="贵州省" 520602 county="碧江区" prefecture="铜仁市" province="贵州省" 520603 county="万山区" prefecture="铜仁市" province="贵州省" 520621 county="江口县" prefecture="铜仁市" province="贵州省" 520622 county="玉屏侗族自治县" prefecture="铜仁市" province="贵州省" 520623 county="石阡县" prefecture="铜仁市" province="贵州省" 520624 county="思南县" prefecture="铜仁市" province="贵州省" 520625 county="印江土家族苗族自治县" prefecture="铜仁市" province="贵州省" 520626 county="德江县" prefecture="铜仁市" province="贵州省" 520627 county="沿河土家族自治县" prefecture="铜仁市" province="贵州省" 520628 county="松桃苗族自治县" prefecture="铜仁市" province="贵州省" 522201 county="铜仁市" prefecture="铜仁地区" province="贵州省" 522222 county="江口县" prefecture="铜仁地区" province="贵州省" 522223 county="玉屏侗族自治县" prefecture="铜仁地区" province="贵州省" 522224 county="石阡县" prefecture="铜仁地区" province="贵州省" 522225 county="思南县" prefecture="铜仁地区" province="贵州省" 522226 county="印江土家族苗族自治县" prefecture="铜仁地区" province="贵州省" 522227 county="德江县" prefecture="铜仁地区" province="贵州省" 522228 county="沿河土家族自治县" prefecture="铜仁地区" province="贵州省" 522229 county="松桃苗族自治县" prefecture="铜仁地区" province="贵州省" 522230 county="万山特区" prefecture="铜仁地区" province="贵州省" 522301 county="兴义市" prefecture="黔西南布依族苗族自治州" province="贵州省" 522322 county="兴仁县" prefecture="黔西南布依族苗族自治州" province="贵州省" 522323 county="普安县" prefecture="黔西南布依族苗族自治州" province="贵州省" 522324 county="晴隆县" prefecture="黔西南布依族苗族自治州" province="贵州省" 522325 county="贞丰县" prefecture="黔西南布依族苗族自治州" province="贵州省" 522326 county="望谟县" prefecture="黔西南布依族苗族自治州" province="贵州省" 522327 county="册亨县" prefecture="黔西南布依族苗族自治州" province="贵州省" 522328 county="安龙县" prefecture="黔西南布依族苗族自治州" province="贵州省" 522401 county="毕节市" prefecture="毕节地区" province="贵州省" 522422 county="大方县" prefecture="毕节地区" province="贵州省" 522423 county="黔西县" prefecture="毕节地区" province="贵州省" 522424 county="金沙县" prefecture="毕节地区" province="贵州省" 522425 county="织金县" prefecture="毕节地区" province="贵州省" 522426 county="纳雍县" prefecture="毕节地区" province="贵州省" 522427 county="威宁彝族回族苗族自治县" prefecture="毕节地区" province="贵州省" 522428 county="赫章县" prefecture="毕节地区" province="贵州省" 522601 county="凯里市" prefecture="黔东南苗族侗族自治州" province="贵州省" 522622 county="黄平县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522623 county="施秉县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522624 county="三穗县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522625 county="镇远县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522626 county="岑巩县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522627 county="天柱县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522628 county="锦屏县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522629 county="剑河县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522630 county="台江县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522631 county="黎平县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522632 county="榕江县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522633 county="从江县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522634 county="雷山县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522635 county="麻江县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522636 county="丹寨县" prefecture="黔东南苗族侗族自治州" province="贵州省" 522701 county="都匀市" prefecture="黔南布依族苗族自治州" province="贵州省" 522702 county="福泉市" prefecture="黔南布依族苗族自治州" province="贵州省" 522722 county="荔波县" prefecture="黔南布依族苗族自治州" province="贵州省" 522723 county="贵定县" prefecture="黔南布依族苗族自治州" province="贵州省" 522725 county="瓮安县" prefecture="黔南布依族苗族自治州" province="贵州省" 522726 county="独山县" prefecture="黔南布依族苗族自治州" province="贵州省" 522727 county="平塘县" prefecture="黔南布依族苗族自治州" province="贵州省" 522728 county="罗甸县" prefecture="黔南布依族苗族自治州" province="贵州省" 522729 county="长顺县" prefecture="黔南布依族苗族自治州" province="贵州省" 522730 county="龙里县" prefecture="黔南布依族苗族自治州" province="贵州省" 522731 county="惠水县" prefecture="黔南布依族苗族自治州" province="贵州省" 522732 county="三都水族自治县" prefecture="黔南布依族苗族自治州" province="贵州省" 530101 county="市辖区" prefecture="昆明市" province="云南省" 530102 county="五华区" prefecture="昆明市" province="云南省" 530103 county="盘龙区" prefecture="昆明市" province="云南省" 530111 county="官渡区" prefecture="昆明市" province="云南省" 530112 county="西山区" prefecture="昆明市" province="云南省" 530113 county="东川区" prefecture="昆明市" province="云南省" 530114 county="呈贡区" prefecture="昆明市" province="云南省" 530121 county="呈贡县" prefecture="昆明市" province="云南省" 530122 county="晋宁县" prefecture="昆明市" province="云南省" 530124 county="富民县" prefecture="昆明市" province="云南省" 530125 county="宜良县" prefecture="昆明市" province="云南省" 530126 county="石林彝族自治县" prefecture="昆明市" province="云南省" 530127 county="嵩明县" prefecture="昆明市" province="云南省" 530128 county="禄劝彝族苗族自治县" prefecture="昆明市" province="云南省" 530129 county="寻甸回族彝族自治县" prefecture="昆明市" province="云南省" 530181 county="安宁市" prefecture="昆明市" province="云南省" 530301 county="市辖区" prefecture="曲靖市" province="云南省" 530302 county="麒麟区" prefecture="曲靖市" province="云南省" 530321 county="马龙县" prefecture="曲靖市" province="云南省" 530322 county="陆良县" prefecture="曲靖市" province="云南省" 530323 county="师宗县" prefecture="曲靖市" province="云南省" 530324 county="罗平县" prefecture="曲靖市" province="云南省" 530325 county="富源县" prefecture="曲靖市" province="云南省" 530326 county="会泽县" prefecture="曲靖市" province="云南省" 530328 county="沾益县" prefecture="曲靖市" province="云南省" 530381 county="宣威市" prefecture="曲靖市" province="云南省" 530401 county="市辖区" prefecture="玉溪市" province="云南省" 530402 county="红塔区" prefecture="玉溪市" province="云南省" 530421 county="江川县" prefecture="玉溪市" province="云南省" 530422 county="澄江县" prefecture="玉溪市" province="云南省" 530423 county="通海县" prefecture="玉溪市" province="云南省" 530424 county="华宁县" prefecture="玉溪市" province="云南省" 530425 county="易门县" prefecture="玉溪市" province="云南省" 530426 county="峨山彝族自治县" prefecture="玉溪市" province="云南省" 530427 county="新平彝族傣族自治县" prefecture="玉溪市" province="云南省" 530428 county="元江哈尼族彝族傣族自治县" prefecture="玉溪市" province="云南省" 530501 county="市辖区" prefecture="保山市" province="云南省" 530502 county="隆阳区" prefecture="保山市" province="云南省" 530521 county="施甸县" prefecture="保山市" province="云南省" 530522 county="腾冲县" prefecture="保山市" province="云南省" 530523 county="龙陵县" prefecture="保山市" province="云南省" 530524 county="昌宁县" prefecture="保山市" province="云南省" 530601 county="市辖区" prefecture="昭通市" province="云南省" 530602 county="昭阳区" prefecture="昭通市" province="云南省" 530621 county="鲁甸县" prefecture="昭通市" province="云南省" 530622 county="巧家县" prefecture="昭通市" province="云南省" 530623 county="盐津县" prefecture="昭通市" province="云南省" 530624 county="大关县" prefecture="昭通市" province="云南省" 530625 county="永善县" prefecture="昭通市" province="云南省" 530626 county="绥江县" prefecture="昭通市" province="云南省" 530627 county="镇雄县" prefecture="昭通市" province="云南省" 530628 county="彝良县" prefecture="昭通市" province="云南省" 530629 county="威信县" prefecture="昭通市" province="云南省" 530630 county="水富县" prefecture="昭通市" province="云南省" 530701 county="市辖区" prefecture="丽江市" province="云南省" 530702 county="古城区" prefecture="丽江市" province="云南省" 530721 county="玉龙纳西族自治县" prefecture="丽江市" province="云南省" 530722 county="永胜县" prefecture="丽江市" province="云南省" 530723 county="华坪县" prefecture="丽江市" province="云南省" 530724 county="宁蒗彝族自治县" prefecture="丽江市" province="云南省" 530801 county="市辖区" prefecture="普洱市" province="云南省" 530802 county="思茅区" prefecture="普洱市" province="云南省" 530821 county="宁洱哈尼族彝族自治县" prefecture="普洱市" province="云南省" 530822 county="墨江哈尼族自治县" prefecture="普洱市" province="云南省" 530823 county="景东彝族自治县" prefecture="普洱市" province="云南省" 530824 county="景谷傣族彝族自治县" prefecture="普洱市" province="云南省" 530825 county="镇沅彝族哈尼族拉祜族自治县" prefecture="普洱市" province="云南省" 530826 county="江城哈尼族彝族自治县" prefecture="普洱市" province="云南省" 530827 county="孟连傣族拉祜族佤族自治县" prefecture="普洱市" province="云南省" 530828 county="澜沧拉祜族自治县" prefecture="普洱市" province="云南省" 530829 county="西盟佤族自治县" prefecture="普洱市" province="云南省" 530901 county="市辖区" prefecture="临沧市" province="云南省" 530902 county="临翔区" prefecture="临沧市" province="云南省" 530921 county="凤庆县" prefecture="临沧市" province="云南省" 530922 county="云县" prefecture="临沧市" province="云南省" 530923 county="永德县" prefecture="临沧市" province="云南省" 530924 county="镇康县" prefecture="临沧市" province="云南省" 530925 county="双江拉祜族佤族布朗族傣族自治县" prefecture="临沧市" province="云南省" 530926 county="耿马傣族佤族自治县" prefecture="临沧市" province="云南省" 530927 county="沧源佤族自治县" prefecture="临沧市" province="云南省" 532301 county="楚雄市" prefecture="楚雄彝族自治州" province="云南省" 532322 county="双柏县" prefecture="楚雄彝族自治州" province="云南省" 532323 county="牟定县" prefecture="楚雄彝族自治州" province="云南省" 532324 county="南华县" prefecture="楚雄彝族自治州" province="云南省" 532325 county="姚安县" prefecture="楚雄彝族自治州" province="云南省" 532326 county="大姚县" prefecture="楚雄彝族自治州" province="云南省" 532327 county="永仁县" prefecture="楚雄彝族自治州" province="云南省" 532328 county="元谋县" prefecture="楚雄彝族自治州" province="云南省" 532329 county="武定县" prefecture="楚雄彝族自治州" province="云南省" 532331 county="禄丰县" prefecture="楚雄彝族自治州" province="云南省" 532501 county="个旧市" prefecture="红河哈尼族彝族自治州" province="云南省" 532502 county="开远市" prefecture="红河哈尼族彝族自治州" province="云南省" 532503 county="蒙自市" prefecture="红河哈尼族彝族自治州" province="云南省" 532504 county="弥勒市" prefecture="红河哈尼族彝族自治州" province="云南省" 532522 county="蒙自县" prefecture="红河哈尼族彝族自治州" province="云南省" 532523 county="屏边苗族自治县" prefecture="红河哈尼族彝族自治州" province="云南省" 532524 county="建水县" prefecture="红河哈尼族彝族自治州" province="云南省" 532525 county="石屏县" prefecture="红河哈尼族彝族自治州" province="云南省" 532526 county="弥勒县" prefecture="红河哈尼族彝族自治州" province="云南省" 532527 county="泸西县" prefecture="红河哈尼族彝族自治州" province="云南省" 532528 county="元阳县" prefecture="红河哈尼族彝族自治州" province="云南省" 532529 county="红河县" prefecture="红河哈尼族彝族自治州" province="云南省" 532530 county="金平苗族瑶族傣族自治县" prefecture="红河哈尼族彝族自治州" province="云南省" 532531 county="绿春县" prefecture="红河哈尼族彝族自治州" province="云南省" 532532 county="河口瑶族自治县" prefecture="红河哈尼族彝族自治州" province="云南省" 532601 county="文山市" prefecture="文山壮族苗族自治州" province="云南省" 532621 county="文山县" prefecture="文山壮族苗族自治州" province="云南省" 532622 county="砚山县" prefecture="文山壮族苗族自治州" province="云南省" 532623 county="西畴县" prefecture="文山壮族苗族自治州" province="云南省" 532624 county="麻栗坡县" prefecture="文山壮族苗族自治州" province="云南省" 532625 county="马关县" prefecture="文山壮族苗族自治州" province="云南省" 532626 county="丘北县" prefecture="文山壮族苗族自治州" province="云南省" 532627 county="广南县" prefecture="文山壮族苗族自治州" province="云南省" 532628 county="富宁县" prefecture="文山壮族苗族自治州" province="云南省" 532701 county="思茅市" prefecture="思茅地区" province="云南省" 532722 county="普洱哈尼族彝族自治县" prefecture="思茅地区" province="云南省" 532723 county="墨江哈尼族自治县" prefecture="思茅地区" province="云南省" 532724 county="景东彝族自治县" prefecture="思茅地区" province="云南省" 532725 county="景谷傣族彝族自治县" prefecture="思茅地区" province="云南省" 532726 county="镇沅彝族哈尼族拉祜族自治县" prefecture="思茅地区" province="云南省" 532727 county="江城哈尼族彝族自治县" prefecture="思茅地区" province="云南省" 532728 county="孟连傣族拉祜族佤族自治县" prefecture="思茅地区" province="云南省" 532729 county="澜沧拉祜族自治县" prefecture="思茅地区" province="云南省" 532730 county="西盟佤族自治县" prefecture="思茅地区" province="云南省" 532801 county="景洪市" prefecture="西双版纳傣族自治州" province="云南省" 532822 county="勐海县" prefecture="西双版纳傣族自治州" province="云南省" 532823 county="勐腊县" prefecture="西双版纳傣族自治州" province="云南省" 532901 county="大理市" prefecture="大理白族自治州" province="云南省" 532922 county="漾濞彝族自治县" prefecture="大理白族自治州" province="云南省" 532923 county="祥云县" prefecture="大理白族自治州" province="云南省" 532924 county="宾川县" prefecture="大理白族自治州" province="云南省" 532925 county="弥渡县" prefecture="大理白族自治州" province="云南省" 532926 county="南涧彝族自治县" prefecture="大理白族自治州" province="云南省" 532927 county="巍山彝族回族自治县" prefecture="大理白族自治州" province="云南省" 532928 county="永平县" prefecture="大理白族自治州" province="云南省" 532929 county="云龙县" prefecture="大理白族自治州" province="云南省" 532930 county="洱源县" prefecture="大理白族自治州" province="云南省" 532931 county="剑川县" prefecture="大理白族自治州" province="云南省" 532932 county="鹤庆县" prefecture="大理白族自治州" province="云南省" 533102 county="瑞丽市" prefecture="德宏傣族景颇族自治州" province="云南省" 533103 county="芒市" prefecture="德宏傣族景颇族自治州" province="云南省" 533122 county="梁河县" prefecture="德宏傣族景颇族自治州" province="云南省" 533123 county="盈江县" prefecture="德宏傣族景颇族自治州" province="云南省" 533124 county="陇川县" prefecture="德宏傣族景颇族自治州" province="云南省" 533321 county="泸水县" prefecture="怒江傈僳族自治州" province="云南省" 533323 county="福贡县" prefecture="怒江傈僳族自治州" province="云南省" 533324 county="贡山独龙族怒族自治县" prefecture="怒江傈僳族自治州" province="云南省" 533325 county="兰坪白族普米族自治县" prefecture="怒江傈僳族自治州" province="云南省" 533421 county="香格里拉县" prefecture="迪庆藏族自治州" province="云南省" 533422 county="德钦县" prefecture="迪庆藏族自治州" province="云南省" 533423 county="维西傈僳族自治县" prefecture="迪庆藏族自治州" province="云南省" 533521 county="临沧县" prefecture="临沧地区" province="云南省" 533522 county="凤庆县" prefecture="临沧地区" province="云南省" 533523 county="云县" prefecture="临沧地区" province="云南省" 533524 county="永德县" prefecture="临沧地区" province="云南省" 533525 county="镇康县" prefecture="临沧地区" province="云南省" 533526 county="双江拉祜族佤族布朗族傣族自治县" prefecture="临沧地区" province="云南省" 533527 county="耿马傣族佤族自治县" prefecture="临沧地区" province="云南省" 533528 county="沧源佤族自治县" prefecture="临沧地区" province="云南省" 540101 county="市辖区" prefecture="拉萨市" province="西藏自治区" 540102 county="城关区" prefecture="拉萨市" province="西藏自治区" 540121 county="林周县" prefecture="拉萨市" province="西藏自治区" 540122 county="当雄县" prefecture="拉萨市" province="西藏自治区" 540123 county="尼木县" prefecture="拉萨市" province="西藏自治区" 540124 county="曲水县" prefecture="拉萨市" province="西藏自治区" 540125 county="堆龙德庆县" prefecture="拉萨市" province="西藏自治区" 540126 county="达孜县" prefecture="拉萨市" province="西藏自治区" 540127 county="墨竹工卡县" prefecture="拉萨市" province="西藏自治区" 540202 county="桑珠孜区" prefecture="日喀则市" province="西藏自治区" 540221 county="南木林县" prefecture="日喀则市" province="西藏自治区" 540222 county="江孜县" prefecture="日喀则市" province="西藏自治区" 540223 county="定日县" prefecture="日喀则市" province="西藏自治区" 540224 county="萨迦县" prefecture="日喀则市" province="西藏自治区" 540225 county="拉孜县" prefecture="日喀则市" province="西藏自治区" 540226 county="昂仁县" prefecture="日喀则市" province="西藏自治区" 540227 county="谢通门县" prefecture="日喀则市" province="西藏自治区" 540228 county="白朗县" prefecture="日喀则市" province="西藏自治区" 540229 county="仁布县" prefecture="日喀则市" province="西藏自治区" 540230 county="康马县" prefecture="日喀则市" province="西藏自治区" 540231 county="定结县" prefecture="日喀则市" province="西藏自治区" 540232 county="仲巴县" prefecture="日喀则市" province="西藏自治区" 540233 county="亚东县" prefecture="日喀则市" province="西藏自治区" 540234 county="吉隆县" prefecture="日喀则市" province="西藏自治区" 540235 county="聂拉木县" prefecture="日喀则市" province="西藏自治区" 540236 county="萨嘎县" prefecture="日喀则市" province="西藏自治区" 540237 county="岗巴县" prefecture="日喀则市" province="西藏自治区" 542121 county="昌都县" prefecture="昌都地区" province="西藏自治区" 542122 county="江达县" prefecture="昌都地区" province="西藏自治区" 542123 county="贡觉县" prefecture="昌都地区" province="西藏自治区" 542124 county="类乌齐县" prefecture="昌都地区" province="西藏自治区" 542125 county="丁青县" prefecture="昌都地区" province="西藏自治区" 542126 county="察雅县" prefecture="昌都地区" province="西藏自治区" 542127 county="八宿县" prefecture="昌都地区" province="西藏自治区" 542128 county="左贡县" prefecture="昌都地区" province="西藏自治区" 542129 county="芒康县" prefecture="昌都地区" province="西藏自治区" 542132 county="洛隆县" prefecture="昌都地区" province="西藏自治区" 542133 county="边坝县" prefecture="昌都地区" province="西藏自治区" 542221 county="乃东县" prefecture="山南地区" province="西藏自治区" 542222 county="扎囊县" prefecture="山南地区" province="西藏自治区" 542223 county="贡嘎县" prefecture="山南地区" province="西藏自治区" 542224 county="桑日县" prefecture="山南地区" province="西藏自治区" 542225 county="琼结县" prefecture="山南地区" province="西藏自治区" 542226 county="曲松县" prefecture="山南地区" province="西藏自治区" 542227 county="措美县" prefecture="山南地区" province="西藏自治区" 542228 county="洛扎县" prefecture="山南地区" province="西藏自治区" 542229 county="加查县" prefecture="山南地区" province="西藏自治区" 542231 county="隆子县" prefecture="山南地区" province="西藏自治区" 542232 county="错那县" prefecture="山南地区" province="西藏自治区" 542233 county="浪卡子县" prefecture="山南地区" province="西藏自治区" 542301 county="日喀则市" prefecture="日喀则地区" province="西藏自治区" 542322 county="南木林县" prefecture="日喀则地区" province="西藏自治区" 542323 county="江孜县" prefecture="日喀则地区" province="西藏自治区" 542324 county="定日县" prefecture="日喀则地区" province="西藏自治区" 542325 county="萨迦县" prefecture="日喀则地区" province="西藏自治区" 542326 county="拉孜县" prefecture="日喀则地区" province="西藏自治区" 542327 county="昂仁县" prefecture="日喀则地区" province="西藏自治区" 542328 county="谢通门县" prefecture="日喀则地区" province="西藏自治区" 542329 county="白朗县" prefecture="日喀则地区" province="西藏自治区" 542330 county="仁布县" prefecture="日喀则地区" province="西藏自治区" 542331 county="康马县" prefecture="日喀则地区" province="西藏自治区" 542332 county="定结县" prefecture="日喀则地区" province="西藏自治区" 542333 county="仲巴县" prefecture="日喀则地区" province="西藏自治区" 542334 county="亚东县" prefecture="日喀则地区" province="西藏自治区" 542335 county="吉隆县" prefecture="日喀则地区" province="西藏自治区" 542336 county="聂拉木县" prefecture="日喀则地区" province="西藏自治区" 542337 county="萨嘎县" prefecture="日喀则地区" province="西藏自治区" 542338 county="岗巴县" prefecture="日喀则地区" province="西藏自治区" 542421 county="那曲县" prefecture="那曲地区" province="西藏自治区" 542422 county="嘉黎县" prefecture="那曲地区" province="西藏自治区" 542423 county="比如县" prefecture="那曲地区" province="西藏自治区" 542424 county="聂荣县" prefecture="那曲地区" province="西藏自治区" 542425 county="安多县" prefecture="那曲地区" province="西藏自治区" 542426 county="申扎县" prefecture="那曲地区" province="西藏自治区" 542427 county="索县" prefecture="那曲地区" province="西藏自治区" 542428 county="班戈县" prefecture="那曲地区" province="西藏自治区" 542429 county="巴青县" prefecture="那曲地区" province="西藏自治区" 542430 county="尼玛县" prefecture="那曲地区" province="西藏自治区" 542431 county="双湖县" prefecture="那曲地区" province="西藏自治区" 542521 county="普兰县" prefecture="阿里地区" province="西藏自治区" 542522 county="札达县" prefecture="阿里地区" province="西藏自治区" 542523 county="噶尔县" prefecture="阿里地区" province="西藏自治区" 542524 county="日土县" prefecture="阿里地区" province="西藏自治区" 542525 county="革吉县" prefecture="阿里地区" province="西藏自治区" 542526 county="改则县" prefecture="阿里地区" province="西藏自治区" 542527 county="措勤县" prefecture="阿里地区" province="西藏自治区" 542621 county="林芝县" prefecture="林芝地区" province="西藏自治区" 542622 county="工布江达县" prefecture="林芝地区" province="西藏自治区" 542623 county="米林县" prefecture="林芝地区" province="西藏自治区" 542624 county="墨脱县" prefecture="林芝地区" province="西藏自治区" 542625 county="波密县" prefecture="林芝地区" province="西藏自治区" 542626 county="察隅县" prefecture="林芝地区" province="西藏自治区" 542627 county="朗县" prefecture="林芝地区" province="西藏自治区" 610101 county="市辖区" prefecture="西安市" province="陕西省" 610102 county="新城区" prefecture="西安市" province="陕西省" 610103 county="碑林区" prefecture="西安市" province="陕西省" 610104 county="莲湖区" prefecture="西安市" province="陕西省" 610111 county="灞桥区" prefecture="西安市" province="陕西省" 610112 county="未央区" prefecture="西安市" province="陕西省" 610113 county="雁塔区" prefecture="西安市" province="陕西省" 610114 county="阎良区" prefecture="西安市" province="陕西省" 610115 county="临潼区" prefecture="西安市" province="陕西省" 610116 county="长安区" prefecture="西安市" province="陕西省" 610122 county="蓝田县" prefecture="西安市" province="陕西省" 610124 county="周至县" prefecture="西安市" province="陕西省" 610125 county="户县" prefecture="西安市" province="陕西省" 610126 county="高陵县" prefecture="西安市" province="陕西省" 610201 county="市辖区" prefecture="铜川市" province="陕西省" 610202 county="王益区" prefecture="铜川市" province="陕西省" 610203 county="印台区" prefecture="铜川市" province="陕西省" 610204 county="耀州区" prefecture="铜川市" province="陕西省" 610222 county="宜君县" prefecture="铜川市" province="陕西省" 610301 county="市辖区" prefecture="宝鸡市" province="陕西省" 610302 county="渭滨区" prefecture="宝鸡市" province="陕西省" 610303 county="金台区" prefecture="宝鸡市" province="陕西省" 610304 county="陈仓区" prefecture="宝鸡市" province="陕西省" 610321 county="宝鸡县" prefecture="宝鸡市" province="陕西省" 610322 county="凤翔县" prefecture="宝鸡市" province="陕西省" 610323 county="岐山县" prefecture="宝鸡市" province="陕西省" 610324 county="扶风县" prefecture="宝鸡市" province="陕西省" 610326 county="眉县" prefecture="宝鸡市" province="陕西省" 610327 county="陇县" prefecture="宝鸡市" province="陕西省" 610328 county="千阳县" prefecture="宝鸡市" province="陕西省" 610329 county="麟游县" prefecture="宝鸡市" province="陕西省" 610330 county="凤县" prefecture="宝鸡市" province="陕西省" 610331 county="太白县" prefecture="宝鸡市" province="陕西省" 610401 county="市辖区" prefecture="咸阳市" province="陕西省" 610402 county="秦都区" prefecture="咸阳市" province="陕西省" 610403 county="杨陵区" prefecture="咸阳市" province="陕西省" 610404 county="渭城区" prefecture="咸阳市" province="陕西省" 610422 county="三原县" prefecture="咸阳市" province="陕西省" 610423 county="泾阳县" prefecture="咸阳市" province="陕西省" 610424 county="乾县" prefecture="咸阳市" province="陕西省" 610425 county="礼泉县" prefecture="咸阳市" province="陕西省" 610426 county="永寿县" prefecture="咸阳市" province="陕西省" 610427 county="彬县" prefecture="咸阳市" province="陕西省" 610428 county="长武县" prefecture="咸阳市" province="陕西省" 610429 county="旬邑县" prefecture="咸阳市" province="陕西省" 610430 county="淳化县" prefecture="咸阳市" province="陕西省" 610431 county="武功县" prefecture="咸阳市" province="陕西省" 610481 county="兴平市" prefecture="咸阳市" province="陕西省" 610501 county="市辖区" prefecture="渭南市" province="陕西省" 610502 county="临渭区" prefecture="渭南市" province="陕西省" 610521 county="华县" prefecture="渭南市" province="陕西省" 610522 county="潼关县" prefecture="渭南市" province="陕西省" 610523 county="大荔县" prefecture="渭南市" province="陕西省" 610524 county="合阳县" prefecture="渭南市" province="陕西省" 610525 county="澄城县" prefecture="渭南市" province="陕西省" 610526 county="蒲城县" prefecture="渭南市" province="陕西省" 610527 county="白水县" prefecture="渭南市" province="陕西省" 610528 county="富平县" prefecture="渭南市" province="陕西省" 610581 county="韩城市" prefecture="渭南市" province="陕西省" 610582 county="华阴市" prefecture="渭南市" province="陕西省" 610601 county="市辖区" prefecture="延安市" province="陕西省" 610602 county="宝塔区" prefecture="延安市" province="陕西省" 610621 county="延长县" prefecture="延安市" province="陕西省" 610622 county="延川县" prefecture="延安市" province="陕西省" 610623 county="子长县" prefecture="延安市" province="陕西省" 610624 county="安塞县" prefecture="延安市" province="陕西省" 610625 county="志丹县" prefecture="延安市" province="陕西省" 610626 county="吴起县" prefecture="延安市" province="陕西省" 610627 county="甘泉县" prefecture="延安市" province="陕西省" 610628 county="富县" prefecture="延安市" province="陕西省" 610629 county="洛川县" prefecture="延安市" province="陕西省" 610630 county="宜川县" prefecture="延安市" province="陕西省" 610631 county="黄龙县" prefecture="延安市" province="陕西省" 610632 county="黄陵县" prefecture="延安市" province="陕西省" 610701 county="市辖区" prefecture="汉中市" province="陕西省" 610702 county="汉台区" prefecture="汉中市" province="陕西省" 610721 county="南郑县" prefecture="汉中市" province="陕西省" 610722 county="城固县" prefecture="汉中市" province="陕西省" 610723 county="洋县" prefecture="汉中市" province="陕西省" 610724 county="西乡县" prefecture="汉中市" province="陕西省" 610725 county="勉县" prefecture="汉中市" province="陕西省" 610726 county="宁强县" prefecture="汉中市" province="陕西省" 610727 county="略阳县" prefecture="汉中市" province="陕西省" 610728 county="镇巴县" prefecture="汉中市" province="陕西省" 610729 county="留坝县" prefecture="汉中市" province="陕西省" 610730 county="佛坪县" prefecture="汉中市" province="陕西省" 610801 county="市辖区" prefecture="榆林市" province="陕西省" 610802 county="榆阳区" prefecture="榆林市" province="陕西省" 610821 county="神木县" prefecture="榆林市" province="陕西省" 610822 county="府谷县" prefecture="榆林市" province="陕西省" 610823 county="横山县" prefecture="榆林市" province="陕西省" 610824 county="靖边县" prefecture="榆林市" province="陕西省" 610825 county="定边县" prefecture="榆林市" province="陕西省" 610826 county="绥德县" prefecture="榆林市" province="陕西省" 610827 county="米脂县" prefecture="榆林市" province="陕西省" 610828 county="佳县" prefecture="榆林市" province="陕西省" 610829 county="吴堡县" prefecture="榆林市" province="陕西省" 610830 county="清涧县" prefecture="榆林市" province="陕西省" 610831 county="子洲县" prefecture="榆林市" province="陕西省" 610901 county="市辖区" prefecture="安康市" province="陕西省" 610902 county="汉滨区" prefecture="安康市" province="陕西省" 610921 county="汉阴县" prefecture="安康市" province="陕西省" 610922 county="石泉县" prefecture="安康市" province="陕西省" 610923 county="宁陕县" prefecture="安康市" province="陕西省" 610924 county="紫阳县" prefecture="安康市" province="陕西省" 610925 county="岚皋县" prefecture="安康市" province="陕西省" 610926 county="平利县" prefecture="安康市" province="陕西省" 610927 county="镇坪县" prefecture="安康市" province="陕西省" 610928 county="旬阳县" prefecture="安康市" province="陕西省" 610929 county="白河县" prefecture="安康市" province="陕西省" 611001 county="市辖区" prefecture="商洛市" province="陕西省" 611002 county="商州区" prefecture="商洛市" province="陕西省" 611021 county="洛南县" prefecture="商洛市" province="陕西省" 611022 county="丹凤县" prefecture="商洛市" province="陕西省" 611023 county="商南县" prefecture="商洛市" province="陕西省" 611024 county="山阳县" prefecture="商洛市" province="陕西省" 611025 county="镇安县" prefecture="商洛市" province="陕西省" 611026 county="柞水县" prefecture="商洛市" province="陕西省" 620101 county="市辖区" prefecture="兰州市" province="甘肃省" 620102 county="城关区" prefecture="兰州市" province="甘肃省" 620103 county="七里河区" prefecture="兰州市" province="甘肃省" 620104 county="西固区" prefecture="兰州市" province="甘肃省" 620105 county="安宁区" prefecture="兰州市" province="甘肃省" 620111 county="红古区" prefecture="兰州市" province="甘肃省" 620121 county="永登县" prefecture="兰州市" province="甘肃省" 620122 county="皋兰县" prefecture="兰州市" province="甘肃省" 620123 county="榆中县" prefecture="兰州市" province="甘肃省" 620201 county="市辖区" prefecture="嘉峪关市" province="甘肃省" 620301 county="市辖区" prefecture="金昌市" province="甘肃省" 620302 county="金川区" prefecture="金昌市" province="甘肃省" 620321 county="永昌县" prefecture="金昌市" province="甘肃省" 620401 county="市辖区" prefecture="白银市" province="甘肃省" 620402 county="白银区" prefecture="白银市" province="甘肃省" 620403 county="平川区" prefecture="白银市" province="甘肃省" 620421 county="靖远县" prefecture="白银市" province="甘肃省" 620422 county="会宁县" prefecture="白银市" province="甘肃省" 620423 county="景泰县" prefecture="白银市" province="甘肃省" 620501 county="市辖区" prefecture="天水市" province="甘肃省" 620502 county="秦州区" prefecture="天水市" province="甘肃省" 620503 county="麦积区" prefecture="天水市" province="甘肃省" 620521 county="清水县" prefecture="天水市" province="甘肃省" 620522 county="秦安县" prefecture="天水市" province="甘肃省" 620523 county="甘谷县" prefecture="天水市" province="甘肃省" 620524 county="武山县" prefecture="天水市" province="甘肃省" 620525 county="张家川回族自治县" prefecture="天水市" province="甘肃省" 620601 county="市辖区" prefecture="武威市" province="甘肃省" 620602 county="凉州区" prefecture="武威市" province="甘肃省" 620621 county="民勤县" prefecture="武威市" province="甘肃省" 620622 county="古浪县" prefecture="武威市" province="甘肃省" 620623 county="天祝藏族自治县" prefecture="武威市" province="甘肃省" 620701 county="市辖区" prefecture="张掖市" province="甘肃省" 620702 county="甘州区" prefecture="张掖市" province="甘肃省" 620721 county="肃南裕固族自治县" prefecture="张掖市" province="甘肃省" 620722 county="民乐县" prefecture="张掖市" province="甘肃省" 620723 county="临泽县" prefecture="张掖市" province="甘肃省" 620724 county="高台县" prefecture="张掖市" province="甘肃省" 620725 county="山丹县" prefecture="张掖市" province="甘肃省" 620801 county="市辖区" prefecture="平凉市" province="甘肃省" 620802 county="崆峒区" prefecture="平凉市" province="甘肃省" 620821 county="泾川县" prefecture="平凉市" province="甘肃省" 620822 county="灵台县" prefecture="平凉市" province="甘肃省" 620823 county="崇信县" prefecture="平凉市" province="甘肃省" 620824 county="华亭县" prefecture="平凉市" province="甘肃省" 620825 county="庄浪县" prefecture="平凉市" province="甘肃省" 620826 county="静宁县" prefecture="平凉市" province="甘肃省" 620901 county="市辖区" prefecture="酒泉市" province="甘肃省" 620902 county="肃州区" prefecture="酒泉市" province="甘肃省" 620921 county="金塔县" prefecture="酒泉市" province="甘肃省" 620922 county="瓜州县" prefecture="酒泉市" province="甘肃省" 620923 county="肃北蒙古族自治县" prefecture="酒泉市" province="甘肃省" 620924 county="阿克塞哈萨克族自治县" prefecture="酒泉市" province="甘肃省" 620981 county="玉门市" prefecture="酒泉市" province="甘肃省" 620982 county="敦煌市" prefecture="酒泉市" province="甘肃省" 621001 county="市辖区" prefecture="庆阳市" province="甘肃省" 621002 county="西峰区" prefecture="庆阳市" province="甘肃省" 621021 county="庆城县" prefecture="庆阳市" province="甘肃省" 621022 county="环县" prefecture="庆阳市" province="甘肃省" 621023 county="华池县" prefecture="庆阳市" province="甘肃省" 621024 county="合水县" prefecture="庆阳市" province="甘肃省" 621025 county="正宁县" prefecture="庆阳市" province="甘肃省" 621026 county="宁县" prefecture="庆阳市" province="甘肃省" 621027 county="镇原县" prefecture="庆阳市" province="甘肃省" 621101 county="市辖区" prefecture="定西市" province="甘肃省" 621102 county="安定区" prefecture="定西市" province="甘肃省" 621121 county="通渭县" prefecture="定西市" province="甘肃省" 621122 county="陇西县" prefecture="定西市" province="甘肃省" 621123 county="渭源县" prefecture="定西市" province="甘肃省" 621124 county="临洮县" prefecture="定西市" province="甘肃省" 621125 county="漳县" prefecture="定西市" province="甘肃省" 621126 county="岷县" prefecture="定西市" province="甘肃省" 621201 county="市辖区" prefecture="陇南市" province="甘肃省" 621202 county="武都区" prefecture="陇南市" province="甘肃省" 621221 county="成县" prefecture="陇南市" province="甘肃省" 621222 county="文县" prefecture="陇南市" province="甘肃省" 621223 county="宕昌县" prefecture="陇南市" province="甘肃省" 621224 county="康县" prefecture="陇南市" province="甘肃省" 621225 county="西和县" prefecture="陇南市" province="甘肃省" 621226 county="礼县" prefecture="陇南市" province="甘肃省" 621227 county="徽县" prefecture="陇南市" province="甘肃省" 621228 county="两当县" prefecture="陇南市" province="甘肃省" 622421 county="定西县" prefecture="定西地区" province="甘肃省" 622424 county="通渭县" prefecture="定西地区" province="甘肃省" 622425 county="陇西县" prefecture="定西地区" province="甘肃省" 622426 county="渭源县" prefecture="定西地区" province="甘肃省" 622427 county="临洮县" prefecture="定西地区" province="甘肃省" 622428 county="漳县" prefecture="定西地区" province="甘肃省" 622429 county="岷县" prefecture="定西地区" province="甘肃省" 622621 county="武都县" prefecture="陇南地区" province="甘肃省" 622623 county="宕昌县" prefecture="陇南地区" province="甘肃省" 622624 county="成县" prefecture="陇南地区" province="甘肃省" 622625 county="康县" prefecture="陇南地区" province="甘肃省" 622626 county="文县" prefecture="陇南地区" province="甘肃省" 622627 county="西和县" prefecture="陇南地区" province="甘肃省" 622628 county="礼县" prefecture="陇南地区" province="甘肃省" 622629 county="两当县" prefecture="陇南地区" province="甘肃省" 622630 county="徽县" prefecture="陇南地区" province="甘肃省" 622901 county="临夏市" prefecture="临夏回族自治州" province="甘肃省" 622921 county="临夏县" prefecture="临夏回族自治州" province="甘肃省" 622922 county="康乐县" prefecture="临夏回族自治州" province="甘肃省" 622923 county="永靖县" prefecture="临夏回族自治州" province="甘肃省" 622924 county="广河县" prefecture="临夏回族自治州" province="甘肃省" 622925 county="和政县" prefecture="临夏回族自治州" province="甘肃省" 622926 county="东乡族自治县" prefecture="临夏回族自治州" province="甘肃省" 622927 county="积石山保安族东乡族撒拉族自治县" prefecture="临夏回族自治州" province="甘肃省" 623001 county="合作市" prefecture="甘南藏族自治州" province="甘肃省" 623021 county="临潭县" prefecture="甘南藏族自治州" province="甘肃省" 623022 county="卓尼县" prefecture="甘南藏族自治州" province="甘肃省" 623023 county="舟曲县" prefecture="甘南藏族自治州" province="甘肃省" 623024 county="迭部县" prefecture="甘南藏族自治州" province="甘肃省" 623025 county="玛曲县" prefecture="甘南藏族自治州" province="甘肃省" 623026 county="碌曲县" prefecture="甘南藏族自治州" province="甘肃省" 623027 county="夏河县" prefecture="甘南藏族自治州" province="甘肃省" 630101 county="市辖区" prefecture="西宁市" province="青海省" 630102 county="城东区" prefecture="西宁市" province="青海省" 630103 county="城中区" prefecture="西宁市" province="青海省" 630104 county="城西区" prefecture="西宁市" province="青海省" 630105 county="城北区" prefecture="西宁市" province="青海省" 630121 county="大通回族土族自治县" prefecture="西宁市" province="青海省" 630122 county="湟中县" prefecture="西宁市" province="青海省" 630123 county="湟源县" prefecture="西宁市" province="青海省" 630202 county="乐都区" prefecture="海东市" province="青海省" 630221 county="平安县" prefecture="海东市" province="青海省" 630222 county="民和回族土族自治县" prefecture="海东市" province="青海省" 630223 county="互助土族自治县" prefecture="海东市" province="青海省" 630224 county="化隆回族自治县" prefecture="海东市" province="青海省" 630225 county="循化撒拉族自治县" prefecture="海东市" province="青海省" 632121 county="平安县" prefecture="海东地区" province="青海省" 632122 county="民和回族土族自治县" prefecture="海东地区" province="青海省" 632123 county="乐都县" prefecture="海东地区" province="青海省" 632126 county="互助土族自治县" prefecture="海东地区" province="青海省" 632127 county="化隆回族自治县" prefecture="海东地区" province="青海省" 632128 county="循化撒拉族自治县" prefecture="海东地区" province="青海省" 632221 county="门源回族自治县" prefecture="海北藏族自治州" province="青海省" 632222 county="祁连县" prefecture="海北藏族自治州" province="青海省" 632223 county="海晏县" prefecture="海北藏族自治州" province="青海省" 632224 county="刚察县" prefecture="海北藏族自治州" province="青海省" 632321 county="同仁县" prefecture="黄南藏族自治州" province="青海省" 632322 county="尖扎县" prefecture="黄南藏族自治州" province="青海省" 632323 county="泽库县" prefecture="黄南藏族自治州" province="青海省" 632324 county="河南蒙古族自治县" prefecture="黄南藏族自治州" province="青海省" 632521 county="共和县" prefecture="海南藏族自治州" province="青海省" 632522 county="同德县" prefecture="海南藏族自治州" province="青海省" 632523 county="贵德县" prefecture="海南藏族自治州" province="青海省" 632524 county="兴海县" prefecture="海南藏族自治州" province="青海省" 632525 county="贵南县" prefecture="海南藏族自治州" province="青海省" 632621 county="玛沁县" prefecture="果洛藏族自治州" province="青海省" 632622 county="班玛县" prefecture="果洛藏族自治州" province="青海省" 632623 county="甘德县" prefecture="果洛藏族自治州" province="青海省" 632624 county="达日县" prefecture="果洛藏族自治州" province="青海省" 632625 county="久治县" prefecture="果洛藏族自治州" province="青海省" 632626 county="玛多县" prefecture="果洛藏族自治州" province="青海省" 632701 county="玉树市" prefecture="玉树藏族自治州" province="青海省" 632721 county="玉树县" prefecture="玉树藏族自治州" province="青海省" 632722 county="杂多县" prefecture="玉树藏族自治州" province="青海省" 632723 county="称多县" prefecture="玉树藏族自治州" province="青海省" 632724 county="治多县" prefecture="玉树藏族自治州" province="青海省" 632725 county="囊谦县" prefecture="玉树藏族自治州" province="青海省" 632726 county="曲麻莱县" prefecture="玉树藏族自治州" province="青海省" 632801 county="格尔木市" prefecture="海西蒙古族藏族自治州" province="青海省" 632802 county="德令哈市" prefecture="海西蒙古族藏族自治州" province="青海省" 632821 county="乌兰县" prefecture="海西蒙古族藏族自治州" province="青海省" 632822 county="都兰县" prefecture="海西蒙古族藏族自治州" province="青海省" 632823 county="天峻县" prefecture="海西蒙古族藏族自治州" province="青海省" 640101 county="市辖区" prefecture="银川市" province="宁夏回族自治区" 640104 county="兴庆区" prefecture="银川市" province="宁夏回族自治区" 640105 county="西夏区" prefecture="银川市" province="宁夏回族自治区" 640106 county="金凤区" prefecture="银川市" province="宁夏回族自治区" 640121 county="永宁县" prefecture="银川市" province="宁夏回族自治区" 640122 county="贺兰县" prefecture="银川市" province="宁夏回族自治区" 640181 county="灵武市" prefecture="银川市" province="宁夏回族自治区" 640201 county="市辖区" prefecture="石嘴山市" province="宁夏回族自治区" 640202 county="大武口区" prefecture="石嘴山市" province="宁夏回族自治区" 640203 county="石嘴山区" prefecture="石嘴山市" province="宁夏回族自治区" 640205 county="惠农区" prefecture="石嘴山市" province="宁夏回族自治区" 640221 county="平罗县" prefecture="石嘴山市" province="宁夏回族自治区" 640222 county="陶乐县" prefecture="石嘴山市" province="宁夏回族自治区" 640223 county="惠农县" prefecture="石嘴山市" province="宁夏回族自治区" 640301 county="市辖区" prefecture="吴忠市" province="宁夏回族自治区" 640302 county="利通区" prefecture="吴忠市" province="宁夏回族自治区" 640303 county="红寺堡区" prefecture="吴忠市" province="宁夏回族自治区" 640321 county="中卫县" prefecture="吴忠市" province="宁夏回族自治区" 640322 county="中宁县" prefecture="吴忠市" province="宁夏回族自治区" 640323 county="盐池县" prefecture="吴忠市" province="宁夏回族自治区" 640324 county="同心县" prefecture="吴忠市" province="宁夏回族自治区" 640381 county="青铜峡市" prefecture="吴忠市" province="宁夏回族自治区" 640401 county="市辖区" prefecture="固原市" province="宁夏回族自治区" 640402 county="原州区" prefecture="固原市" province="宁夏回族自治区" 640421 county="海原县" prefecture="固原市" province="宁夏回族自治区" 640422 county="西吉县" prefecture="固原市" province="宁夏回族自治区" 640423 county="隆德县" prefecture="固原市" province="宁夏回族自治区" 640424 county="泾源县" prefecture="固原市" province="宁夏回族自治区" 640425 county="彭阳县" prefecture="固原市" province="宁夏回族自治区" 640501 county="市辖区" prefecture="中卫市" province="宁夏回族自治区" 640502 county="沙坡头区" prefecture="中卫市" province="宁夏回族自治区" 640521 county="中宁县" prefecture="中卫市" province="宁夏回族自治区" 640522 county="海原县" prefecture="中卫市" province="宁夏回族自治区" 650101 county="市辖区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650102 county="天山区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650103 county="沙依巴克区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650104 county="新市区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650105 county="水磨沟区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650106 county="头屯河区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650107 county="达坂城区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650108 county="东山区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650109 county="米东区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650121 county="乌鲁木齐县" prefecture="乌鲁木齐市" province="新疆维吾尔自治区" 650201 county="市辖区" prefecture="克拉玛依市" province="新疆维吾尔自治区" 650202 county="独山子区" prefecture="克拉玛依市" province="新疆维吾尔自治区" 650203 county="克拉玛依区" prefecture="克拉玛依市" province="新疆维吾尔自治区" 650204 county="白碱滩区" prefecture="克拉玛依市" province="新疆维吾尔自治区" 650205 county="乌尔禾区" prefecture="克拉玛依市" province="新疆维吾尔自治区" 652101 county="吐鲁番市" prefecture="吐鲁番地区" province="新疆维吾尔自治区" 652122 county="鄯善县" prefecture="吐鲁番地区" province="新疆维吾尔自治区" 652123 county="托克逊县" prefecture="吐鲁番地区" province="新疆维吾尔自治区" 652201 county="哈密市" prefecture="哈密地区" province="新疆维吾尔自治区" 652222 county="巴里坤哈萨克自治县" prefecture="哈密地区" province="新疆维吾尔自治区" 652223 county="伊吾县" prefecture="哈密地区" province="新疆维吾尔自治区" 652301 county="昌吉市" prefecture="昌吉回族自治州" province="新疆维吾尔自治区" 652302 county="阜康市" prefecture="昌吉回族自治州" province="新疆维吾尔自治区" 652303 county="米泉市" prefecture="昌吉回族自治州" province="新疆维吾尔自治区" 652323 county="呼图壁县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区" 652324 county="玛纳斯县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区" 652325 county="奇台县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区" 652327 county="吉木萨尔县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区" 652328 county="木垒哈萨克自治县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区" 652701 county="博乐市" prefecture="博尔塔拉蒙古自治州" province="新疆维吾尔自治区" 652702 county="阿拉山口市" prefecture="博尔塔拉蒙古自治州" province="新疆维吾尔自治区" 652722 county="精河县" prefecture="博尔塔拉蒙古自治州" province="新疆维吾尔自治区" 652723 county="温泉县" prefecture="博尔塔拉蒙古自治州" province="新疆维吾尔自治区" 652801 county="库尔勒市" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652822 county="轮台县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652823 county="尉犁县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652824 county="若羌县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652825 county="且末县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652826 county="焉耆回族自治县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652827 county="和静县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652828 county="和硕县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652829 county="博湖县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区" 652901 county="阿克苏市" prefecture="阿克苏地区" province="新疆维吾尔自治区" 652922 county="温宿县" prefecture="阿克苏地区" province="新疆维吾尔自治区" 652923 county="库车县" prefecture="阿克苏地区" province="新疆维吾尔自治区" 652924 county="沙雅县" prefecture="阿克苏地区" province="新疆维吾尔自治区" 652925 county="新和县" prefecture="阿克苏地区" province="新疆维吾尔自治区" 652926 county="拜城县" prefecture="阿克苏地区" province="新疆维吾尔自治区" 652927 county="乌什县" prefecture="阿克苏地区" province="新疆维吾尔自治区" 652928 county="阿瓦提县" prefecture="阿克苏地区" province="新疆维吾尔自治区" 652929 county="柯坪县" prefecture="阿克苏地区" province="新疆维吾尔自治区" 653001 county="阿图什市" prefecture="克孜勒苏柯尔克孜自治州" province="新疆维吾尔自治区" 653022 county="阿克陶县" prefecture="克孜勒苏柯尔克孜自治州" province="新疆维吾尔自治区" 653023 county="阿合奇县" prefecture="克孜勒苏柯尔克孜自治州" province="新疆维吾尔自治区" 653024 county="乌恰县" prefecture="克孜勒苏柯尔克孜自治州" province="新疆维吾尔自治区" 653101 county="喀什市" prefecture="喀什地区" province="新疆维吾尔自治区" 653121 county="疏附县" prefecture="喀什地区" province="新疆维吾尔自治区" 653122 county="疏勒县" prefecture="喀什地区" province="新疆维吾尔自治区" 653123 county="英吉沙县" prefecture="喀什地区" province="新疆维吾尔自治区" 653124 county="泽普县" prefecture="喀什地区" province="新疆维吾尔自治区" 653125 county="莎车县" prefecture="喀什地区" province="新疆维吾尔自治区" 653126 county="叶城县" prefecture="喀什地区" province="新疆维吾尔自治区" 653127 county="麦盖提县" prefecture="喀什地区" province="新疆维吾尔自治区" 653128 county="岳普湖县" prefecture="喀什地区" province="新疆维吾尔自治区" 653129 county="伽师县" prefecture="喀什地区" province="新疆维吾尔自治区" 653130 county="巴楚县" prefecture="喀什地区" province="新疆维吾尔自治区" 653131 county="塔什库尔干塔吉克自治县" prefecture="喀什地区" province="新疆维吾尔自治区" 653201 county="和田市" prefecture="和田地区" province="新疆维吾尔自治区" 653221 county="和田县" prefecture="和田地区" province="新疆维吾尔自治区" 653222 county="墨玉县" prefecture="和田地区" province="新疆维吾尔自治区" 653223 county="皮山县" prefecture="和田地区" province="新疆维吾尔自治区" 653224 county="洛浦县" prefecture="和田地区" province="新疆维吾尔自治区" 653225 county="策勒县" prefecture="和田地区" province="新疆维吾尔自治区" 653226 county="于田县" prefecture="和田地区" province="新疆维吾尔自治区" 653227 county="民丰县" prefecture="和田地区" province="新疆维吾尔自治区" 654002 county="伊宁市" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654003 county="奎屯市" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654021 county="伊宁县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654022 county="察布查尔锡伯自治县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654023 county="霍城县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654024 county="巩留县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654025 county="新源县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654026 county="昭苏县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654027 county="特克斯县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654028 county="尼勒克县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区" 654201 county="塔城市" prefecture="塔城地区" province="新疆维吾尔自治区" 654202 county="乌苏市" prefecture="塔城地区" province="新疆维吾尔自治区" 654221 county="额敏县" prefecture="塔城地区" province="新疆维吾尔自治区" 654223 county="沙湾县" prefecture="塔城地区" province="新疆维吾尔自治区" 654224 county="托里县" prefecture="塔城地区" province="新疆维吾尔自治区" 654225 county="裕民县" prefecture="塔城地区" province="新疆维吾尔自治区" 654226 county="和布克赛尔蒙古自治县" prefecture="塔城地区" province="新疆维吾尔自治区" 654301 county="阿勒泰市" prefecture="阿勒泰地区" province="新疆维吾尔自治区" 654321 county="布尔津县" prefecture="阿勒泰地区" province="新疆维吾尔自治区" 654322 county="富蕴县" prefecture="阿勒泰地区" province="新疆维吾尔自治区" 654323 county="福海县" prefecture="阿勒泰地区" province="新疆维吾尔自治区" 654324 county="哈巴河县" prefecture="阿勒泰地区" province="新疆维吾尔自治区" 654325 county="青河县" prefecture="阿勒泰地区" province="新疆维吾尔自治区" 654326 county="吉木乃县" prefecture="阿勒泰地区" province="新疆维吾尔自治区" 659001 county="石河子市" prefecture="自治区直辖县级行政区划" province="新疆维吾尔自治区" 659002 county="阿拉尔市" prefecture="自治区直辖县级行政区划" province="新疆维吾尔自治区" 659003 county="图木舒克市" prefecture="自治区直辖县级行政区划" province="新疆维吾尔自治区" 659004 county="五家渠市" prefecture="自治区直辖县级行政区划" province="新疆维吾尔自治区" python-stdnum-1.2/stdnum/cn/ric.py0000644000000000000000000000703612517406343017217 0ustar rootroot00000000000000# ric.py - functions for handling Chinese Resident Identity Card Number # # Copyright (C) 2014 Jiangge Zhang # # 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 """RIC No. (Chinese Resident Identity Card Number). The RIC No. is the unique identifier for issued to China (PRC) residents. The number consist of 18 digits in four sections. The first 6 digits refers to the resident's location, followed by 8 digits represeting the resident's birth day in the form YYYY-MM-DD. The next 3 digits is the order code which is the code used to disambiguate people with the same date of birth and address code. Men are assigned to odd numbers, women assigned to even numbers. The final digit is the checksum. >>> validate('360426199101010071') '360426199101010071' """ import datetime from stdnum.exceptions import ( ValidationError, InvalidLength, InvalidFormat, InvalidChecksum, InvalidComponent) from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number).upper().strip() def get_birth_date(number): """Split the date parts from the number and return the birth date. Note that in some cases it may return the registration date instead of the birth date and it may be a century off.""" number = compact(number) year = int(number[6:10]) month = int(number[10:12]) day = int(number[12:14]) try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def get_birth_place(number): """Use the number to look up the place of birth of the person.""" from stdnum import numdb number = compact(number) results = numdb.get('cn/loc').info(number[:6])[0][1] if not results: raise InvalidComponent() return results def calc_check_digit(number): checksum = (1 - 2 * int(number[:-1], 13)) % 11 return 'X' if checksum == 10 else str(checksum) def validate(number): """Checks to see if the number provided is a valid RIC numbers. This checks the length, formatting and birth date and place.""" number = compact(number) if len(number) != 18: raise InvalidLength() if not number[:-1].isdigit(): raise InvalidFormat() if not number[-1].isdigit() and number[-1] != 'X': raise InvalidFormat() if number[-1] != calc_check_digit(number): raise InvalidChecksum() get_birth_date(number) get_birth_place(number) return number def is_valid(number): """Checks to see if the number provided is a valid RIC numbers. This checks the length, formatting and birth date and place.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" return compact(number) python-stdnum-1.2/stdnum/iban.dat0000644000000000000000000000573312606431675017102 0ustar rootroot00000000000000# generated from IBAN_Registry.txt, downloaded from # http://www.swift.com/dsp/resources/documents/IBAN_Registry.txt AL country="Albania" bban="8!n16!c" AD country="Andorra" bban="4!n4!n12!c" AT country="Austria" bban="5!n11!n" AZ country="Republic of Azerbaijan" bban="4!a20!c" BH country="Bahrain (Kingdom of)" bban="4!a14!c" BE country="Belgium" bban="3!n7!n2!n" BA country="Bosnia and Herzegovina" bban="3!n3!n8!n2!n" BR country="Brazil" bban="8!n5!n10!n1!a1!c" BG country="Bulgaria" bban="4!a4!n2!n8!c" CR country="Costa Rica" bban="3!n14!n" HR country="Croatia" bban="7!n10!n" CY country="Cyprus" bban="3!n5!n16!c" CZ country="Czech Republic" bban="4!n6!n10!n" DK country="Denmark" bban="4!n9!n1!n" FO country="Denmark" bban="4!n9!n1!n" GL country="Denmark" bban="4!n9!n1!n" DO country="Dominican Republic" bban="4!c20!n" EE country="Estonia" bban="2!n2!n11!n1!n" FI country="Finland" bban="6!n7!n1!n" FR country="France" bban="5!n5!n11!c2!n" GE country="Georgia" bban="2!a16!n" DE country="Germany" bban="8!n10!n" GI country="Gibraltar" bban="4!a15!c" GR country="Greece" bban="3!n4!n16!c" GT country="Guatemala" bban="4!c20!c" HU country="Hungary" bban="3!n4!n1!n15!n1!n" IS country="Iceland" bban="4!n2!n6!n10!n" IE country="Ireland" bban="4!a6!n8!n" IL country="Israel" bban="3!n3!n13!n" IT country="Italy" bban="1!a5!n5!n12!c" JO country="Jordan" bban="4!a4!n18!c" KZ country="Kazakhstan" bban="3!n13!c" XK country="Republic of Kosovo" bban="4!n10!n2!n" KW country="Kuwait" bban="4!a22!c" LV country="Latvia" bban="4!a13!c" LB country="Lebanon" bban="4!n20!c" LI country="Liechtenstein (Principality of)" bban="5!n12!c" LT country="Lithuania" bban="5!n11!n" LU country="Luxembourg" bban="3!n13!c" MK country="Macedonia, Former Yugoslav Republic of" bban="3!n10!c2!n" MT country="Malta" bban="4!a5!n18!c" MR country="Mauritania" bban="5!n5!n11!n2!n" MU country="Mauritius" bban="4!a2!n2!n12!n3!n3!a" MD country="Moldova" bban="2!c18!c" MC country="Monaco" bban="5!n5!n11!c2!n" ME country="Montenegro" bban="3!n13!n2!n" NL country="The Netherlands" bban="4!a10!n" NO country="Norway" bban="4!n6!n1!n" PK country="Pakistan" bban="4!a16!c" PS country="Palestine, State of" bban="4!a21!c" PL country="Poland" bban="8!n16!n" PT country="Portugal" bban="4!n4!n11!n2!n" QA country="Qatar" bban="4!a21!c" RO country="Romania" bban="4!a16!c" LC country="Saint Lucia" bban="4!a24n" SM country="San Marino" bban="1!a5!n5!n12!c" ST country="Sao Tome And Principe" bban="8!n11!n2!n" SA country="Saudi Arabia" bban="2!n18!c" RS country="Serbia" bban="3!n13!n2!n" SK country="Slovak Republic" bban="4!n6!n10!n" SI country="Slovenia" bban="5!n8!n2!n" ES country="Spain" bban="4!n4!n1!n1!n10!n" SE country="Sweden" bban="3!n16!n1!n" CH country="Switzerland" bban="5!n12!c" TL country="Timor-Leste" bban="3!n14!n2!n" TN country="Tunisia" bban="2!n3!n13!n2!n" TR country="Turkey" bban="5!n1!n16!c" AE country="United Arab Emirates" bban="3!n16!n" GB country="United Kingdom" bban="4!a6!n8!n" VG country="Virgin Islands, British" bban="4!a16!n" python-stdnum-1.2/stdnum/cusip.py0000644000000000000000000000546312606425204017163 0ustar rootroot00000000000000# cusip.py - functions for handling CUSIP numbers # # Copyright (C) 2015 Arthur de Jong # # 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 """CUSIP number (financial security identification number). CUSIP (Committee on Uniform Securities Identification Procedures) numbers are used to identify financial securities. CUSIP numbers are a nine-character alphanumeric code where the first six characters identify the issuer, followed by two digits that identify and a check digit. More information: https://en.wikipedia.org/wiki/CUSIP https://www.cusip.com/ >>> validate('DUS0421C5') 'DUS0421C5' >>> validate('DUS0421CN') Traceback (most recent call last): ... InvalidChecksum: ... >>> to_isin('91324PAE2') 'US91324PAE25' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip().upper() # O and I are not valid but are accounted for in the check digit calculation _alphabet = '0123456789ABCDEFGH JKLMN PQRSTUVWXYZ*@#' def calc_check_digit(number): """Calculate the check digits for the number.""" # convert to numeric first, then sum individual digits number = ''.join( str((i % 2 + 1) * _alphabet.index(n)) for i, n in enumerate(number)) return str((10 - sum(int(n) for n in number)) % 10) def validate(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" number = compact(number) if not all(x in _alphabet for x in number): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" try: return bool(validate(number)) except ValidationError: return False def to_isin(number): """Convert the number to an ISIN.""" from stdnum import isin return isin.from_natid('US', number) python-stdnum-1.2/stdnum/ismn.py0000644000000000000000000001035612601744731017007 0ustar rootroot00000000000000# ismn.py - functions for handling ISMNs # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """ISMN (International Standard Music Number). The ISMN (International Standard Music Number) is used to identify sheet music. This module handles both numbers in the 10-digit 13-digit format. >>> validate('979-0-3452-4680-5') '9790345246805' >>> validate('9790060115615') '9790060115615' >>> ismn_type(' M-2306-7118-7') 'ISMN10' >>> validate('9790060115614') Traceback (most recent call last): ... InvalidChecksum: ... >>> compact(' 979-0-3452-4680-5') '9790345246805' >>> format('9790060115615') '979-0-060-11561-5' >>> format('M230671187') '979-0-2306-7118-7' >>> to_ismn13('M230671187') '9790230671187' """ from stdnum import ean from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the ISMN to the minimal representation. This strips the number of any valid ISMN separators and removes surrounding whitespace.""" return clean(number, ' -.').strip().upper() def validate(number): """Checks to see if the number provided is a valid ISMN (either a legacy 10-digit one or a 13-digit one). This checks the length and the check bit but does not check if the publisher is known.""" number = compact(number) if len(number) == 10: if number[0] != 'M': raise InvalidFormat() ean.validate('9790' + number[1:]) else: ean.validate(number) return number def ismn_type(number): """Check the type of ISMN number passed and return 'ISMN13', 'ISMN10' or None (for invalid).""" try: number = validate(number) except ValidationError: return None if len(number) == 10: return 'ISMN10' else: # len(number) == 13: return 'ISMN13' def is_valid(number): """Checks to see if the number provided is a valid ISMN (either a legacy 10-digit one or a 13-digit one). This checks the length and the check bit but does not check if the publisher is known.""" try: return bool(validate(number)) except ValidationError: return False def to_ismn13(number): """Convert the number to ISMN13 (EAN) format.""" number = number.strip() min_number = compact(number) if len(min_number) == 13: return number # nothing to do, already 13 digit format # add prefix and strip the M if ' ' in number: return '979 0' + number[1:] elif '-' in number: return '979-0' + number[1:] else: return '9790' + number[1:] # these are the ranges allocated to publisher codes _ranges = ( (3, '000', '099'), (4, '1000', '3999'), (5, '40000', '69999'), (6, '700000', '899999'), (7, '9000000', '9999999')) def split(number): """Split the specified ISMN into a bookland prefix (979), an ISMN prefix (0), a publisher element (3 to 7 digits), an item element (2 to 6 digits) and a check digit.""" # clean up number number = to_ismn13(compact(number)) # rind the correct range and split the number for length, low, high in _ranges: if low <= number[4:4 + length] <= high: return (number[:3], number[3], number[4:4 + length], number[4 + length:-1], number[-1]) def format(number, separator='-'): """Reformat the passed number to the standard format with the prefixes, the publisher element, the item element and the check-digit separated by the specified separator. The number is converted to the 13-digit format silently.""" return separator.join(x for x in split(number) if x) python-stdnum-1.2/stdnum/ee/0000755000000000000000000000000012606445507016057 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/ee/kmkr.py0000644000000000000000000000430212606424566017376 0ustar rootroot00000000000000# kmkr.py - functions for handling Estonian VAT numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """KMKR (Käibemaksukohuslase, Estonian VAT number). >>> compact('EE 100 931 558') '100931558' >>> validate('100594102') '100594102' >>> validate('100594103') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' ').upper().strip() if number.startswith('EE'): number = number[2:] return number def checksum(number): """Calculate the checksum.""" weights = (3, 7, 1, 3, 7, 1, 3, 7, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 10 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ee/ik.py0000644000000000000000000000656212601744731017041 0ustar rootroot00000000000000# ik.py - functions for handling Estonian Personal ID numbers (IK) # coding: utf-8 # # Copyright (C) 2015 Tomas Karasek # Copyright (C) 2015 Arthur de Jong # # 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 """Isikukood (Estonian Personcal ID number). The number consists of 11 digits: the first indicates the gender and century the person was born in, the following 6 digits the birth date, followed by a 3 digit serial and a check digit. >>> validate('36805280109') '36805280109' >>> validate('36805280108') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> get_birth_date('36805280109') datetime.date(1968, 5, 28) """ import datetime from stdnum.util import clean from stdnum.exceptions import * def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip() def get_birth_date(number): """Split the date parts from the number and return the birth date.""" number = compact(number) if number[0] in '12': century = 1800 elif number[0] in '34': century = 1900 elif number[0] in '56': century = 2000 elif number[0] in '78': century = 2100 else: raise InvalidComponent() year = century + int(number[1:3]) month = int(number[3:5]) day = int(number[5:7]) try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def get_gender(number): """Get the person's birth gender ('M' or 'F').""" number = compact(number) if number[0] in '1357': return 'M' elif number[0] in '2468': return 'F' else: raise InvalidComponent() def calc_check_digit(number): """Calculate the check digit.""" check = sum(((i % 9) + 1) * int(n) for i, n in enumerate(number[:-1])) % 11 if check == 10: check = sum((((i + 2) % 9) + 1) * int(n) for i, n in enumerate(number[:-1])) % 11 return str(check % 10) def validate(number): """Checks if the number provided is valid. This checks the length, formatting, embedded date and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 11: raise InvalidLength() get_birth_date(number) if number[-1] != calc_check_digit(number): raise InvalidChecksum() return number def is_valid(number): """Checks if the number provided is valid. This checks the length, formatting, embedded date and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ee/__init__.py0000644000000000000000000000164311720140727020164 0ustar rootroot00000000000000# __init__.py - collection of Estonian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Estonian numbers.""" # provide vat as an alias from stdnum.ee import kmkr as vat python-stdnum-1.2/stdnum/ru/0000755000000000000000000000000012606445507016114 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/ru/inn.py0000644000000000000000000000612312601744732017251 0ustar rootroot00000000000000# inn.py - functions for handling Russian VAT numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """ИНН (Идентификационный номер налогоплательщика, Russian tax identifier). The Indentifikatzionny nomer nalogoplatel'shchika is a Russian tax identification number that consists 10 digits for companies and 12 digits for persons. >>> validate('123456789047') '123456789047' >>> validate('1234567894') '1234567894' >>> validate('123456789037') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('1234567895') Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip() def calc_company_check_digit(number): """Calculate the check digit for the 10-digit ИНН for organisations.""" weights = (2, 4, 10, 3, 5, 9, 4, 6, 8) return str(sum(weights[i] * int(n) for i, n in enumerate(number[:9])) % 11 % 10) def calc_personal_check_digits(number): """Calculate the check digits for the 12-digit personal ИНН.""" weights = (7, 2, 4, 10, 3, 5, 9, 4, 6, 8) d1 = str(sum(weights[i] * int(n) for i, n in enumerate(number[:10])) % 11 % 10) weights = (3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8) d2 = str(sum(weights[i] * int(n) for i, n in enumerate(number[:10] + d1)) % 11 % 10) return d1 + d2 def validate(number): """Checks to see if the number provided is a valid ИНН. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) == 10: if calc_company_check_digit(number) != number[-1]: raise InvalidChecksum() elif len(number) == 12: # persons if calc_personal_check_digits(number) != number[-2:]: raise InvalidChecksum() else: raise InvalidLength() return number def is_valid(number): """Checks to see if the number provided is a valid ИНН. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ru/__init__.py0000644000000000000000000000154412606424756020234 0ustar rootroot00000000000000# __init__.py - collection of Russian numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Collection of Russian numbers.""" python-stdnum-1.2/stdnum/gr/0000755000000000000000000000000012606445507016076 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/gr/__init__.py0000644000000000000000000000154011720140730020171 0ustar rootroot00000000000000# __init__.py - collection of Greek numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Greek numbers.""" python-stdnum-1.2/stdnum/gr/vat.py0000644000000000000000000000475412606424540017246 0ustar rootroot00000000000000# vat.py - functions for handling Greek VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """FPA, ΦΠΑ, ΑΦΜ (Αριθμός Φορολογικού Μητρώου, the Greek VAT number). The FPA is a 9-digit number with a simple checksum. >>> compact('GR 23456783') '023456783' >>> validate('EL 094259216 ') '094259216' >>> validate('EL 123456781') Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -./:').upper().strip() if number.startswith('EL') or number.startswith('GR'): number = number[2:] if len(number) == 8: number = '0' + number # old format had 8 digits return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" checksum = 0 for n in number: checksum = checksum * 2 + int(n) return str(checksum * 2 % 11 % 10) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/__init__.py0000644000000000000000000002052612606445152017600 0ustar rootroot00000000000000# __init__.py - main module # coding: utf-8 # # Copyright (C) 2010-2015 Arthur de Jong # # 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 """Parse, validate and reformat standard numbers and codes. This library offers functions for parsing, validating and reformatting standard numbers and codes in various formats. Currently this package supports the following formats: * al.nipt: NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number) * ar.cuit: CUIT (Código Único de Identificación Tributaria, Argentinian tax number) * at.businessid: Austrian Company Register Numbers * at.uid: UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number) * be.vat: BTW, TVA, NWSt (Belgian VAT number) * bg.egn: EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes) * bg.pnf: PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner) * bg.vat: VAT (Идентификационен номер по ДДС, Bulgarian VAT number) * br.cnpj: CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazillian company identifier) * br.cpf: CPF (Cadastro de Pessoas Físicas, Brazillian national identifier) * ch.ssn: Swiss social security number ("Sozialversicherungsnummer") * ch.uid: UID (Unternehmens-Identifikationsnummer, Swiss business identifier) * ch.vat: VAT, MWST, TVA, IVA, TPV (Mehrwertsteuernummer, the Swiss VAT number) * cl.rut: RUT (Rol Único Tributario, Chilean national tax number) * cn.ric: RIC No. (Chinese Resident Identity Card Number) * co.nit: NIT (Número De Identificación Tributaria, Colombian identity code) * cusip: CUSIP number (financial security identification number) * cy.vat: Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number) * cz.dic: DIČ (Daňové identifikační číslo, Czech VAT number) * cz.rc: RČ (Rodné číslo, the Czech birth number) * de.vat: Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number) * de.wkn: Wertpapierkennnummer (German securities identification code) * dk.cpr: CPR (personnummer, the Danish citizen number) * dk.cvr: CVR (Momsregistreringsnummer, Danish VAT number) * do.cedula: Cedula (Dominican Republic national identification number) * do.rnc: RNC (Registro Nacional del Contribuyente, Dominican Republic tax number) * ean: EAN (International Article Number) * ec.ci: CI (Cédula de identidad, Ecuadorian personal identity code) * ec.ruc: RUC (Registro Único de Contribuyentes, Ecuadorian company tax number) * ee.ik: Isikukood (Estonian Personcal ID number) * ee.kmkr: KMKR (Käibemaksukohuslase, Estonian VAT number) * es.cif: CIF (Certificado de Identificación Fiscal, Spanish company tax number) * es.dni: DNI (Documento nacional de identidad, Spanish personal identity codes) * es.nie: NIE (Número de Identificación de Extranjeros, Spanish foreigner number) * es.nif: NIF (Número de Identificación Fiscal, Spanish VAT number) * eu.at_02: SEPA Identifier of the Creditor (AT-02) * eu.vat: VAT (European Union VAT number) * fi.alv: ALV nro (Arvonlisäveronumero, Finnish VAT number) * fi.associationid: Finnish Association Identifier * fi.hetu: HETU (Henkilötunnus, Finnish personal identity code) * fi.ytunnus: Y-tunnus (Finnish business identifier) * fr.siren: SIREN (a French company identification number) * fr.tva: n° TVA (taxe sur la valeur ajoutée, French VAT number) * gb.sedol: SEDOL number (Stock Exchange Daily Official List number) * gb.vat: VAT (United Kingdom (and Isle of Man) VAT registration number) * gr.vat: FPA, ΦΠΑ, ΑΦΜ (Αριθμός Φορολογικού Μητρώου, the Greek VAT number) * grid: GRid (Global Release Identifier) * hr.oib: OIB (Osobni identifikacijski broj, Croatian identification number) * hu.anum: ANUM (Közösségi adószám, Hungarian VAT number) * iban: IBAN (International Bank Account Number) * ie.pps: PPS No (Personal Public Service Number, Irish personal number) * ie.vat: VAT (Irish VAT number) * imei: IMEI (International Mobile Equipment Identity) * imo: IMO number (International Maritime Organization number) * imsi: IMSI (International Mobile Subscriber Identity) * is_.kennitala: Kennitala (Icelandic personal and organisation identity code) * is_.vsk: VSK number (Virðisaukaskattsnúmer, Icelandic VAT number) * isan: ISAN (International Standard Audiovisual Number) * isbn: ISBN (International Standard Book Number) * isil: ISIL (International Standard Identifier for Libraries) * isin: ISIN (International Securities Identification Number) * ismn: ISMN (International Standard Music Number) * iso6346: ISO 6346 (International standard for container identification) * iso9362: ISO 9362 (Business identifier codes) * issn: ISSN (International Standard Serial Number) * it.codicefiscale: Codice Fiscale (Italian tax code for individuals) * it.iva: Partita IVA (Italian VAT number) * lt.pvm: PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number) * lu.tva: TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number) * lv.pvn: PVN (Pievienotās vērtības nodokļa, Latvian VAT number) * meid: MEID (Mobile Equipment Identifier) * mt.vat: VAT (Maltese VAT number) * mx.rfc: RFC (Registro Federal de Contribuyentes, Mexican tax number) * my.nric: NRIC No. (Malaysian National Registration Identity Card Number) * nl.brin: Brin number (Dutch number for schools) * nl.bsn: BSN (Burgerservicenummer, Dutch national identification number) * nl.btw: BTW-nummer (Omzetbelastingnummer, the Dutch VAT number) * nl.onderwijsnummer: Onderwijsnummer (Dutch student school number) * nl.postcode: Postcode (Dutch postal code) * no.mva: MVA (Merverdiavgift, Norwegian VAT number) * no.orgnr: Orgnr (Organisasjonsnummer, Norwegian organisation number) * pl.nip: NIP (Numer Identyfikacji Podatkowej, Polish VAT number) * pl.pesel: PESEL (Polish national identification number) * pl.regon: REGON (Rejestr Gospodarki Narodowej, Polish register of economic units) * pt.nif: NIF (Número de identificação fiscal, Portuguese VAT number) * ro.cf: CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number) * ro.cnp: CNP (Cod Numeric Personal, Romanian Numerical Personal Code) * ru.inn: ИНН (Идентификационный номер налогоплательщика, Russian tax identifier) * se.orgnr: Orgnr (Organisationsnummer, Swedish company number) * se.vat: VAT (Moms, Mervärdesskatt, Swedish VAT number) * si.ddv: ID za DDV (Davčna številka, Slovenian VAT number) * sk.dph: IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number) * sk.rc: RČ (Rodné číslo, the Slovak birth number) * sm.coe: COE (Codice operatore economico, San Marino national tax number) * us.atin: ATIN (U.S. Adoption Taxpayer Identification Number) * us.ein: EIN (U.S. Employer Identification Number) * us.itin: ITIN (U.S. Individual Taxpayer Identification Number) * us.ptin: PTIN (U.S. Preparer Tax Identification Number) * us.rtn: RTN (Routing transport number) * us.ssn: SSN (U.S. Social Security Number) * us.tin: TIN (U.S. Taxpayer Identification Number) Furthermore a number of generic check digit algorithms are available: * iso7064.mod_11_10: The ISO 7064 Mod 11, 10 algorithm * iso7064.mod_11_2: The ISO 7064 Mod 11, 2 algorithm * iso7064.mod_37_2: The ISO 7064 Mod 37, 2 algorithm * iso7064.mod_37_36: The ISO 7064 Mod 37, 36 algorithm * iso7064.mod_97_10: The ISO 7064 Mod 97, 10 algorithm * luhn: The Luhn and Luhn mod N algorithms * verhoeff: The Verhoeff algorithm All modules implement a common interface: >>> from stdnum import isbn >>> isbn.validate('978-9024538270') '9789024538270' >>> isbn.validate('978-9024538271') Traceback (most recent call last): ... InvalidChecksum: ... Apart from the validate() function, modules generally provide extra parsing, validation, formatting or conversion functions. """ # the version number of the library __version__ = '1.2' python-stdnum-1.2/stdnum/imo.py0000644000000000000000000000524412606424755016633 0ustar rootroot00000000000000# imo.py - functions for handling IMO numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """IMO number (International Maritime Organization number). A number used to uniquely identify ships (the hull) for purposes of registering owners and management companies. The ship identification number consists of a six-digit sequentially assigned number and a check digit. The number is usually prefixed with "IMO". Note that there seem to be a large number of ships with an IMO that does not have a valid check digit or even have a different length. >>> validate('IMO 9319466') '9319466' >>> validate('IMO 8814275') '8814275' >>> validate('8814274') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('8814275') 'IMO 8814275' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' ').upper().strip() if number.startswith('IMO'): number = number[3:] return number def calc_check_digit(number): """Calculate the check digits for the number.""" return str(sum(int(n) * (7 - i) for i, n in enumerate(number[:6])) % 10) def validate(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 7: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" return 'IMO ' + compact(number) python-stdnum-1.2/stdnum/numdb.py0000644000000000000000000001465012606432040017137 0ustar rootroot00000000000000# numdb.py - module for handling hierarchically organised numbers # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """Query structured number format files with number properties. This module contains functions for reading and querying a database that stores numbers that use a hierarchical format (e.g. ISBN, IBAN, phone numbers, etc). To read a database from a file: >>> dbfile = read(open('tests/numdb-test.dat', 'r')) To split a number: >>> dbfile.split('01006') ['0', '100', '6'] >>> dbfile.split('902006') ['90', '20', '06'] >>> dbfile.split('909856') ['90', '985', '6'] To split the number and get properties for each part: >>> dbfile.info('01006') == [ ... ('0', {'prop1': 'foo'}), ... ('100', {'prop2': 'bar'}), ... ('6', {}), ... ] True >>> dbfile.info('02006') == [ ... ('0', {'prop1': 'foo'}), ... ('200', {'prop2': 'bar', 'prop3': 'baz'}), ... ('6', {}), ... ] True >>> dbfile.info('03456') == [ ... ('0', {'prop1': 'foo'}), ... ('345', {'prop2': 'bar', 'prop3': 'baz'}), ... ('6', {}), ... ] True >>> dbfile.info('902006') == [ ... ('90', {'prop1': 'booz'}), ... ('20', {'prop2': 'foo'}), ... ('06', {}), ... ] True >>> dbfile.info('909856') == [ ... ('90', {'prop1': 'booz'}), ... ('985', {'prop2': 'fooz'}), ... ('6', {}), ... ] True >>> dbfile.info('9889') == [ ... ('98', {'prop1': 'booz'}), ... ('89', {'prop2': 'foo'}), ... ] True >>> dbfile.info('633322') == [ ... ('6', {'prop1': 'boo'}), ... ('333', {'prop2': 'bar', 'prop3': 'baz'}), ... ('22', {}), ... ] True """ import re from pkg_resources import resource_stream _line_re = re.compile( r'^(?P *)' r'(?P([^-,\s]+(-[^-,\s]+)?)(,[^-,\s]+(-[^-,\s]+)?)*)\s*' r'(?P.*)$') _prop_re = re.compile( r'(?P[0-9a-zA-Z-_]+)="(?P[^"]*)"') # this is a cache of open databases _open_databases = {} # the prefixes attribute of NumDB is structured as follows: # prefixes = [ # [ length, low, high, props, children ] # ... # ] # where children is a prefixes structure in its own right # (there is no expected ordering within the list) class NumDB(object): def __init__(self): self.prefixes = [] @staticmethod def _merge(results): """Merge the provided list of possible results into a single result list (this is a generator).""" # expand the results to all have the same length ml = max(len(x) for x in results) results = [x + (ml - len(x)) * [None] for x in results] # go over each part for parts in zip(*results): # regroup parts into parts list and properties list partlist, proplist = list(zip(*(x for x in parts if x))) part = min(partlist, key=len) props = {} for p in proplist: props.update(p) yield part, props @staticmethod def _find(number, prefixes): """Lookup the specified number in the list of prefixes, this will return basically what info() should return but works recursively.""" if not number: return [] results = [] if prefixes: for length, low, high, props, children in prefixes: if low <= number[:length] <= high and len(number) >= length: results.append([(number[:length], props)] + NumDB._find(number[length:], children)) # not-found fallback if not results: return [(number, {})] # merge the results into a single result return list(NumDB._merge(results)) def info(self, number): """Split the provided number in components and associate properties with each component. This returns a tuple of tuples. Each tuple consists of a string (a part of the number) and a dict of properties. """ return NumDB._find(number, self.prefixes) def split(self, number): """Split the provided number in components. This returns a tuple with the number of components identified.""" return [part for part, props in self.info(number)] def _parse(fp): """Read lines of text from the file pointer and generate indent, length, low, high, properties tuples.""" for line in fp: # ignore comments if line[0] == '#' or line.strip() == '': continue # pragma: no cover (optimisation takes it out) # any other line should parse match = _line_re.search(line) indent = len(match.group('indent')) ranges = match.group('ranges') props = dict(_prop_re.findall(match.group('props'))) for rnge in ranges.split(','): if '-' in rnge: low, high = rnge.split('-') else: low, high = rnge, rnge yield indent, len(low), low, high, props def read(fp): """Return a new database with the data read from the specified file.""" last_indent = 0 db = NumDB() stack = {0: db.prefixes} for indent, length, low, high, props in _parse(fp): if indent > last_indent: # populate the children field of the last indent if stack[last_indent][-1][4] is None: stack[last_indent][-1][4] = [] stack[indent] = stack[last_indent][-1][4] stack[indent].append([length, low, high, props, None]) last_indent = indent return db def get(name): """Opens a database with the specified name to perform queries on.""" if name not in _open_databases: import codecs reader = codecs.getreader('utf-8') db = read(reader(resource_stream(__name__, name + '.dat'))) _open_databases[name] = db return _open_databases[name] python-stdnum-1.2/stdnum/issn.py0000644000000000000000000000561612154624371017020 0ustar rootroot00000000000000# issn.py - functions for handling ISSNs # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """ISSN (International Standard Serial Number). The ISSN (International Standard Serial Number) is the standard code to identify periodical publications. It has a checksum similar to ISBN-10. >>> validate('0024-9319') '00249319' >>> validate('0032147X') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('003214712') Traceback (most recent call last): ... InvalidLength: ... >>> compact('0032-1478') '00321478' >>> format('00249319') '0024-9319' >>> to_ean('0264-3596') '9770264359008' """ from stdnum import ean from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the ISSN to the minimal representation. This strips the number of any valid ISSN separators and removes surrounding whitespace.""" return clean(number, ' -').strip().upper() def calc_check_digit(number): """Calculate the ISSN check digit for 10-digit numbers. The number passed should not have the check bit included.""" check = (11 - sum((8 - i) * int(n) for i, n in enumerate(number))) % 11 return 'X' if check == 10 else str(check) def validate(number): """Checks to see if the number provided is a valid ISSN. This checks the length and whether the check digit is correct.""" number = compact(number) if not number[:-1].isdigit(): raise InvalidFormat() if len(number) != 8: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid ISSN. This checks the length and whether the check digit is correct.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:4] + '-' + number[4:] def to_ean(number, issue_code='00'): """Convert the number to EAN-13 format.""" number = '977' + validate(number)[:-1] + issue_code return number + ean.calc_check_digit(number) python-stdnum-1.2/stdnum/es/0000755000000000000000000000000012606445507016075 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/es/nie.py0000644000000000000000000000457112154624370017224 0ustar rootroot00000000000000# nie.py - functions for handling Spanish foreigner identity codes # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """NIE (Número de Identificación de Extranjeros, Spanish foreigner number). The NIE is an identification number for foreigners. It is a 9 digit number where the first digit is either X, Y or Z and last digit is a checksum letter. >>> validate('x-2482300w') 'X2482300W' >>> validate('x-2482300a') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('X2482300') # digit missing Traceback (most recent call last): ... InvalidLength: ... """ from stdnum.es import dni from stdnum.exceptions import * __all__ = ['compact', 'is_valid'] # use the same compact function as DNI compact = dni.compact def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" # replace XYZ with 012 number = str('XYZ'.index(number[0])) + number[1:] return dni.calc_check_digit(number) def validate(number): """Checks to see if the number provided is a valid NIE. This checks the length, formatting and check digit.""" number = compact(number) if not number[1:-1].isdigit() or number[:1] not in 'XYZ': raise InvalidFormat() if len(number) != 9: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid NIE. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/es/__init__.py0000644000000000000000000000164011720140730020171 0ustar rootroot00000000000000# __init__.py - collection of Spanish numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Spanish numbers.""" # provide vat as an alias from stdnum.es import nif as vat python-stdnum-1.2/stdnum/es/nif.py0000644000000000000000000000531712154624370017224 0ustar rootroot00000000000000# nif.py - functions for handling Spanish NIF (VAT) numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """NIF (Número de Identificación Fiscal, Spanish VAT number). The Spanish VAT number is a 9-digit number where either the first, last digits or both can be letters. The number is either a DNI (Documento nacional de identidad, for Spaniards), a NIE (Número de Identificación de Extranjeros, for foreigners) or a CIF (Certificado de Identificación Fiscal, for legal entities and others). >>> compact('ES B-58378431') 'B58378431' >>> validate('B64717838') 'B64717838' >>> validate('B64717839') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('54362315K') # resident '54362315K' >>> validate('X-5253868-R') # foreign person 'X5253868R' """ from stdnum.es import dni, nie, cif from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('ES'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number[1:-1].isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if number[0].isdigit(): # natural resident dni.validate(number) elif number[0] in 'XYZ': # foreign natural person nie.validate(number) else: # otherwise it has to be a valid CIF cif.validate(number) return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/es/dni.py0000644000000000000000000000475312154624370017225 0ustar rootroot00000000000000# dni.py - functions for handling Spanish personal identity codes # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """DNI (Documento nacional de identidad, Spanish personal identity codes). The DNI is a 9 digit number used to identify Spanish citizens. The last digit is a checksum letter. Foreign nationals, since 2010 are issued an NIE (Número de Identificación de Extranjeros, Foreigner's Identity Number) instead. >>> validate('54362315-K') '54362315K' >>> validate('54362315Z') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('54362315') # digit missing Traceback (most recent call last): ... InvalidLength: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').upper().strip() def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" return 'TRWAGMYFPDXBNJZSQVHLCKE'[int(number) % 23] def validate(number): """Checks to see if the number provided is a valid DNI number. This checks the length, formatting and check digit.""" number = compact(number) if not number[:-1].isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid DNI number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/es/cif.py0000644000000000000000000000723212154624370017207 0ustar rootroot00000000000000# cif.py - functions for handling Spanish fiscal numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """CIF (Certificado de Identificación Fiscal, Spanish company tax number). The CIF is a tax identification number for legal entities. It has 9 digits where the first digit is a letter (denoting the type of entity) and the last is a check digit (which may also be a letter). >>> validate('J99216582') 'J99216582' >>> validate('J99216583') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('J992165831') # too long Traceback (most recent call last): ... InvalidLength: ... >>> validate('M-1234567-L') 'M1234567L' >>> validate('O-1234567-L') # invalid first character Traceback (most recent call last): ... InvalidFormat: ... >>> split('A13 585 625') ('A', '13', '58562', '5') """ from stdnum import luhn from stdnum.es import dni from stdnum.exceptions import * __all__ = ['compact', 'validate', 'is_valid', 'split'] # use the same compact function as DNI compact = dni.compact def calc_check_digits(number): """Calculate the check digits for the specified number. The number passed should not have the check digit included. This function returns both the number and character check digit candidates.""" check = luhn.calc_check_digit(number[1:]) return check + 'JABCDEFGHI'[int(check)] def validate(number): """Checks to see if the number provided is a valid DNI number. This checks the length, formatting and check digit.""" number = compact(number) if not number[1:-1].isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if number[0] in 'KLM': # K: Spanish younger than 14 year old # L: Spanish living outside Spain without DNI # M: granted the tax to foreigners who have no NIE # these use the old checkdigit algorithm (the DNI one) if number[-1] != dni.calc_check_digit(number[1:-1]): raise InvalidChecksum() elif number[0] in 'ABCDEFGHJNPQRSUVW': # there seems to be conflicting information on which organisation types # should have which type of check digit (alphabetic or numeric) so # we support either here if number[-1] not in calc_check_digits(number[:-1]): raise InvalidChecksum() else: # anything else is invalid raise InvalidFormat() return number def is_valid(number): """Checks to see if the number provided is a valid DNI number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def split(number): """Split the provided number into a letter to define the type of organisation, two digits that specify a province, a 5 digit sequence number within the province and a check digit.""" number = compact(number) return number[0], number[1:3], number[3:8], number[8:] python-stdnum-1.2/stdnum/co/0000755000000000000000000000000012606445507016067 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/co/__init__.py0000644000000000000000000000171512605473154020202 0ustar rootroot00000000000000# __init__.py - collection of Colombian numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Collection of Colombian numbers.""" # provide vat and rut as an alias from stdnum.co import nit as vat from stdnum.co import nit as rut python-stdnum-1.2/stdnum/co/nit.py0000644000000000000000000000522112606426047017231 0ustar rootroot00000000000000# nit.py - functions for handling Colombian identity codes # coding: utf-8 # # Copyright (C) 2008-2011 Cédric Krier # Copyright (C) 2008-2011 B2CK # Copyright (C) 2015 Arthur de Jong # # 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 """NIT (Número De Identificación Tributaria, Colombian identity code). This number, also referred to as RUT (Registro Unico Tributario) is the Colombian business tax number. >>> validate('213.123.432-1') '2131234321' >>> validate('2131234325') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('2131234321') '213.123.432-1' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips surrounding whitespace and separation dash.""" return clean(number, '.,- ').upper().strip() def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" weights = (3, 7, 13, 17, 19, 23, 29, 37, 41, 43, 47, 53, 59, 67, 71) s = sum(w * int(n) for w, n in zip(weights, reversed(number))) % 11 return '01987654321'[s] def validate(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" number = compact(number) if not 8 <= len(number) <= 16: raise InvalidLength() if not number.isdigit(): raise InvalidFormat() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return '.'.join( number[i - 3:i] for i in reversed(range(-1, -len(number), -3)) ) + '-' + number[-1] python-stdnum-1.2/stdnum/al/0000755000000000000000000000000012606445507016062 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/al/__init__.py0000644000000000000000000000164312601744731020173 0ustar rootroot00000000000000# __init__.py - collection of Albanian numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Collection of Albanian numbers.""" # provide vat as an alias from stdnum.al import nipt as vat python-stdnum-1.2/stdnum/al/nipt.py0000644000000000000000000000456112606432040017400 0ustar rootroot00000000000000# nipt.py - functions for handling Albanian VAT numbers # coding: utf-8 # # Copyright (C) 2008-2011 Cédric Krier # Copyright (C) 2008-2011 B2CK # Copyright (C) 2015 Arthur de Jong # # 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 """NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number). The Albanian NIPT is a 10-digit number with the first and last character being letters. >>> validate('AL J 91402501 L') 'J91402501L' >>> validate('K22218003V') 'K22218003V' >>> validate('(AL) J 91402501') Traceback (most recent call last): ... InvalidLength: ... >>> validate('Z 22218003 V') Traceback (most recent call last): ... InvalidFormat: ... """ import re from stdnum.exceptions import * from stdnum.util import clean # regular expression for matching number _nipt_re = re.compile(r'^[JKL][0-9]{8}[A-Z]$') def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' ').upper().strip() if number.startswith('AL'): number = number[2:] if number.startswith('(AL)'): number = number[4:] return number def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length and formatting.""" number = compact(number) if len(number) != 10: raise InvalidLength() if not _nipt_re.match(number): raise InvalidFormat() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length and formatting.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/isan.py0000644000000000000000000001372512606432040016766 0ustar rootroot00000000000000# isan.py - functions for handling International Standard Audiovisual Numbers # (ISANs) # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """ISAN (International Standard Audiovisual Number). The ISAN (International Standard Audiovisual Number) is used to identify audiovisual works. The number is hexadecimal and can consists of at least a root identifier, and an episode or part. After that an optional check digit, optional version and optionally another check digit can be provided. The check digits are validated using the ISO 7064 Mod 37, 36 algorithm. >>> validate('000000018947000000000000') '000000018947000000000000' >>> compact('0000-0000-D07A-0090-Q-0000-0000-X') '00000000D07A009000000000' >>> validate('0000-0001-8CFA-0000-I-0000-0000-K') '000000018CFA0000I00000000K' >>> validate('0000-0001-8CFA-0000-A-0000-0000-K') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('000000018947000000000000') '0000-0001-8947-0000-8-0000-0000-D' >>> to_urn('00000000D07A009000000000') 'URN:ISAN:0000-0000-D07A-0090-Q-0000-0000-X' >>> to_xml('1881-66C7-3420-6541-Y-9F3A-0245-O') '' """ from stdnum.exceptions import * from stdnum.iso7064 import mod_37_36 from stdnum.util import clean def split(number): """Splits the number into a root, an episode or part, a check digit a version and another check digit. If any of the parts are missing an empty string is returned.""" number = clean(number, ' -').strip().upper() if len(number) == 17 or len(number) == 26: return number[0:12], number[12:16], number[16], number[17:25], number[25:] elif len(number) > 16: return number[0:12], number[12:16], '', number[16:24], number[24:] else: return number[0:12], number[12:16], number[16:], '', '' def compact(number, strip_check_digits=True): """Convert the ISAN to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace. The check digits are removed by default.""" number = list(split(number)) if strip_check_digits: number[2] = number[4] = '' return ''.join(number) def validate(number, strip_check_digits=False, add_check_digits=False): """Checks to see if the number provided is a valid ISAN. If check digits are present in the number they are validated. If strip_check_digits is True any existing check digits will be removed (after checking). If add_check_digits is True the check digit will be added if they are not present yet.""" (root, episode, check1, version, check2) = split(number) # check digits used for x in root + episode + version: if x not in '0123456789ABCDEF': raise InvalidFormat() # check length of all components if len(root) != 12 or len(episode) != 4 or len(check1) not in (0, 1) or \ len(version) not in (0, 8) or len(check1) not in (0, 1): raise InvalidLength() # allow removing check digits if strip_check_digits: check1 = check2 = '' # check check digits if check1: mod_37_36.validate(root + episode + check1) if check2: mod_37_36.validate(root + episode + version + check2) # add check digits if add_check_digits and not check1: check1 = mod_37_36.calc_check_digit(root + episode) if add_check_digits and not check2 and version: check2 = mod_37_36.calc_check_digit(root + episode + version) return root + episode + check1 + version + check2 def is_valid(number): """Checks to see if the number provided is a valid ISAN. If check digits are present in the number they are validated.""" try: return bool(validate(number)) except ValidationError: return False def format(number, separator='-', strip_check_digits=False, add_check_digits=True): """Reformat the passed number to the standard format. If add_check_digits is True the check digit will be added if they are not present yet. If both strip_check_digits and add_check_digits are True the check digits will be recalculated.""" (root, episode, check1, version, check2) = split(number) if strip_check_digits: check1 = check2 = '' if add_check_digits and not check1: check1 = mod_37_36.calc_check_digit(root + episode) if add_check_digits and not check2 and version: check2 = mod_37_36.calc_check_digit(root + episode + version) number = [root[i:i + 4] for i in range(0, 12, 4)] + [episode] if check1: number.append(check1) if version: number.extend((version[0:4], version[4:])) if check2: number.append(check2) return separator.join(number) def to_binary(number): """Convert the number to its binary representation (without the check digits).""" from binascii import a2b_hex return a2b_hex(compact(number, strip_check_digits=True)) def to_xml(number): """Returns the XML form of the ISAN as a string.""" number = format(number, strip_check_digits=True, add_check_digits=False) return '' % ( number[0:14], number[15:19], number[20:]) def to_urn(number): """Returns the URN representation of the ISAN.""" return 'URN:ISAN:' + format(number, add_check_digits=True) python-stdnum-1.2/stdnum/bg/0000755000000000000000000000000012606445507016056 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/bg/egn.py0000644000000000000000000000651512606424566017212 0ustar rootroot00000000000000# egn.py - functions for handling Bulgarian national identification numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes). It is a 10-digit number of which the first 6 digits denote the person's birth date, the next three digits represent a birth order number from which the person's gender can be determined and the last digit is a check digit. >>> compact('752316 926 3') '7523169263' >>> validate('8032056031') '8032056031' >>> get_birth_date('7542011030') datetime.date(2075, 2, 1) >>> validate('7552A10004') # invalid digit Traceback (most recent call last): ... InvalidFormat: ... >>> validate('8019010008') # invalid date Traceback (most recent call last): ... InvalidComponent: ... """ import datetime from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -.').upper().strip() def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" weights = (2, 4, 8, 5, 10, 9, 7, 3, 6) return str(sum(w * int(n) for w, n in zip(weights, number)) % 11 % 10) def get_birth_date(number): """Split the date parts from the number and return the birth date.""" year = int(number[0:2]) + 1900 month = int(number[2:4]) day = int(number[4:6]) if month > 40: year += 100 month -= 40 elif month > 20: year -= 100 month -= 20 try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def validate(number): """Checks to see if the number provided is a valid national identification number. This checks the length, formatting, embedded date and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 10: raise InvalidLength() # check if birth date is valid birth_date = get_birth_date(number) # TODO: check that the birth date is not in the future # check the check digit if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid national identification number. This checks the length, formatting, embedded date and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/bg/__init__.py0000644000000000000000000000155011720140724020155 0ustar rootroot00000000000000# __init__.py - collection of Bulgarian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Bulgarian numbers.""" python-stdnum-1.2/stdnum/bg/pnf.py0000644000000000000000000000504212606424566017216 0ustar rootroot00000000000000# pnf.py - functions for handling Bulgarian personal number of a foreigner # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner). The personal number of a foreigner is a 10-digit number where the last digit is the result of a weighted checksum. >>> validate('7111 042 925') '7111042925' >>> validate('7111042922') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('71110A2922') # invalid digit Traceback (most recent call last): ... InvalidFormat: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -.').upper().strip() def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" weights = (21, 19, 17, 13, 11, 9, 7, 3, 1) return str(sum(w * int(n) for w, n in zip(weights, number)) % 10) def validate(number): """Checks to see if the number provided is a valid national identification number. This checks the length, formatting, embedded date and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 10: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid national identification number. This checks the length, formatting, embedded date and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/bg/vat.py0000644000000000000000000000645412606424566017235 0ustar rootroot00000000000000# vat.py - functions for handling Bulgarian VAT numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """VAT (Идентификационен номер по ДДС, Bulgarian VAT number). The Bulgarian VAT (Данък върху добавената стойност) number is either 9 (for legal entities) or 10 digits (for physical persons, foreigners and others) long. Each type of number has its own check digit algorithm. >>> compact('BG 175 074 752') '175074752' >>> validate('175074752') '175074752' >>> validate('175074751') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.bg import egn, pnf from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.').upper().strip() if number.startswith('BG'): number = number[2:] return number def calc_check_digit_legal(number): """Calculate the check digit for legal entities. The number passed should not have the check digit included.""" check = sum((i + 1) * int(n) for i, n in enumerate(number)) % 11 if check == 10: check = sum((i + 3) * int(n) for i, n in enumerate(number)) % 11 return str(check % 10) def calc_check_digit_other(number): """Calculate the check digit for others. The number passed should not have the check digit included.""" weights = (4, 3, 2, 7, 6, 5, 4, 3, 2) return str((11 - sum(w * int(n) for w, n in zip(weights, number))) % 11) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) == 9: # 9 digit numbers are for legal entities if number[-1] != calc_check_digit_legal(number[:-1]): raise InvalidChecksum() elif len(number) == 10: # 10 digit numbers are for physical persons, foreigners and others if not egn.is_valid(number) and not pnf.is_valid(number) and \ number[-1] != calc_check_digit_other(number[:-1]): raise InvalidChecksum() else: raise InvalidLength() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/fi/0000755000000000000000000000000012606445507016064 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/fi/hetu.py0000644000000000000000000000711212605462702017377 0ustar rootroot00000000000000# hetu.py - functions for handling Finnish personal identity codes # coding: utf-8 # # Copyright (C) 2011 Jussi Judin # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """HETU (Henkilötunnus, Finnish personal identity code). Module for handling Finnish personal identity codes (HETU, Henkilötunnus). See http://www.vaestorekisterikeskus.fi/default.aspx?id=45 for checksum calculation details and http://tarkistusmerkit.teppovuori.fi/tarkmerk.htm#hetu1 for historical details. >>> validate('131052-308T') '131052-308T' >>> validate('131052-308U') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('310252-308Y') Traceback (most recent call last): ... InvalidComponent: ... >>> compact('131052a308t') '131052A308T' """ import re import datetime from stdnum.exceptions import * from stdnum.util import clean _century_codes = { '+': 1800, '-': 1900, 'A': 2000, } # Finnish personal identity codes are composed of date part, century # indicating sign, individual number and control character. # ddmmyyciiiC _hetu_re = re.compile(r'^(?P[0123]\d)(?P[01]\d)(?P\d\d)' r'(?P[-+A])(?P\d\d\d)' r'(?P[0-9ABCDEFHJKLMNPRSTUVWXY])$') def compact(number): """Convert the HETU to the minimal representation. This strips surrounding whitespace and converts it to upper case.""" return clean(number, '').upper().strip() def _calc_checksum(number): return '0123456789ABCDEFHJKLMNPRSTUVWXY'[int(number) % 31] def validate(number): """Checks to see if the number provided is a valid HETU. It checks the format, whether a valid date is given and whether the check digit is correct.""" number = compact(number) match = _hetu_re.search(number) if not match: raise InvalidFormat() day = int(match.group('day')) month = int(match.group('month')) year = int(match.group('year')) century = _century_codes[match.group('century')] individual = int(match.group('individual')) # check if birth date is valid try: datetime.date(century + year, month, day) except ValueError: raise InvalidComponent() # for historical reasons individual IDs start from 002 if individual < 2: raise InvalidComponent() checkable_number = '%02d%02d%02d%03d' % (day, month, year, individual) if match.group('control') != _calc_checksum(checkable_number): raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid HETU. It checks the format, whether a valid date is given and whether the check digit is correct.""" try: return bool(validate(number)) except ValidationError: return False # This is here just for completeness as there are no different length forms # of Finnish personal identity codes: format = compact python-stdnum-1.2/stdnum/fi/ytunnus.py0000644000000000000000000000401412601745434020157 0ustar rootroot00000000000000# ytunnus.py - functions for handling Finnish business identifiers (y-tunnus) # coding: utf-8 # # Copyright (C) 2015 Holvi Payment Services Oy # Copyright (C) 2015 Arthur de Jong # # 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 """Y-tunnus (Finnish business identifier). The number is an 8-digit code with a weighted checksum. >>> validate('2077474-0') '20774740' >>> validate('2077474-1') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> format('2077474-0') '2077474-0' """ from stdnum.exceptions import * from stdnum.fi import alv def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return alv.compact(number) def validate(number): """Checks to see if the number provided is a valid business identifier. This checks the length, formatting and check digit.""" return alv.validate(number) def is_valid(number): """Checks to see if the number provided is a valid business identifier. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:7] + '-' + number[7:] python-stdnum-1.2/stdnum/fi/__init__.py0000644000000000000000000000176512606424566020210 0ustar rootroot00000000000000# __init__.py - collection of Finnish numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Finnish numbers.""" # provide vat as an alias from stdnum.fi import alv as vat from stdnum.fi import ytunnus as businessid from stdnum.fi import hetu as personalid python-stdnum-1.2/stdnum/fi/associationid.py0000644000000000000000000000564712601744731021277 0ustar rootroot00000000000000# associationid.py - functions for handling Finnish association registry id # coding: utf-8 # # Copyright (C) 2015 Holvi Payment Services Oy # Copyright (C) 2015 Arthur de Jong # # 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 """Finnish Association Identifier. The number consists of 1 to 6 digits that are normally separated with a dot in groups of 0-3 and 0-3 numbers. E.g. 123.123, 12.123, 1.123, 123 or 1. >>> validate('123.123') '123123' >>> validate('1123') '1123' >>> validate('123123123') Traceback (most recent call last): ... stdnum.exceptions.InvalidLength: The number has an invalid length. >>> validate('12df') Traceback (most recent call last): ... stdnum.exceptions.InvalidFormat: The number has an invalid format. >>> format('123') '123' >>> format('1234') '1.234' """ from stdnum.exceptions import * from stdnum.util import clean # a collection of all registered numbers with 2 or less digits _lownumbers = set(( 1, 6, 7, 9, 12, 14, 15, 16, 18, 22, 23, 24, 27, 28, 29, 35, 36, 38, 40, 41, 42, 43, 45, 46, 50, 52, 55, 58, 60, 64, 65, 68, 72, 75, 76, 77, 78, 83, 84, 85, 89, 92)) def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -._+').strip() def validate(number): """ Validate the format of a Finnish association register number. First strip all separators and spaces from the number and then checks that it has a correct length and is only numeric. """ number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) < 1 or len(number) > 6: raise InvalidLength() if len(number) < 3 and int(number) not in _lownumbers: raise InvalidComponent() return number def is_valid(number): """Checks to see if the number provided is a valid association register number. This checks that the format is correct.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) if len(number) <= 3: return number else: return number[:-3] + '.' + number[-3:] python-stdnum-1.2/stdnum/fi/alv.py0000644000000000000000000000432112606424566017222 0ustar rootroot00000000000000# vat.py - functions for handling Finnish VAT numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """ALV nro (Arvonlisäveronumero, Finnish VAT number). The number is an 8-digit code with a weighted checksum. >>> validate('FI 20774740') '20774740' >>> validate('FI 20774741') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('FI'): number = number[2:] return number def checksum(number): """Calculate the checksum.""" weights = (7, 9, 10, 5, 8, 4, 2, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 11 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 8: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/util.py0000644000000000000000000001520612606432040017005 0ustar rootroot00000000000000# util.py - common utility functions # coding: utf-8 # # Copyright (C) 2012, 2013, 2015 Arthur de Jong # # 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 """Common utility functions for other stdnum modules. This module is meant for internal use by stdnum modules and is not guaranteed to remain stable and as such not part of the public API of stdnum. >>> get_vat_module('nl').__name__ 'stdnum.nl.btw' >>> get_vat_module('is').__name__ 'stdnum.is_.vsk' """ import pkgutil import pydoc import re import sys import unicodedata from stdnum.exceptions import * _strip_doctest_re = re.compile(r'^>>> .*\Z', re.DOTALL | re.MULTILINE) def _mk_char_map(mapping): """Transform a dictionary with comma separated uniode chracter names to tuples with unicode characters as key.""" for key, value in mapping.items(): for char in key.split(','): try: yield (unicodedata.lookup(char), value) except KeyError: # pragma: no cover (does not happen on Python3) pass # build mapping of Unicode characters to equivalent ASCII characters _char_map = dict(_mk_char_map({ 'HYPHEN-MINUS,ARMENIAN HYPHEN,HEBREW PUNCTUATION MAQAF,HYPHEN,' 'NON-BREAKING HYPHEN,FIGURE DASH,EN DASH,EM DASH,HORIZONTAL BAR,' 'SMALL HYPHEN-MINUS,FULLWIDTH HYPHEN-MINUS,MONGOLIAN NIRUGU,OVERLINE,' 'HYPHEN BULLET,MACRON,MODIFIER LETTER MINUS SIGN,FULLWIDTH MACRON,' 'OGHAM SPACE MARK,SUPERSCRIPT MINUS,SUBSCRIPT MINUS,MINUS SIGN,' 'HORIZONTAL LINE EXTENSION,HORIZONTAL SCAN LINE-1,HORIZONTAL SCAN LINE-3,' 'HORIZONTAL SCAN LINE-7,HORIZONTAL SCAN LINE-9,STRAIGHTNESS': '-', 'ASTERISK,ARABIC FIVE POINTED STAR,SYRIAC HARKLEAN ASTERISCUS,' 'FLOWER PUNCTUATION MARK,VAI FULL STOP,SMALL ASTERISK,FULLWIDTH ASTERISK,' 'ASTERISK OPERATOR,STAR OPERATOR,HEAVY ASTERISK,LOW ASTERISK,' 'OPEN CENTRE ASTERISK,EIGHT SPOKED ASTERISK,SIXTEEN POINTED ASTERISK,' 'TEARDROP-SPOKED ASTERISK,OPEN CENTRE TEARDROP-SPOKED ASTERISK,' 'HEAVY TEARDROP-SPOKED ASTERISK,EIGHT TEARDROP-SPOKED PROPELLER ASTERISK,' 'HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK,' 'ARABIC FIVE POINTED STAR': '*', 'COMMA,ARABIC COMMA,SINGLE LOW-9 QUOTATION MARK,IDEOGRAPHIC COMMA,' 'ARABIC DECIMAL SEPARATOR,ARABIC THOUSANDS SEPARATOR,PRIME,RAISED COMMA,' 'PRESENTATION FORM FOR VERTICAL COMMA,SMALL COMMA,' 'SMALL IDEOGRAPHIC COMMA,FULLWIDTH COMMA,CEDILLA': ',', 'FULL STOP,MIDDLE DOT,GREEK ANO TELEIA,ARABIC FULL STOP,' 'IDEOGRAPHIC FULL STOP,SYRIAC SUPRALINEAR FULL STOP,' 'SYRIAC SUBLINEAR FULL STOP,SAMARITAN PUNCTUATION NEQUDAA,' 'TIBETAN MARK INTERSYLLABIC TSHEG,TIBETAN MARK DELIMITER TSHEG BSTAR,' 'RUNIC SINGLE PUNCTUATION,BULLET,ONE DOT LEADER,HYPHENATION POINT,' 'WORD SEPARATOR MIDDLE DOT,RAISED DOT,KATAKANA MIDDLE DOT,' 'SMALL FULL STOP,FULLWIDTH FULL STOP,HALFWIDTH KATAKANA MIDDLE DOT,' 'AEGEAN WORD SEPARATOR DOT,PHOENICIAN WORD SEPARATOR,' 'KHAROSHTHI PUNCTUATION DOT,DOT ABOVE,ARABIC SYMBOL DOT ABOVE,' 'ARABIC SYMBOL DOT BELOW,BULLET OPERATOR,DOT OPERATOR': '.', 'SOLIDUS,SAMARITAN PUNCTUATION ARKAANU,FULLWIDTH SOLIDUS,DIVISION SLASH,' 'MATHEMATICAL RISING DIAGONAL,BIG SOLIDUS,FRACTION SLASH': '/', 'COLON,ETHIOPIC WORDSPACE,RUNIC MULTIPLE PUNCTUATION,MONGOLIAN COLON,' 'PRESENTATION FORM FOR VERTICAL COLON,FULLWIDTH COLON,' 'PRESENTATION FORM FOR VERTICAL TWO DOT LEADER,SMALL COLON': ':', 'SPACE,NO-BREAK SPACE,EN QUAD,EM QUAD,EN SPACE,EM SPACE,' 'THREE-PER-EM SPACE,FOUR-PER-EM SPACE,SIX-PER-EM SPACE,FIGURE SPACE,' 'PUNCTUATION SPACE,THIN SPACE,HAIR SPACE,NARROW NO-BREAK SPACE,' 'MEDIUM MATHEMATICAL SPACE,IDEOGRAPHIC SPACE': ' ', })) # mapping of country codes to internally used names # used in the get_vat_module() function _cc_translations = { 'el': 'gr', 'is': 'is_', } def _clean_chars(number): """Replace various Unicode characters with their ASCII counterpart.""" return ''.join(_char_map.get(x, x) for x in number) def clean(number, deletechars=''): """Remove the specified characters from the supplied number. >>> clean('123-456:78 9', ' -:') '123456789' >>> clean('1–2—3―4') '1-2-3-4' """ try: number = ''.join(x for x in number) except Exception: raise InvalidFormat() if sys.version < '3' and isinstance(number, str): # pragma: no cover (Python 2/3 specific code) try: number = _clean_chars(number.decode()).encode() except UnicodeError: try: number = _clean_chars(number.decode('utf-8')).encode('utf-8') except UnicodeError: pass else: # pragma: no cover (Python 2/3 specific code) number = _clean_chars(number) return ''.join(x for x in number if x not in deletechars) def get_number_modules(base='stdnum'): """Yield all the module and package names under the specified module.""" __import__(base) module = sys.modules[base] for loader, name, is_pkg in pkgutil.walk_packages( module.__path__, module.__name__ + '.', onerror=lambda x: None): __import__(name) module = sys.modules[name] if hasattr(module, 'validate'): yield module def get_module_name(module): """Return the short description of the number.""" return pydoc.splitdoc(pydoc.getdoc(module))[0].strip('.') def get_module_description(module): """Return a description of the number.""" doc = pydoc.splitdoc(pydoc.getdoc(module))[1] # remove the doctests return _strip_doctest_re.sub('', doc[1]).strip(), def get_module_list(): for module in get_number_modules(): yield ' * %s: %s' % ( module.__name__.replace('stdnum.', ''), get_module_name(module), ) def get_vat_module(cc): """Find the VAT number module based on the country code.""" cc = cc.lower() cc = _cc_translations.get(cc, cc) return __import__('stdnum.%s' % cc, globals(), locals(), ['vat']).vat python-stdnum-1.2/stdnum/iso6346.py0000644000000000000000000000553212606432040017146 0ustar rootroot00000000000000# iso6346.py - functions for handling ISO 6346 # # Copyright (C) 2014 Openlabs Technologies & Consulting (P) Limited # Copyright (C) 2014 Arthur de Jong # # 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 """ISO 6346 (International standard for container identification) ISO 6346 is an international standard covering the coding, identification and marking of intermodal (shipping) containers used within containerized intermodal freight transport. The standard establishes a visual identification system for every container that includes a unique serial number (with check digit), the owner, a country code, a size, type and equipment category as well as any operational marks. The standard is managed by the International Container Bureau (BIC). >>> validate('csqu3054383') 'CSQU3054383' >>> validate('CSQU3054384') Traceback (most recent call last): ... InvalidChecksum: ... """ import re from stdnum.exceptions import InvalidChecksum, InvalidFormat, InvalidLength, \ ValidationError from stdnum.util import clean _iso6346_re = re.compile(r'^\w{3}(U|J|Z|R)\d{7}$') def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number).strip().upper() def calc_check_digit(number): """Calculate check digit and return it for the 10 digit owner code and serial number.""" number = compact(number) alphabet = '0123456789A BCDEFGHIJK LMNOPQRSTU VWXYZ' return str(sum( alphabet.index(n) * pow(2, i) for i, n in enumerate(number)) % 11) def validate(number): """Validate the given number (unicode) for conformity to ISO 6346.""" number = compact(number) if len(number) != 11: raise InvalidLength() if not _iso6346_re.match(number): raise InvalidFormat() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Check whether the number conforms to the standard ISO6346. Unlike the validate function, this will not raise ValidationError(s).""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/do/0000755000000000000000000000000012606445507016070 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/do/rnc.py0000644000000000000000000000465512606424566017240 0ustar rootroot00000000000000# rnc.py - functions for handling Dominican Republic tax registration # # Copyright (C) 2015 Arthur de Jong # # 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 """RNC (Registro Nacional del Contribuyente, Dominican Republic tax number). The RNC is the Dominican Republic taxpayer registration number for institutions. The number consists of 9 digits. >>> validate('1-01-85004-3') '101850043' >>> validate('1018A0043') Traceback (most recent call last): ... InvalidFormat: ... >>> validate('101850042') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('131246796') '1-31-24679-6' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').strip() def calc_check_digit(number): """Calculate the check digit.""" weights = (7, 9, 8, 6, 5, 4, 3, 2) check = sum(w * int(n) for w, n in zip(weights, number)) % 11 return str((10 - check) % 9 + 1) def validate(number): """Checks to see if the number provided is a valid RNC.""" number = compact(number) if len(number) != 9: raise InvalidLength() if not number.isdigit(): raise InvalidFormat() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid RNC.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return '-'.join((number[:1], number[1:3], number[3:-1], number[-1])) python-stdnum-1.2/stdnum/do/__init__.py0000644000000000000000000000163412601744731020201 0ustar rootroot00000000000000# __init__.py - collection of Dominican Republic numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Collection of Dominican Republic numbers.""" from stdnum.do import rnc as vat python-stdnum-1.2/stdnum/do/cedula.py0000644000000000000000000001746112601744731017704 0ustar rootroot00000000000000# cedula.py - functions for handling Dominican Republic national identifier # # Copyright (C) 2015 Arthur de Jong # # 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 """Cedula (Dominican Republic national identification number). A cedula is is an 11-digit number issues by the Dominican Republic government to citizens or residents for identification purposes. >>> validate('00113918205') '00113918205' >>> validate('00113918204') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('0011391820A') Traceback (most recent call last): ... InvalidFormat: ... >>> format('22400022111') '224-0002211-1' """ from stdnum.exceptions import * from stdnum.util import clean from stdnum import luhn # list of Cedulas that do not match the checksum but are nonetheless valid whitelist = set(''' 00000021249 00000035692 00000058035 00000065377 00000078587 00000111941 00000126295 00000140874 00000155482 00000236621 00000292212 00000564933 00000719400 00004110056 00100000169 00100012146 00100013114 00100016495 00100053841 00100061611 00100061945 00100083860 00100101767 00100126468 00100145737 00100165504 00100169706 00100172940 00100174666 00100181057 00100228718 00100231017 00100238382 00100239662 00100255349 00100288143 00100288929 00100322649 00100350928 00100378440 00100384523 00100415853 00100523399 00100524531 00100530588 00100587320 00100590683 00100593378 00100622461 00100709215 00100728113 00100729795 00100756082 00100759932 00101118022 00101166065 00101527366 00101541404 00101621981 00101659661 00101684656 00101686299 00101821735 00101961125 00102025201 00102398239 00102577448 00102630192 00103266558 00103436936 00103443802 00103754365 00103822440 00103983004 00104486903 00104532086 00104662561 00104727362 00104785104 00104862525 00105263314 00105328185 00105512386 00105530894 00105606543 00105832408 00106190966 00106284933 00106418989 00106442522 00106479922 00106916538 00107045499 00107184305 00107445493 00107602067 00107665688 00107687383 00107691942 00108113363 00108132448 00108184024 00108264871 00108286792 00108384121 00108413431 00108497822 00108784684 00108796883 00109183462 00109229090 00109402756 00109785951 00109987435 00110047715 00110071113 00110111536 00110490843 00110578459 00110646203 00111014782 00111150559 00113453700 00114272360 00114532330 00114532355 00114687216 00115039795 00115343847 00116256005 00116448241 00116508511 00117582001 00119161853 00121344165 00121581750 00121581800 00129737056 00130610001 00131257003 00133987848 00134588056 00142864013 00143072001 00144435001 00146965001 00147485003 00149657590 00155144906 00161884001 00162906003 00163540003 00163549012 00163709018 00166533003 00167311001 00170009162 00170115579 00171404771 00174729003 00174940001 00181880003 00184129003 00189213001 00189405093 00190002567 00196714003 00200021994 00200028716 00200040516 00200063601 00200123640 00200291381 00200409772 00200435544 00200969260 00201023001 00202110760 00202744522 00207327056 00208430205 00208832003 00218507031 00222017001 00235482001 00236245013 00241997013 00246160013 00261011013 00270764013 00274652001 00278005023 00289931003 00291431001 00291549003 00297018001 00298109001 00299724003 00300001538 00300011700 00300013835 00300017875 00300019575 00300020806 00300025568 00300052890 00300169535 00300244009 00300636564 00301200901 00305535206 00345425001 00352861001 00356533003 00362684023 00376023023 00400001552 00400001614 00400012957 00400189811 00425759001 00435518003 00475916056 00481106001 00481595003 00493593003 00516077003 00520207699 00524571001 00539342005 00540077717 00544657001 00574599001 00599408003 00633126023 00644236001 00648496171 00651322001 00686904003 00720758056 00731054054 00741721056 00757398001 00800106971 00848583056 00857630012 00971815056 01000005580 01000250733 01000268998 01000728704 01000855890 01038813907 01094560111 01100014261 01100620962 01154421047 01200004166 01200008613 01200011252 01200014133 01200033420 01200771767 01300001142 01300005424 01300020331 01400000282 01400074875 01600009531 01600019983 01600026316 01600027894 01650257001 01700052445 01700200811 01800022457 01800058439 01800527104 01810035037 02038569001 02100061022 02300003061 02300023225 02300031758 02300037618 02300047220 02300052220 02300054193 02300062066 02300085158 02400229955 02500045676 02600036132 02600094954 02700029905 02755972001 02800000129 02800021761 02800025877 02800029588 02831146001 03000411295 03100109611 03100488033 03100654224 03100673050 03100963776 03101070888 03102828522 03102936385 03103315310 03103749672 03104354892 03111670001 03121982479 03200066940 03300023841 03400058730 03400157849 03401709701 03500037890 03600046116 03600127038 03600180637 03700663589 03800032522 03807240010 03852380001 03900069856 03900192284 04022130495 04400002002 04600198229 04700004024 04700020933 04700027064 04700061076 04700070460 04700074827 04700221469 04701174268 04800019561 04800034846 04800046910 04800956889 04801245892 04900009932 04900011690 04900013913 04900014592 04900026260 04900028443 04900448230 04902549001 04941042001 05100085656 05300013029 05400016031 05400021759 05400022042 05400028496 05400033166 05400034790 05400037495 05400038776 05400040523 05400047674 05400048248 05400049237 05400049834 05400053627 05400054156 05400055485 05400055770 05400057300 05400058964 05400059956 05400060743 05400062459 05400067703 05400072273 05400076481 05400216948 05500003079 05500006796 05500008806 05500012039 05500014375 05500017761 05500021118 05500022399 05500023407 05500024135 05500024190 05500027749 05500032681 05500173451 05500303477 05600037761 05600038251 05600038964 05600051191 05600063115 05600267737 05600553831 05700064077 05700071202 05900072869 06100007818 06100009131 06100011935 06100013662 06100016486 06337850001 06400007916 06400011981 06400014372 06486186001 06500162568 06800008448 06800245196 06843739551 06900069184 07000007872 07100018031 07100063262 07400001254 07600000691 07700009346 07800000968 07800002361 08016809001 08100002398 08498619001 08800003986 08900001310 08900005064 08952698001 09000117963 09000169133 09010011235 09022066011 09300006239 09300035357 09421581768 09500008222 09700003030 09700179110 09900017864 10061805811 10100178199 10201116357 10462157001 10491297001 10621581792 10983439110 11700000658 12019831001 12300074628 22321581834 22721581818 40200401324 40200452735 40200639953 40200700675 90001200901 '''.split()) def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').strip() def validate(number): """Checks to see if the number provided is a valid cedula.""" number = compact(number) if len(number) != 11: raise InvalidLength() if not number.isdigit(): raise InvalidFormat() if number in whitelist: return number return luhn.validate(number) def is_valid(number): """Checks to see if the number provided is a valid cedula.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return '-'.join((number[:3], number[3:-1], number[-1])) python-stdnum-1.2/stdnum/is_/0000755000000000000000000000000012606445507016240 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/is_/kennitala.py0000644000000000000000000000713112606424566020564 0ustar rootroot00000000000000# kennitala.py - functions for handling Icelandic identity codes # coding: utf-8 # # Copyright (C) 2015 Tuomas Toivonen # Copyright (C) 2015 Arthur de Jong # # 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 """Kennitala (Icelandic personal and organisation identity code). Module for handling Icelandic personal and organisation identity codes (kennitala). >>> validate('450401-3150') # organisation '4504013150' >>> validate('120174-3399') # individual '1201743399' >>> validate('530575-0299') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('320174-3399') Traceback (most recent call last): ... InvalidComponent: ... >>> format('1201743399') '120174-3399' """ import re import datetime from stdnum.exceptions import * from stdnum.util import clean # Icelandic personal and organisation identity codes are composed of # date part, a dash, two random digits, a checksum, and a century # indicator where '9' for 1900-1999 and '0' for 2000 and beyond. For # organisations instead of birth date, the registration date is used, # and number 4 is added to the first digit. _kennitala_re = re.compile( r'^(?P[01234567]\d)(?P[01]\d)(?P\d\d)' r'(?P\d\d)(?P\d)' r'(?P[09])$') def compact(number): """Convert the kennitala to the minimal representation. This strips surrounding whitespace and separation dash, and converts it to upper case.""" return clean(number, '-').upper().strip() def checksum(number): """Calculate the checksum.""" weights = (3, 2, 7, 6, 5, 4, 3, 2, 1, 0) return sum(w * int(n) for w, n in zip(weights, number)) % 11 def validate(number): """Checks to see if the number provided is a valid kennitala. It checks the format, whether a valid date is given and whether the check digit is correct.""" number = compact(number) match = _kennitala_re.search(number) if not match: raise InvalidFormat() day = int(match.group('day')) month = int(match.group('month')) year = int(match.group('year')) if match.group('century') == '9': year += 1900 else: year += 2000 # check if birth date or registration data is valid try: if day >= 40: # organisation datetime.date(year, month, day - 40) else: # individual datetime.date(year, month, day) except ValueError: raise InvalidComponent() # validate the checksum if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid HETU. It checks the format, whether a valid date is given and whether the check digit is correct.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:6] + '-' + number[6:] python-stdnum-1.2/stdnum/is_/__init__.py0000644000000000000000000000164612601744731020354 0ustar rootroot00000000000000# __init__.py - collection of Icelandic numbers # coding: utf-8 # # Copyright (C) 2015 Tuomas Toivonen # # 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 """Collection of Icelandic numbers.""" # provide vat as an alias from stdnum.is_ import vsk as vat python-stdnum-1.2/stdnum/is_/vsk.py0000644000000000000000000000367412601744731017423 0ustar rootroot00000000000000# vsk.py - functions for handling Icelandic VAT numbers # coding: utf-8 # # Copyright (C) 2015 Tuomas Toivonen # # 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 """VSK number (Virðisaukaskattsnúmer, Icelandic VAT number). The Icelandic VAT number is five or six digits. >>> validate('IS 00621') '00621' >>> validate('IS 0062199') Traceback (most recent call last): ... InvalidLength: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' ').upper().strip() if number.startswith('IS'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length and formatting.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) not in (5, 6): raise InvalidLength() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length and formatting.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/pt/0000755000000000000000000000000012606445507016111 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/pt/__init__.py0000644000000000000000000000164611720140726020220 0ustar rootroot00000000000000# __init__.py - collection of Portuguese numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Portuguese numbers.""" # provide vat as an alias from stdnum.pt import nif as vat python-stdnum-1.2/stdnum/pt/nif.py0000644000000000000000000000471012606426047017237 0ustar rootroot00000000000000# nif.py - functions for handling Portuguese VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """NIF (Número de identificação fiscal, Portuguese VAT number). The NIF (Número de identificação fiscal, NIPC, Número de Identificação de Pessoa Colectiva) is used for VAT purposes. It is a 9-digit number with a simple checksum. >>> validate('PT 501 964 843') '501964843' >>> validate('PT 501 964 842') # invalid check digits Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.').upper().strip() if number.startswith('PT'): number = number[2:] return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" s = sum((9 - i) * int(n) for i, n in enumerate(number)) return str((11 - s) % 11 % 10) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit() or number[0] == '0': raise InvalidFormat() if len(number) != 9: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/isin.py0000644000000000000000000001214412606425204016774 0ustar rootroot00000000000000# isin.py - functions for handling ISIN numbers # # Copyright (C) 2015 Arthur de Jong # # 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 """ISIN (International Securities Identification Number). The ISIN is a 12-character alpha-numerical code specified in ISO 6166 used to identify exchange listed securities such as bonds, commercial paper, stocks and warrants. The number is formed of a two-letter country code, a nine character national security identifier and a single check digit. This module does not currently separately validate the embedded national security identifier part (e.g. when it is a CUSIP). More information: https://en.wikipedia.org/wiki/International_Securities_Identification_Number >>> validate('US0378331005') 'US0378331005' >>> validate('US0378331003') Traceback (most recent call last): ... InvalidChecksum: ... >>> from_natid('gb', 'BYXJL75') 'GB00BYXJL758' """ from stdnum.exceptions import * from stdnum.util import clean # all valid ISO 3166-1 alpha-2 country codes _iso_3116_1_country_codes = [ 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW'] # the special XS country code is for international securities # substitute agencies can allocate an ISIN starting with XA (CUSIP Global # Services), XB (NSD Russia), XC (WM Datenservice Germany) or XD (SIX # Telekurs). _country_codes = set(_iso_3116_1_country_codes + [ 'XS', 'EU', 'XA', 'XB', 'XC', 'XD']) # the letters allowed in an ISIN _alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip().upper() def calc_check_digit(number): """Calculate the check digits for the number.""" # convert to numeric first, then double some, then sum individual digits number = ''.join(str(_alphabet.index(n)) for n in number) number = ''.join( str(int(n) * (2 - i % 2)) for i, n in enumerate(reversed(number))) return str((10 - sum(int(n) for n in number)) % 10) def validate(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" number = compact(number) if not all(x in _alphabet for x in number): raise InvalidFormat() if len(number) != 12: raise InvalidLength() if number[:2] not in _country_codes: raise InvalidComponent() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is valid. This checks the length and check digit.""" try: return bool(validate(number)) except ValidationError: return False def from_natid(country_code, number): """Generate an ISIN from a national security identifier.""" number = compact(number) number = country_code.upper() + (9 - len(number)) * '0' + number return number + calc_check_digit(number) python-stdnum-1.2/stdnum/ch/0000755000000000000000000000000012606445507016060 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/ch/ssn.py0000644000000000000000000000433512604562677017250 0ustar rootroot00000000000000# vat.py - functions for handling Swiss social security numbers # # Copyright (C) 2014 Denis Krienbuehl # # 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 """Swiss social security number ("Sozialversicherungsnummer"). Also known as "Neue AHV Nummer". The Swiss Sozialversicherungsnummer is used to identify indivduals for taxation and pension purposes. The number is validated using EAN-13, though dashes are substitued for dots. >>> compact('756.9217.0769.85') '7569217076985' >>> format('7569217076985') '756.9217.0769.85' >>> validate('7569217076985') '7569217076985' >>> validate('756.9217.0769.85') '7569217076985' >>> validate('756.9217.0769.84') Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import ValidationError from stdnum import ean from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' .').strip() def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return '.'.join((number[:3], number[3:7], number[7:11], number[11:])) def validate(number): """Checks to see if the number provided is a valid Swiss Sozialversicherungsnummer.""" return ean.validate(compact(number)) def is_valid(number): """Checks to see if the number provided is a valid Sozialversicherungsnummer.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ch/uid.py0000644000000000000000000000567612606424566017233 0ustar rootroot00000000000000# uid.py - functions for handling Swiss business identifiers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """UID (Unternehmens-Identifikationsnummer, Swiss business identifier). The Swiss UID is used to uniquely identify businesses for taxation purposes. The number consists of a fixed "CHE" prefix, followed by 9 digits that are protected with a simple checksum. This module only supports the "new" format that was introduced in 2011 which completely replaced the "old" 6-digit format in 2014. More information is available at: https://www.uid.admin.ch/ https://de.wikipedia.org/wiki/Unternehmens-Identifikationsnummer >>> validate('CHE-100.155.212') 'CHE100155212' >>> validate('CHE-100.155.213') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('CHE100155212') 'CHE-100.155.212' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips surrounding whitespace and separators.""" return clean(number, ' -.').strip().upper() def calc_check_digit(number): """Calculate the check digit for organisations. The number passed should not have the check digit included.""" weights = (5, 4, 3, 2, 7, 6, 5, 4) s = sum(w * int(n) for w, n in zip(weights, number)) return str((11 - s) % 11) def validate(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" number = compact(number) if len(number) != 12: raise InvalidLength() if not number.startswith('CHE'): raise InvalidComponent() if not number[3:].isdigit(): raise InvalidFormat() if number[-1] != calc_check_digit(number[3:-1]): raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:3] + '-' + '.'.join( number[i:i + 3] for i in range(3, len(number), 3)) python-stdnum-1.2/stdnum/ch/__init__.py0000644000000000000000000000154212517406434020170 0ustar rootroot00000000000000# __init__.py - collection of Swiss numbers # coding: utf-8 # # Copyright (C) 2014 Denis Krienbuehl # # 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 """Collection of Swiss numbers.""" python-stdnum-1.2/stdnum/ch/vat.py0000644000000000000000000000517212606424566017233 0ustar rootroot00000000000000# vat.py - functions for handling Swiss VAT numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """VAT, MWST, TVA, IVA, TPV (Mehrwertsteuernummer, the Swiss VAT number). The Swiss VAT number is based on the UID but is followed by either "MWST" (Mehrwertsteuer, the German abbreviation for VAT), "TVA" (Taxe sur la valeur ajoutée in French), "IVA" (Imposta sul valore aggiunto in Italian) or "TPV" (Taglia sin la plivalur in Romanian). This module only supports the "new" format that was introduced in 2011 which completely replaced the "old" 6-digit format in 2014. More information is available at: https://www.ch.ch/en/value-added-tax-number-und-business-identification-number/ https://www.uid.admin.ch/ >>> validate('CHE-107.787.577 IVA') 'CHE107787577IVA' >>> validate('CHE-107.787.578 IVA') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('CHE107787577IVA') 'CHE-107.787.577 IVA' """ from stdnum.exceptions import * from stdnum.ch import uid def compact(number): """Convert the number to the minimal representation. This strips surrounding whitespace and separators.""" return uid.compact(number) def validate(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" number = compact(number) if len(number) not in (15, 16): raise InvalidLength() uid.validate(number[:12]) if number[12:] not in ('MWST', 'TVA', 'IVA', 'TPV'): raise InvalidComponent() return number def is_valid(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return uid.format(number[:12]) + ' ' + number[12:] python-stdnum-1.2/stdnum/iso7064/0000755000000000000000000000000012606445507016601 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/iso7064/mod_37_2.py0000644000000000000000000000476512517406434020475 0ustar rootroot00000000000000# mod_37_2.py - functions for performing the ISO 7064 Mod 37, 2 algorithm # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """The ISO 7064 Mod 37, 2 algorithm. The Mod 37, 2 checksum can be used for alphanumeric numbers and the check digit may also be numeric, a letter or '*'. >>> calc_check_digit('G123489654321') 'Y' >>> validate('G123489654321Y') 'G123489654321Y' >>> checksum('G123489654321Y') 1 By changing the alphabet this can be turned into any Mod x, 2 algorithm. For example Mod 11, 2: >>> calc_check_digit('079', alphabet='0123456789X') 'X' >>> validate('079X', alphabet='0123456789X') '079X' >>> checksum('079X', alphabet='0123456789X') 1 """ from stdnum.exceptions import * def checksum(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*'): """Calculate the checksum. A valid number should have a checksum of 1.""" modulus = len(alphabet) check = 0 for n in number: check = (2 * check + alphabet.index(n)) % modulus return check def calc_check_digit(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*'): """With the provided number, calculate the extra digit that should be appended to make it a valid number.""" modulus = len(alphabet) return alphabet[(1 - 2 * checksum(number, alphabet)) % modulus] def validate(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*'): """Checks whether the check digit is valid.""" try: valid = checksum(number, alphabet) == 1 except Exception: raise InvalidFormat() if not valid: raise InvalidChecksum() return number def is_valid(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*'): """Checks whether the check digit is valid.""" try: return bool(validate(number, alphabet)) except ValidationError: return False python-stdnum-1.2/stdnum/iso7064/mod_37_36.py0000644000000000000000000000505312517406434020553 0ustar rootroot00000000000000# mod_37_36.py - functions for performing the ISO 7064 Mod 37, 36 algorithm # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """The ISO 7064 Mod 37, 36 algorithm. The Mod 37, 36 algorithm uses an alphanumeric check digit and the number itself may also contain letters. >>> checksum('A12425GABC1234002M') 1 >>> calc_check_digit('A12425GABC1234002') 'M' >>> validate('A12425GABC1234002M') 'A12425GABC1234002M' By changing the alphabet this can be turned into any Mod x+1, x algorithm. For example Mod 11, 10: >>> calc_check_digit('00200667308', alphabet='0123456789') '5' >>> validate('002006673085', alphabet='0123456789') '002006673085' """ from stdnum.exceptions import * def checksum(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): """Calculate the checksum. A valid number should have a checksum of 1.""" modulus = len(alphabet) check = modulus // 2 for n in number: check = (((check or modulus) * 2) % (modulus + 1) + alphabet.index(n)) % modulus return check def calc_check_digit(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): """With the provided number, calculate the extra digit that should be appended to make it a valid number.""" modulus = len(alphabet) return alphabet[(1 - ((checksum(number, alphabet) or modulus) * 2) % (modulus + 1)) % modulus] def validate(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): """Checks whether the check digit is valid.""" try: valid = checksum(number, alphabet) == 1 except Exception: raise InvalidFormat() if not valid: raise InvalidChecksum() return number def is_valid(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): """Checks whether the check digit is valid.""" try: return bool(validate(number, alphabet)) except ValidationError: return False python-stdnum-1.2/stdnum/iso7064/__init__.py0000644000000000000000000000252312141257173020706 0ustar rootroot00000000000000# __init__.py - functions for performing the ISO 7064 algorithms # # Copyright (C) 2010, 2012 Arthur de Jong # # 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 """Collection of the ISO 7064 algorithms. This package provides a number of modules for calculation and verification of numbers using one of the ISO 7064 algorithms. Note that these functions were not implemented using the ISO text itself because the text is not available for free. These functions were implemented based on information on the algorithms found online and some reverse engineering. If anyone can provide a legal copy of the ISO/IEC 7064 standard these functions can be validated and perhaps improved. """ python-stdnum-1.2/stdnum/iso7064/mod_11_10.py0000644000000000000000000000412112517406434020526 0ustar rootroot00000000000000# mod_11_10.py - functions for performing the ISO 7064 Mod 11, 10 algorithm # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """The ISO 7064 Mod 11, 10 algorithm. The Mod 11, 10 algorithm uses a number of calculations modulo 11 and 10 to determine a checksum. For a module that can do generic Mod x+1, x calculations see the :mod:`stdnum.iso7064.mod_37_36` module. >>> calc_check_digit('79462') '3' >>> validate('794623') '794623' >>> calc_check_digit('00200667308') '5' >>> validate('002006673085') '002006673085' """ from stdnum.exceptions import * def checksum(number): """Calculate the checksum. A valid number should have a checksum of 1.""" check = 5 for n in number: check = (((check or 10) * 2) % 11 + int(n)) % 10 return check def calc_check_digit(number): """With the provided number, calculate the extra digit that should be appended to make it a valid number.""" return str((1 - ((checksum(number) or 10) * 2) % 11) % 10) def validate(number): """Checks whether the check digit is valid.""" try: valid = checksum(number) == 1 except Exception: raise InvalidFormat() if not valid: raise InvalidChecksum() return number def is_valid(number): """Checks whether the check digit is valid.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/iso7064/mod_97_10.py0000644000000000000000000000411012517406434020542 0ustar rootroot00000000000000# mod_97_10.py - functions for performing the ISO 7064 Mod 97, 10 algorithm # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """The ISO 7064 Mod 97, 10 algorithm. The Mod 97, 10 algorithm evaluates the whole number as an integer which is valid if the number modulo 97 is 1. As such it has two check digits. >>> calc_check_digits('99991234567890121414') '90' >>> validate('9999123456789012141490') '9999123456789012141490' >>> calc_check_digits('4354111611551114') '31' >>> validate('08686001256515001121751') '08686001256515001121751' >>> calc_check_digits('22181321402534321446701611') '35' """ from stdnum.exceptions import * def checksum(number): """Calculate the checksum. A valid number should have a checksum of 1.""" return int(number) % 97 def calc_check_digits(number): """With the provided number, calculate the extra digits that should be appended to make it a valid number.""" return '%02d' % ((98 - 100 * checksum(number)) % 97) def validate(number): """Checks whether the check digit is valid.""" try: valid = checksum(number) == 1 except Exception: raise InvalidFormat() if not valid: raise InvalidChecksum() return number def is_valid(number): """Checks whether the check digit is valid.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/iso7064/mod_11_2.py0000644000000000000000000000415512517406434020456 0ustar rootroot00000000000000# mod_11_2.py - functions for performing the ISO 7064 Mod 11, 2 algorithm # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """The ISO 7064 Mod 11, 2 algorithm. The Mod 11, 2 algorithm is a simple module 11 checksum where the check digit can be an X to make the number valid. For a module that can do generic Mod x, 2 calculations see the :mod:`stdnum.iso7064.mod_37_2` module. >>> calc_check_digit('0794') '0' >>> validate('07940') '07940' >>> calc_check_digit('079') 'X' >>> validate('079X') '079X' >>> checksum('079X') 1 """ from stdnum.exceptions import * def checksum(number): """Calculate the checksum. A valid number should have a checksum of 1.""" check = 0 for n in number: check = (2 * check + int(10 if n == 'X' else n)) % 11 return check def calc_check_digit(number): """With the provided number, calculate the extra digit that should be appended to make it a valid number.""" c = (1 - 2 * checksum(number)) % 11 return 'X' if c == 10 else str(c) def validate(number): """Checks whether the check digit is valid.""" try: valid = checksum(number) == 1 except Exception: raise InvalidFormat() if not valid: raise InvalidChecksum() return number def is_valid(number): """Checks whether the check digit is valid.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/br/0000755000000000000000000000000012606445507016071 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/br/cnpj.py0000644000000000000000000000553612601744731017402 0ustar rootroot00000000000000# cnpj.py - functions for handling CNPJ numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazillian company identifier). Numbers from the national register of legal entities have 14 digits. The first 8 digits identify the company, the following 4 digits identify a business unit and the last 2 digits are check digits. >>> validate('16.727.230/0001-97') '16727230000197' >>> validate('16.727.230.0001-98') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('16.727.230/0001=97') # invalid delimiter Traceback (most recent call last): ... InvalidFormat: ... >>> format('16727230000197') '16.727.230/0001-97' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -./').strip() def calc_check_digits(number): """Calculate the check digits for the number.""" d1 = (11 - sum(((3 - i) % 8 + 2) * int(n) for i, n in enumerate(number[:12]))) % 11 % 10 d2 = (11 - sum(((4 - i) % 8 + 2) * int(n) for i, n in enumerate(number[:12])) - 2 * d1) % 11 % 10 return '%d%d' % (d1, d2) def validate(number): """Checks to see if the number provided is a valid CNPJ. This checks the length and whether the check digits are correct.""" number = compact(number) if not number.isdigit() or int(number) <= 0: raise InvalidFormat() if len(number) != 14: raise InvalidLength() if calc_check_digits(number) != number[-2:]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid CNPJ. This checks the length and whether the check digits are correct.""" try: return bool(validate(number)) except ValidationError: return False def format(number): number = compact(number) return (number[0:2] + '.' + number[2:5] + '.' + number[5:8] + '/' + number[8:12] + '-' + number[12:]) python-stdnum-1.2/stdnum/br/__init__.py0000644000000000000000000000155211720140725020173 0ustar rootroot00000000000000# __init__.py - collection of Brazillian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Brazillian numbers.""" python-stdnum-1.2/stdnum/br/cpf.py0000644000000000000000000000513212154624370017207 0ustar rootroot00000000000000# cpf.py - functions for handling CPF numbers # coding: utf-8 # # Copyright (C) 2011, 2012, 2013 Arthur de Jong # # 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 """CPF (Cadastro de Pessoas Físicas, Brazillian national identifier). >>> validate('390.533.447-05') '39053344705' >>> validate('231.002.999-00') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('390.533.447=0') # invalid delimiter Traceback (most recent call last): ... InvalidFormat: ... >>> format('23100299900') '231.002.999-00' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -.').strip() def _calc_check_digits(number): """Calculate the check digits for the number.""" d1 = sum((10 - i) * int(number[i]) for i in range(9)) d1 = (11 - d1) % 11 % 10 d2 = sum((11 - i) * int(number[i]) for i in range(9)) + 2 * d1 d2 = (11 - d2) % 11 % 10 return '%d%d' % (d1, d2) def validate(number): """Checks to see if the number provided is a valid CPF. This checks the length and whether the check digit is correct.""" number = compact(number) if not number.isdigit() or int(number) <= 0: raise InvalidFormat() if len(number) != 11: raise InvalidLength() if _calc_check_digits(number) != number[-2:]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid CPF. This checks the length and whether the check digit is correct.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:3] + '.' + number[3:6] + '.' + number[6:-2] + '-' + number[-2:] python-stdnum-1.2/stdnum/eu/0000755000000000000000000000000012606445507016077 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/eu/at_02.py0000644000000000000000000000525512517406462017363 0ustar rootroot00000000000000# at_02.py - functions for handling AT-02 (SEPA Creditor identifier) # # Copyright (C) 2014 Sergi Almacellas Abellana # # 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 """ SEPA Identifier of the Creditor (AT-02) This identifier is indicated in the ISO 20022 data element `Creditor Scheme Identification`. The creditor can be a legal entity, or an association that is not a legal entity, or a person. Ther first two digits contain the ISO country code, the nex two are check digitsi for the ISO 7064 Mod 97, 10 checksum, the next tree contain the Creditor Bussines Code (or `ZZZ` if no bussness code used) and the remainder contain the country-specific identifier. >>> validate('ES23ZZZ47690558N') 'ES23ZZZ47690558N' >>> validate('ES2300047690558N') 'ES2300047690558N' >>> compact('ES++()+23ZZZ4//7690558N') 'ES23ZZZ47690558N' """ from stdnum.exceptions import * from stdnum.iso7064 import mod_97_10 from stdnum.util import clean # the valid characters we have _alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' def compact(number): """Convert the AT-02 number to the minimal representation. This strips the number of any valid separators and removes invalid characters.""" return clean(number, ' -/?:().m\'+"').strip().upper() def _to_base10(number): """Prepare the number to its base10 representation so it can be checked with the ISO 7064 Mod 97, 10 algorithm. That means excluding positions 5 to 7 and moving the first four digits to the end""" return ''.join(str(_alphabet.index(x)) for x in number[7:] + number[:4]) def validate(number): """Checks to see if the number provided is a valid AT-02.""" number = compact(number) try: test_number = _to_base10(number) except Exception: raise InvalidFormat() # ensure that checksum is valid mod_97_10.validate(test_number) return number def is_valid(number): """Checks to see if the number provided is a valid AT-02.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/eu/__init__.py0000644000000000000000000000156212274765336020222 0ustar rootroot00000000000000# __init__.py - collection of European Union numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of European Union numbers.""" python-stdnum-1.2/stdnum/eu/vat.py0000644000000000000000000001352112606424566017247 0ustar rootroot00000000000000# vat.py - functions for handling European VAT numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # Copyright (C) 2015 Lionel Elie Mamane # # 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 """VAT (European Union VAT number). The European Union VAT number consists of a 2 letter country code (ISO 3166-1, except Greece which uses EL) followed by a number that is allocated per country. The exact format of the numbers varies per country and a country-specific check is performed on the number using the VAT module that is relevant for that country. >>> compact('ATU 57194903') 'ATU57194903' >>> validate('BE697449992') 'BE0697449992' >>> validate('FR 61 954 506 077') 'FR61954506077' >>> guess_country('00449544B01') ['nl'] """ from stdnum.exceptions import * from stdnum.util import clean, get_vat_module country_codes = set([ 'at', 'be', 'bg', 'cy', 'cz', 'de', 'dk', 'ee', 'es', 'fi', 'fr', 'gb', 'gr', 'hr', 'hu', 'ie', 'it', 'lt', 'lu', 'lv', 'mt', 'nl', 'pl', 'pt', 'ro', 'se', 'si', 'sk', ]) """The collection of country codes that are queried. Greece is listed with a country code of gr while for VAT purposes el is used instead.""" _country_modules = dict() vies_wsdl = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl' """The WSDL URL of the VAT Information Exchange System (VIES).""" # a cached version of the suds client for VIES _vies_client = None def _get_cc_module(cc): """Get the VAT number module based on the country code.""" # Greece uses a "wrong" country code cc = cc.lower() if cc == 'el': cc = 'gr' if cc not in country_codes: return if cc not in _country_modules: _country_modules[cc] = get_vat_module(cc) return _country_modules[cc] def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, '').upper().strip() module = _get_cc_module(number[:2]) if not module: raise InvalidComponent() return number[:2] + module.compact(number[2:]) def validate(number): """Checks to see if the number provided is a valid VAT number. This performs the country-specific check for the number.""" number = clean(number, '').upper().strip() module = _get_cc_module(number[:2]) if not module: raise InvalidComponent() return number[:2] + module.validate(number[2:]) def is_valid(number): """Checks to see if the number provided is a valid VAT number. This performs the country-specific check for the number.""" try: return bool(validate(number)) except ValidationError: return False def guess_country(number): """Guess the country code based on the provided number. This checks the provided number against each of the validation routines and returns the list of countries for which it is valid. This returns lower case codes and returns gr (not el) for Greece.""" return [cc for cc in country_codes if _get_cc_module(cc).is_valid(number)] def _get_client(): # pragma: no cover (no tests for this function) """Get a SOAP client for performing VIES requests.""" # this function isn't automatically tested because the functions using # it are not automatically tested global _vies_client if not _vies_client: try: from urllib import getproxies except ImportError: from urllib.request import getproxies # try suds first try: from suds.client import Client _vies_client = Client(vies_wsdl, proxy=getproxies()).service except ImportError: # fall back to using pysimplesoap from pysimplesoap.client import SoapClient _vies_client = SoapClient(wsdl=vies_wsdl, proxy=getproxies()) return _vies_client def check_vies(number): # pragma: no cover (no tests for this function) """Queries the online European Commission VAT Information Exchange System (VIES) for validity of the provided number. Note that the service has usage limitations (see the VIES website for details). This returns a dict-like object.""" # this function isn't automatically tested because it would require # network access for the tests and unnecessarily load the VIES website number = compact(number) return _get_client().checkVat(number[:2], number[2:]) def check_vies_approx(number, requester): # pragma: no cover """Queries the online European Commission VAT Information Exchange System (VIES) for validity of the provided number, providing a validity certificate as proof. You will need to give your own VAT number for this to work. Note that the service has usage limitations (see the VIES website for details). This returns a dict-like object.""" # this function isn't automatically tested because it would require # network access for the tests and unnecessarily load the VIES website number = compact(number) requester = compact(requester) return _get_client.checkVatApprox( countryCode=number[:2], vatNumber=number[2:], requesterCountryCode=requester[:2], requesterVatNumber=requester[2:]) python-stdnum-1.2/stdnum/us/0000755000000000000000000000000012606445507016115 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/us/ein.py0000644000000000000000000000560412606432040017233 0ustar rootroot00000000000000# ein.py - functions for handling EINs # # Copyright (C) 2013 Arthur de Jong # # 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 """EIN (U.S. Employer Identification Number). The Employer Identification Number, also known as Federal Employer Identification Number (FEIN), is used to identify a business entity in the United States. It is issued to anyone that has to pay withholding taxes on employees. >>> validate('91-1144442') '911144442' >>> get_campus('04-2103594') == 'Brookhaven' True >>> validate('911-14-4442') # dash in the wrong place Traceback (most recent call last): ... InvalidFormat: ... >>> validate('07-1144442') # wrong prefix Traceback (most recent call last): ... InvalidComponent: ... >>> format('042103594') '04-2103594' >>> format('123') # unknown formatting is left alone '123' """ import re from stdnum.exceptions import * from stdnum.util import clean # regular expression for matching EINs _ein_re = re.compile(r'^(?P[0-9]{2})-?(?P[0-9]{7})$') def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, '-').strip() def get_campus(number): """Determine the Campus or other location that issued the EIN.""" from stdnum import numdb number = compact(number) results = numdb.get('us/ein').info(number)[0][1] if not results: raise InvalidComponent() return results['campus'] def validate(number): """Checks to see if the number provided is a valid EIN. This checks the length, groups and formatting if it is present.""" match = _ein_re.search(clean(number, '').strip()) if not match: raise InvalidFormat() get_campus(number) # raises exception for unknown campus return compact(number) def is_valid(number): """Checks to see if the number provided is a valid EIN. This checks the length, groups and formatting if it is present.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" if len(number) == 9: number = number[:2] + '-' + number[2:] return number python-stdnum-1.2/stdnum/us/tin.py0000644000000000000000000000570712237446535017274 0ustar rootroot00000000000000# tin.py - functions for handling TINs # # Copyright (C) 2013 Arthur de Jong # # 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 """TIN (U.S. Taxpayer Identification Number). The Taxpayer Identification Number is used used for tax purposes in the United States. A TIN may be: * a Social Security Number (SSN) * an Individual Taxpayer Identification Number (ITIN) * an Employer Identification Number (EIN) * a Preparer Tax Identification Number (PTIN) * an Adoption Taxpayer Identification Number (ATIN) >>> compact('123-45-6789') '123456789' >>> validate('123-45-6789') '123456789' >>> validate('07-3456789') Traceback (most recent call last): ... InvalidFormat: ... >>> guess_type('536-90-4399') ['ssn', 'atin'] >>> guess_type('04-2103594') ['ein'] >>> guess_type('042103594') ['ssn', 'ein', 'atin'] >>> format('042103594') '042-10-3594' >>> format('123-456') # invalid numbers are not reformatted '123-456' """ from stdnum.exceptions import * from stdnum.us import ssn, itin, ein, ptin, atin from stdnum.util import clean _tin_modules = (ssn, itin, ein, ptin, atin) def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, '-').strip() def validate(number): """Checks to see if the number provided is a valid TIN. This searches for the proper sub-type and validates using that.""" for mod in _tin_modules: try: return mod.validate(number) except ValidationError: pass # try next module # fallback raise InvalidFormat() def is_valid(number): """Checks to see if the number provided is a valid TIN. This searches for the proper sub-type and validates using that.""" try: return bool(validate(number)) except ValidationError: return False def guess_type(number): """Return a list of possible TIN types for which this number is valid..""" return [mod.__name__.rsplit('.', 1)[-1] for mod in _tin_modules if mod.is_valid(number)] def format(number): """Reformat the passed number to the standard format.""" for mod in _tin_modules: if mod.is_valid(number) and hasattr(mod, 'format'): return mod.format(number) return number python-stdnum-1.2/stdnum/us/rtn.py0000644000000000000000000000513212517406343017267 0ustar rootroot00000000000000# rtn.py - functions for handling banking routing transit numbers # # Copyright (C) 2014 Lifealike Ltd # # 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 """RTN (Routing transport number). The routing transport number is a nine digit number used in the US banking system for processing deposits between banks. The last digit is a checksum. >>> calc_check_digit('11100002') '5' >>> validate('111000025') '111000025' >>> validate('11100002') # Not nine digits Traceback (most recent call last): ... InvalidLength: .. >>> validate('11100002B') # Not all numeric Traceback (most recent call last): ... InvalidFormat: .. >>> validate('112000025') # bad checksum Traceback (most recent call last): ... InvalidChecksum: .. """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any surrounding whitespace.""" number = clean(number).strip() return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" digits = [int(c) for c in number] checksum = ( 7 * (digits[0] + digits[3] + digits[6]) + 3 * (digits[1] + digits[4] + digits[7]) + 9 * (digits[2] + digits[5]) ) % 10 return str(checksum) def validate(number): """Checks to see if the number provided is a valid routing number. This checks the length and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid RTN. This checks the length and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/us/ssn.py0000644000000000000000000000601012606432040017253 0ustar rootroot00000000000000# ssn.py - functions for handling SSNs # # Copyright (C) 2011, 2012, 2013 Arthur de Jong # # 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 """SSN (U.S. Social Security Number). The Social Security Number is used to identify individuals for taxation purposes. >>> validate('536-90-4399') '536904399' >>> validate('1112-23333') # dash in the wrong place Traceback (most recent call last): ... InvalidFormat: ... >>> validate('666-00-0000') # invalid area Traceback (most recent call last): ... InvalidComponent: ... >>> validate('078-05-1120') # blacklisted entry Traceback (most recent call last): ... InvalidComponent: ... >>> compact('1234-56-789') '123456789' >>> format('111223333') '111-22-3333' """ import re from stdnum.exceptions import * from stdnum.util import clean # regular expression for matching SSN _ssn_re = re.compile( r'^(?P[0-9]{3})-?(?P[0-9]{2})-?(?P[0-9]{4})$') # blacklist of SSNs _ssn_blacklist = set(('078-05-1120', '457-55-5462', '219-09-9999')) def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, '-').strip() def validate(number): """Checks to see if the number provided is a valid SSN. This checks the length, groups and formatting if it is present.""" match = _ssn_re.search(clean(number, '').strip()) if not match: raise InvalidFormat() area = match.group('area') group = match.group('group') serial = match.group('serial') # check for all-0 or some unused areas # (9xx also won't be issued which includes the advertising range) if area == '000' or area == '666' or area[0] == '9' or \ group == '00' or serial == '0000': raise InvalidComponent() # check blacklists if format(number) in _ssn_blacklist: raise InvalidComponent() return compact(number) def is_valid(number): """Checks to see if the number provided is a valid SSN. This checks the length, groups and formatting if it is present.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" if len(number) == 9: number = number[:3] + '-' + number[3:5] + '-' + number[5:] return number python-stdnum-1.2/stdnum/us/ein.dat0000644000000000000000000000120612606225450017352 0ustar rootroot00000000000000# manually converted from the IRS website # http://www.irs.gov/Businesses/Small-Businesses-&-Self-Employed/How-EINs-are-Assigned-and-Valid-EIN-Prefixes 01,02,03,04,05,06,11,13,14,16,21,22,23,25,34,51,52,54,55,56,57,58,59,65 campus="Brookhaven" 10,12 campus="Andover" 15,24 campus="Fresno" 20,26,27,45,46 campus="Internet" 30,32,35,36,37,38,61 campus="Cincinnati" 31 campus="Small Business Administration (SBA)" 33,39,41,42,43,46,48,62,63,64,66,68,71,72,73,74,75,76,77,81,82,83,84,85,86,87,88,91,92,93,98,99 campus="Philadelphia" 40,44 campus="Kansas City" 50,53 campus="Austin" 60,67 campus="Atlanta" 80,90 campus="Ogden" 94,95 campus="Memphis" python-stdnum-1.2/stdnum/us/ptin.py0000644000000000000000000000417112606432040017430 0ustar rootroot00000000000000# ptin.py - functions for handling PTINs # # Copyright (C) 2013 Arthur de Jong # # 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 """PTIN (U.S. Preparer Tax Identification Number). A Preparer Tax Identification Number (PTIN) is United States identification number for tax return preparers. It is an eight-digit number prefixed with a capital P. >>> validate('P-00634642') 'P00634642' >>> validate('P01594846') 'P01594846' >>> validate('00634642') # missing P Traceback (most recent call last): ... InvalidFormat: ... """ import re from stdnum.exceptions import * from stdnum.util import clean # regular expression for matching PTINs _ptin_re = re.compile(r'^P[0-9]{8}$') def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, '-').strip() def validate(number): """Checks to see if the number provided is a valid PTIN. This checks the length, groups and formatting if it is present.""" number = compact(number).upper() if not _ptin_re.search(number): raise InvalidFormat() # sadly, no more information on PTIN number validation was found return number def is_valid(number): """Checks to see if the number provided is a valid ATIN. This checks the length, groups and formatting if it is present.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/us/__init__.py0000644000000000000000000000156011720140724020215 0ustar rootroot00000000000000# __init__.py - collection of United States numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of United States numbers.""" python-stdnum-1.2/stdnum/us/atin.py0000644000000000000000000000467112606432040017416 0ustar rootroot00000000000000# atin.py - functions for handling ATINs # # Copyright (C) 2013 Arthur de Jong # # 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 """ATIN (U.S. Adoption Taxpayer Identification Number). An Adoption Taxpayer Identification Number (ATIN) is a temporary nine-digit number issued by the United States IRS for a child for whom the adopting parents cannot obtain a Social Security Number. >>> validate('123-45-6789') '123456789' >>> validate('1234-56789') # dash in the wrong place Traceback (most recent call last): ... InvalidFormat: ... >>> format('123456789') '123-45-6789' >>> format('123') # unknown formatting is left alone '123' """ import re from stdnum.exceptions import * from stdnum.util import clean # regular expression for matching ATINs _atin_re = re.compile(r'^[0-9]{3}-?[0-9]{2}-?[0-9]{4}$') def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, '-').strip() def validate(number): """Checks to see if the number provided is a valid ATIN. This checks the length and formatting if it is present.""" match = _atin_re.search(clean(number, '').strip()) if not match: raise InvalidFormat() # sadly, no more information on ATIN number validation was found return compact(number) def is_valid(number): """Checks to see if the number provided is a valid ATIN. This checks the length and formatting if it is present.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" if len(number) == 9: number = number[:3] + '-' + number[3:5] + '-' + number[5:] return number python-stdnum-1.2/stdnum/us/itin.py0000644000000000000000000000605612606432040017425 0ustar rootroot00000000000000# itin.py - functions for handling ITINs # # Copyright (C) 2013 Arthur de Jong # # 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 """ITIN (U.S. Individual Taxpayer Identification Number). The Individual Taxpayer Identification Number is issued by the United States IRS to individuals who are required to have a taxpayer identification number but who are not eligible to obtain a Social Security Number. It is a nine-digit number that begins with the number 9 and the fourth and fifth digit are expected to be in a certain range. >>> validate('912-90-3456') '912903456' >>> validate('9129-03456') # dash in the wrong place Traceback (most recent call last): ... InvalidFormat: ... >>> validate('123-45-6789') # wrong start digit Traceback (most recent call last): ... InvalidComponent: ... >>> validate('912-93-4567') # wrong group Traceback (most recent call last): ... InvalidComponent: ... >>> compact('1234-56-789') '123456789' >>> format('111223333') '111-22-3333' >>> format('123') # unknown formatting is left alone '123' """ import re from stdnum.exceptions import * from stdnum.util import clean # regular expression for matching ITINs _itin_re = re.compile(r'^(?P[0-9]{3})-?(?P[0-9]{2})-?[0-9]{4}$') # allowed group digits _allowed_groups = set((str(x) for x in range(70, 100) if x not in (89, 93))) def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, '-').strip() def validate(number): """Checks to see if the number provided is a valid ITIN. This checks the length, groups and formatting if it is present.""" match = _itin_re.search(clean(number, '').strip()) if not match: raise InvalidFormat() area = match.group('area') group = match.group('group') if area[0] != '9' or group not in _allowed_groups: raise InvalidComponent() return compact(number) def is_valid(number): """Checks to see if the number provided is a valid ITIN. This checks the length, groups and formatting if it is present.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" if len(number) == 9: number = number[:3] + '-' + number[3:5] + '-' + number[5:] return number python-stdnum-1.2/stdnum/grid.py0000644000000000000000000000466012154624370016766 0ustar rootroot00000000000000# grid.py - functions for handling Global Release Identifier (GRid) numbers # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """GRid (Global Release Identifier). The Global Release Identifier is used to identify releases of digital sound recordings and uses the ISO 7064 Mod 37, 36 algorithm to verify the correctness of the number. >>> validate('A12425GABC1234002M') 'A12425GABC1234002M' >>> validate('Grid: A1-2425G-ABC1234002-M') 'A12425GABC1234002M' >>> validate('A1-2425G-ABC1234002-Q') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> compact('A1-2425G-ABC1234002-M') 'A12425GABC1234002M' >>> format('A12425GABC1234002M') 'A1-2425G-ABC1234002-M' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the GRid to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').strip().upper() if number.startswith('GRID:'): number = number[5:] return number def validate(number): """Checks to see if the number provided is a valid GRid.""" from stdnum.iso7064 import mod_37_36 number = compact(number) if len(number) != 18: raise InvalidLength() return mod_37_36.validate(number) def is_valid(number): """Checks to see if the number provided is a valid GRid.""" try: return bool(validate(number)) except ValidationError: return False def format(number, separator='-'): """Reformat the passed number to the standard format.""" number = compact(number) number = (number[0:2], number[2:7], number[7:17], number[17:]) return separator.join(x for x in number if x) python-stdnum-1.2/stdnum/pl/0000755000000000000000000000000012606445507016101 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/pl/pesel.py0000644000000000000000000000714112606424566017570 0ustar rootroot00000000000000# pesel.py - functions for handling Polish national identification numbers # coding: utf-8 # # Copyright (C) 2015 Dariusz Choruzy # Copyright (C) 2015 Arthur de Jong # # 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 """PESEL (Polish national identification number). The Powszechny Elektroniczny System Ewidencji Ludności (PESEL, Universal Electronic System for Registration of the Population) is a 11-digit Polish national identification number. The number consists of the date of birth, a serial number, the person's gender and a check digit. >>> validate('44051401359') '44051401359' >>> validate('44051401358') # incorrect check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('02381307589') # invalid birth date Traceback (most recent call last): ... InvalidComponent: ... >>> get_birth_date('02122401358') datetime.date(1902, 12, 24) >>> get_gender('02122401358') 'M' >>> get_birth_date('02211307589') datetime.date(2002, 1, 13) >>> get_gender('02211307589') 'F' """ import datetime from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').upper().strip() def get_birth_date(number): """Split the date parts from the number and return the birth date.""" number = compact(number) year = int(number[0:2]) month = int(number[2:4]) day = int(number[4:6]) year += { 0: 1900, 1: 2000, 2: 2100, 3: 2200, 4: 1800, }[month // 20] month = month % 20 try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def get_gender(number): """Get the person's birth gender ('M' or 'F').""" number = compact(number) if number[9] in '02468': # even return 'F' else: # odd: 13579 return 'M' def calc_check_digit(number): """Calculate the check digit for organisations. The number passed should not have the check digit included.""" weights = (1, 3, 7, 9, 1, 3, 7, 9, 1, 3) check = sum(w * int(n) for w, n in zip(weights, number)) return str((10 - check) % 10) def validate(number): """Checks to see if the number provided is a valid national identification number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 11: raise InvalidLength() if number[-1] != calc_check_digit(number[:-1]): raise InvalidChecksum() get_birth_date(number) return number def is_valid(number): """Checks to see if the number provided is a valid national identification number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/pl/regon.py0000644000000000000000000000622012606424566017567 0ustar rootroot00000000000000# pesel.py - functions for handling REGON numbers # coding: utf-8 # # Copyright (C) 2015 Dariusz Choruzy # Copyright (C) 2015 Arthur de Jong # # 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 """REGON (Rejestr Gospodarki Narodowej, Polish register of economic units). The REGON (Rejestr Gospodarki Narodowej) is a statistical identification number for businesses. National entities are assigned a 9-digit number, while local units append 5 digits to form a 14-digit number. More information can be found at: http://bip.stat.gov.pl/en/regon/ http://www.stat.gov.pl/bip/regon_ENG_HTML.htm https://wyszukiwarkaregon.stat.gov.pl/appBIR/index.aspx >>> validate('192598184') '192598184' >>> validate('123456785') '123456785' >>> validate('192598183') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('12345678512347') '12345678512347' >>> validate('12345678612342') # first check digit invalid Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('12345678512348') # last check digit invalid Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').upper().strip() def calc_check_digit(number): """Calculate the check digit for organisations. The number passed should not have the check digit included.""" if len(number) == 8: weights = (8, 9, 2, 3, 4, 5, 6, 7) else: weights = (2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8) check = sum(w * int(n) for w, n in zip(weights, number)) return str(check % 11 % 10) def validate(number): """Checks to see if the number provided is a valid REGON number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) not in (9, 14): raise InvalidLength() if number[-1] != calc_check_digit(number[:-1]): raise InvalidChecksum() if len(number) == 14 and number[8] != calc_check_digit(number[:8]): raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid REGON number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/pl/nip.py0000644000000000000000000000475712606424566017260 0ustar rootroot00000000000000# nip.py - functions for handling Polish VAT numbers # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """NIP (Numer Identyfikacji Podatkowej, Polish VAT number). The NIP (Numer Identyfikacji Podatkowej) number consists of 10 digit with a straightforward weighted checksum. >>> validate('PL 8567346215') '8567346215' >>> validate('PL 8567346216') # invalid check digits Traceback (most recent call last): ... InvalidChecksum: ... >>> format('PL 8567346215') '856-734-62-15' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('PL'): number = number[2:] return number def checksum(number): """Calculate the checksum.""" weights = (6, 5, 7, 2, 3, 4, 5, 6, 7, -1) return sum(w * int(n) for w, n in zip(weights, number)) % 11 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 10: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return '-'.join((number[0:3], number[3:6], number[6:8], number[8:])) python-stdnum-1.2/stdnum/pl/__init__.py0000644000000000000000000000163611720140725020206 0ustar rootroot00000000000000# __init__.py - collection of Polish numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Polish numbers.""" # provide vat as an alias from stdnum.pl import nip as vat python-stdnum-1.2/stdnum/isbn.py0000644000000000000000000001444312606424566017003 0ustar rootroot00000000000000# isbn.py - functions for handling ISBNs # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # 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 """ISBN (International Standard Book Number). The ISBN is the International Standard Book Number, used to identify publications. This module supports both numbers in ISBN-10 (10-digit) and ISBN-13 (13-digit) format. >>> validate('978-9024538270') '9789024538270' >>> validate('978-9024538271') Traceback (most recent call last): ... InvalidChecksum: ... >>> compact('1-85798-218-5') '1857982185' >>> format('9780471117094') '978-0-471-11709-4' >>> format('1857982185') '1-85798-218-5' >>> isbn_type('1-85798-218-5') 'ISBN10' >>> isbn_type('978-0-471-11709-4') 'ISBN13' >>> to_isbn13('1-85798-218-5') '978-1-85798-218-3' >>> to_isbn10('978-1-85798-218-3') '1-85798-218-5' """ from stdnum import ean from stdnum.exceptions import * from stdnum.util import clean def compact(number, convert=False): """Convert the ISBN to the minimal representation. This strips the number of any valid ISBN separators and removes surrounding whitespace. If the covert parameter is True the number is also converted to ISBN-13 format.""" number = clean(number, ' -').strip().upper() if len(number) == 9: number = '0' + number if convert: return to_isbn13(number) return number def _calc_isbn10_check_digit(number): """Calculate the ISBN check digit for 10-digit numbers. The number passed should not have the check bit included.""" check = sum((i + 1) * int(n) for i, n in enumerate(number)) % 11 return 'X' if check == 10 else str(check) def validate(number, convert=False): """Checks to see if the number provided is a valid ISBN (either a legacy 10-digit one or a 13-digit one). This checks the length and the check bit but does not check if the group and publisher are valid (use split() for that).""" number = compact(number, convert=False) if not number[:-1].isdigit(): raise InvalidFormat() if len(number) == 10: if _calc_isbn10_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() elif len(number) == 13: ean.validate(number) else: raise InvalidLength() if convert: number = to_isbn13(number) return number def isbn_type(number): """Check the passed number and returns 'ISBN13', 'ISBN10' or None (for invalid) for checking the type of number passed.""" try: number = validate(number, convert=False) except ValidationError: return None if len(number) == 10: return 'ISBN10' else: # len(number) == 13: return 'ISBN13' def is_valid(number): """Checks to see if the number provided is a valid ISBN (either a legacy 10-digit one or a 13-digit one). This checks the length and the check bit but does not check if the group and publisher are valid (use split() for that).""" try: return bool(validate(number)) except ValidationError: return False def to_isbn13(number): """Convert the number to ISBN-13 format.""" number = number.strip() min_number = compact(number, convert=False) if len(min_number) == 13: return number # nothing to do, already ISBN-13 # put new check digit in place number = number[:-1] + ean.calc_check_digit('978' + min_number[:-1]) # add prefix if ' ' in number: return '978 ' + number elif '-' in number: return '978-' + number else: return '978' + number def to_isbn10(number): """Convert the number to ISBN-10 format.""" number = number.strip() min_number = compact(number, convert=False) if len(min_number) == 10: return number # nothing to do, already ISBN-10 elif isbn_type(min_number) != 'ISBN13': raise InvalidFormat('Not a valid ISBN13.') elif not number.startswith('978'): raise InvalidFormat('Does not use 978 Bookland prefix.') # strip EAN prefix number = number[3:-1].strip().strip('-') digit = _calc_isbn10_check_digit(min_number[3:-1]) # append the new check digit if ' ' in number: return number + ' ' + digit elif '-' in number: return number + '-' + digit else: return number + digit def split(number, convert=False): """Split the specified ISBN into an EAN.UCC prefix, a group prefix, a registrant, an item number and a check-digit. If the number is in ISBN-10 format the returned EAN.UCC prefix is '978'. If the covert parameter is True the number is converted to ISBN-13 format first.""" from stdnum import numdb # clean up number number = compact(number, convert) # get Bookland prefix if any delprefix = False if len(number) == 10: number = '978' + number delprefix = True # split the number result = numdb.get('isbn').split(number[:-1]) itemnr = result.pop() if result else '' prefix = result.pop(0) if result else '' group = result.pop(0) if result else '' publisher = result.pop(0) if result else '' # return results return ('' if delprefix else prefix, group, publisher, itemnr, number[-1]) def format(number, separator='-', convert=False): """Reformat the passed number to the standard format with the EAN.UCC prefix (if any), the group prefix, the registrant, the item number and the check-digit separated (if possible) by the specified separator. Passing an empty separator should equal compact() though this is less efficient. If the covert parameter is True the number is converted to ISBN-13 format first.""" return separator.join(x for x in split(number, convert) if x) python-stdnum-1.2/stdnum/imsi.py0000644000000000000000000000567512601744731017012 0ustar rootroot00000000000000# imsi.py - functions for handling International Mobile Subscriber Identity # (IMSI) numbers # # Copyright (C) 2011-2015 Arthur de Jong # # 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 """IMSI (International Mobile Subscriber Identity). The IMSI (International Mobile Subscriber Identity) is used to identify mobile phone users (the SIM). >>> validate('429011234567890') '429011234567890' >>> validate('439011234567890') # unknown MCC Traceback (most recent call last): ... InvalidComponent: ... >>> split('429011234567890') ('429', '01', '1234567890') >>> split('310150123456789') ('310', '150', '123456789') >>> info('460001234567890')['mcc'] '460' >>> str(info('460001234567890')['country']) 'China' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the IMSI number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').strip().upper() def split(number): """Split the specified IMSI into a Mobile Country Code (MCC), a Mobile Network Code (MNC), a Mobile Station Identification Number (MSIN).""" from stdnum import numdb # clean up number number = compact(number) # split the number return tuple(numdb.get('imsi').split(number)) def validate(number): """Checks to see if the number provided is a valid IMSI.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) not in (14, 15): raise InvalidLength() if len(split(number)) != 3: raise InvalidComponent() return number def info(number): """Return a dictionary of data about the supplied number.""" from stdnum import numdb # clean up number number = compact(number) # split the number info = dict(number=number) mcc_info, mnc_info, msin_info = numdb.get('imsi').info(number) info['mcc'] = mcc_info[0] info.update(mcc_info[1]) info['mnc'] = mnc_info[0] info.update(mnc_info[1]) info['msin'] = msin_info[0] info.update(msin_info[1]) return info def is_valid(number): """Checks to see if the number provided is a valid IMSI.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ean.py0000644000000000000000000000462312154624370016603 0ustar rootroot00000000000000# ean.py - functions for handling EANs # # Copyright (C) 2011, 2012, 2013 Arthur de Jong # # 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 """EAN (International Article Number). Module for handling EAN (International Article Number) codes. This module handles numbers EAN-13, EAN-8 and UPC (12-digit) format. >>> validate('73513537') '73513537' >>> validate('978-0-471-11709-4') # EAN-13 format '9780471117094' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the EAN to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').strip() def calc_check_digit(number): """Calculate the EAN check digit for 13-digit numbers. The number passed should not have the check bit included.""" return str((10 - sum((3 - 2 * (i % 2)) * int(n) for i, n in enumerate(reversed(number)))) % 10) def validate(number): """Checks to see if the number provided is a valid EAN-13. This checks the length and the check bit but does not check whether a known GS1 Prefix and company identifier are referenced.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) not in (13, 12, 8): raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid EAN-13. This checks the length and the check bit but does not check whether a known GS1 Prefix and company identifier are referenced.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/fr/0000755000000000000000000000000012606445507016075 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/fr/siren.py0000644000000000000000000000525512154624370017571 0ustar rootroot00000000000000# siren.py - functions for handling French SIREN numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """SIREN (a French company identification number). The SIREN (Système d'Identification du Répertoire des Entreprises) is a 9 digit number used to identify French companies. The Luhn checksum is used to validate the numbers. >>> compact('552 008 443') '552008443' >>> validate('404833048') '404833048' >>> validate('404833047') Traceback (most recent call last): ... InvalidChecksum: ... >>> to_tva('443 121 975') '46 443 121 975' """ from stdnum import luhn from stdnum.exceptions import * from stdnum.util import clean # An online validation function is available but it does not provide an # automated entry point, has usage restrictions and seems to require # attribution to the service for any results used. # http://avis-situation-sirene.insee.fr/ def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip() def validate(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() luhn.validate(number) return number def is_valid(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def to_tva(number): """Return a TVA that prepends the two extra check digits to the SIREN.""" # note that this always returns numeric check digits # it is unclean when the alphabetic ones are used return '%02d%s%s' % ( int(compact(number) + '12') % 97, ' ' if ' ' in number else '', number ) python-stdnum-1.2/stdnum/fr/tva.py0000644000000000000000000000644412601744731017245 0ustar rootroot00000000000000# tva.py - functions for handling French TVA numbers # coding: utf-8 # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """n° TVA (taxe sur la valeur ajoutée, French VAT number). The n° TVA (Numéro d'identification à la taxe sur la valeur ajoutée) is the SIREN (Système d’Identification du Répertoire des Entreprises) prefixed by two digits. In old style numbers the two digits are numeric, with new style numbers at least one is a alphabetic. >>> compact('Fr 40 303 265 045') '40303265045' >>> validate('23334175221') '23334175221' >>> validate('84 323 140 391') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('K7399859412') # new-style number 'K7399859412' >>> validate('4Z123456782') # new-style number starting with digit '4Z123456782' >>> validate('IO334175221') # the letters cannot by I or O Traceback (most recent call last): ... InvalidFormat: ... """ from stdnum.exceptions import * from stdnum.fr import siren from stdnum.util import clean # the valid characters for the first two digits (O and I are missing) _alphabet = '0123456789ABCDEFGHJKLMNPQRSTUVWXYZ' def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.').upper().strip() if number.startswith('FR'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not all(x in _alphabet for x in number[:2]): raise InvalidFormat() if len(number) != 11: raise InvalidLength() siren.validate(number[2:]) if number.isdigit(): # all-numeric digits if int(number[:2]) != (int(number[2:] + '12') % 97): raise InvalidChecksum() else: # one of the first two digits isn't a number if number[0].isdigit(): check = ( _alphabet.index(number[0]) * 24 + _alphabet.index(number[1]) - 10) else: check = ( _alphabet.index(number[0]) * 34 + _alphabet.index(number[1]) - 100) if (int(number[2:]) + 1 + check // 11) % 11 != (check % 11): raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/fr/__init__.py0000644000000000000000000000163611720140725020202 0ustar rootroot00000000000000# __init__.py - collection of French numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of French numbers.""" # provide vat as an alias from stdnum.fr import tva as vat python-stdnum-1.2/stdnum/sk/0000755000000000000000000000000012606445507016103 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/sk/dph.py0000644000000000000000000000475112154624371017233 0ustar rootroot00000000000000# vat.py - functions for handling Slovak VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number). The IČ DPH (Identifikačné číslo pre daň z pridanej hodnoty) is a 10-digit number used for VAT purposes. It has a straightforward checksum. >>> validate('SK 202 274 96 19') '2022749619' >>> validate('SK 202 274 96 18') # invalid check digits Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.sk import rc from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('SK'): number = number[2:] return number def checksum(number): """Calculate the checksum.""" return int(number) % 11 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 10: raise InvalidLength() # it is unclear whether the RČ can be used as a valid VAT number if rc.is_valid(number): return number if number[0] == '0' or int(number[2]) not in (2, 3, 4, 7, 8, 9): raise InvalidFormat() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/sk/rc.py0000644000000000000000000000355712154624371017067 0ustar rootroot00000000000000# rc.py - functions for handling Slovak birth numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """RČ (Rodné číslo, the Slovak birth number). The birth number (RČ, Rodné číslo) is the Slovak national identifier. The number can be 9 or 10 digits long. Numbers given out after January 1st 1954 should have 10 digits. The number includes the birth date of the person and their gender. This number is identical to the Czech counterpart. >>> validate('710319/2745') '7103192745' >>> validate('991231123') '991231123' >>> validate('7103192746') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('1103492745') # invalid date Traceback (most recent call last): ... InvalidComponent: ... >>> validate('590312/123') # 9 digit number in 1959 Traceback (most recent call last): ... InvalidLength: ... >>> format('7103192745') '710319/2745' """ # since this number is essentially the same as the Czech counterpart # (until 1993 the Czech Republic and Slovakia were one country) from stdnum.cz.rc import compact, validate, is_valid, format __all__ = ['compact', 'validate', 'is_valid', 'format'] python-stdnum-1.2/stdnum/sk/__init__.py0000644000000000000000000000163611720140731020205 0ustar rootroot00000000000000# __init__.py - collection of Slovak numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Slovak numbers.""" # provide vat as an alias from stdnum.sk import dph as vat python-stdnum-1.2/stdnum/lu/0000755000000000000000000000000012606445507016106 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/lu/tva.py0000644000000000000000000000452712154624371017256 0ustar rootroot00000000000000# tva.py - functions for handling Luxembourgian VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number). The n° TVA (Numéro d'identification à la taxe sur la valeur ajoutée) is used for tax purposes in Luxembourg. The number consists of 8 digits of which the last two are check digits. >>> validate('LU 150 274 42') '15027442' >>> validate('150 274 43') # invalid check digits Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' :.-').upper().strip() if number.startswith('LU'): number = number[2:] return number def calc_check_digits(number): """Calculate the check digits for the number.""" return '%02d' % (int(number) % 89) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 8: raise InvalidLength() if calc_check_digits(number[:6]) != number[-2:]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/lu/__init__.py0000644000000000000000000000165411720140726020214 0ustar rootroot00000000000000# __init__.py - collection of Luxembourgian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Luxembourgian numbers.""" # provide vat as an alias from stdnum.lu import tva as vat python-stdnum-1.2/stdnum/it/0000755000000000000000000000000012606445507016102 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/it/iva.py0000644000000000000000000000473712154624371017242 0ustar rootroot00000000000000# iva.py - functions for handling Italian VAT numbers # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """Partita IVA (Italian VAT number). The Partita IVA (Imposta sul valore aggiunto) consists of 11 digits. The first 7 digits are a company identifier, the next 3 refer to the province of residence and the last is a check digit. The fiscal code for individuals is not accepted as valid code for intracommunity VAT related operations so it is ignored here. >>> validate('IT 00743110157') '00743110157' >>> validate('00743110158') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum import luhn from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -:').upper().strip() if number.startswith('IT'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit() or int(number[0:7]) == 0: raise InvalidFormat() if len(number) != 11: raise InvalidLength() # check the province of residence if not('001' <= number[7:10] <= '100') and \ number[7:10] not in ('120', '121', '888', '999'): raise InvalidComponent() luhn.validate(number) return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/it/__init__.py0000644000000000000000000000164011720140731020177 0ustar rootroot00000000000000# __init__.py - collection of Italian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Italian numbers.""" # provide vat as an alias from stdnum.it import iva as vat python-stdnum-1.2/stdnum/it/codicefiscale.py0000644000000000000000000001227012606432040021217 0ustar rootroot00000000000000# codicefiscale.py - library for Italian fiscal code # # This file is based on code from pycodicefiscale, a Python library for # working with Italian fiscal code numbers officially known as Italy's # Codice Fiscale. # https://github.com/baxeico/pycodicefiscale # # Copyright (C) 2009-2013 Emanuele Rocca # Copyright (C) 2014 Augusto Destrero # Copyright (C) 2014 Arthur de Jong # # 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 """Codice Fiscale (Italian tax code for individuals). The Codice Fiscale is an alphanumeric code of 16 characters used to identify individuals residing in Italy. The number consists of three characters derived from the person's last name, three from the person's first name, five that hold information on the person's gender and birth date, four that represent the person's place of birth and one check digit. >>> validate('RCCMNL83S18D969H') 'RCCMNL83S18D969H' >>> validate('RCCMNL83S18D969') Traceback (most recent call last): ... InvalidLength: ... >>> calc_check_digit('RCCMNL83S18D969') 'H' """ import re import datetime from stdnum.exceptions import * from stdnum.util import clean # regular expression for matching fiscal codes _code_re = re.compile( r'^[A-Z]{6}' r'[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST]{1}[0-9LMNPQRSTUV]{2}' r'[A-Z]{1}[0-9LMNPQRSTUV]{3}[A-Z]{1}$') # encoding of birth day and year values (usually numeric but some letters # may be substituted on clashes) _date_digits = dict((x, n) for n, x in enumerate('0123456789')) _date_digits.update(dict((x, n) for n, x in enumerate('LMNPQRSTUV'))) # encoding of month values (A = January, etc.) _month_digits = dict((x, n) for n, x in enumerate('ABCDEHLMPRST')) # values of characters in even positions for checksum calculation _even_values = dict((x, n) for n, x in enumerate('0123456789')) _even_values.update( dict((x, n) for n, x in enumerate('ABCDEFGHIJKLMNOPQRSTUVWXYZ'))) # values of characters in odd positions for checksum calculation values = [1, 0, 5, 7, 9, 13, 15, 17, 19, 21, 2, 4, 18, 20, 11, 3, 6, 8, 12, 14, 16, 10, 22, 25, 24, 23] _odd_values = dict((x, values[n]) for n, x in enumerate('0123456789')) _odd_values.update( dict((x, values[n]) for n, x in enumerate('ABCDEFGHIJKLMNOPQRSTUVWXYZ'))) del values def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip().upper() def calc_check_digit(number): """Compute the control code for the given number. The passed number should be the first 15 characters of a fiscal code.""" code = sum(_odd_values[x] if n % 2 == 0 else _even_values[x] for n, x in enumerate(number)) return 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'[code % 26] def get_birth_date(number, minyear=1920): """Get the birth date from the person's fiscal code. Only the last two digits of the year are stured in the number. The dates will be returned in the range from minyear to minyear + 100. >>> get_birth_date('RCCMNL83S18D969H') datetime.date(1983, 11, 18) >>> get_birth_date('RCCMNL83S18D969H', minyear=1990) datetime.date(2083, 11, 18) """ number = compact(number) day = (_date_digits[number[9]] * 10 + _date_digits[number[10]]) % 40 month = _month_digits[number[8]] + 1 year = _date_digits[number[6]] * 10 + _date_digits[number[7]] # find four-digit year year += (minyear // 100) * 100 if year < minyear: year += 100 try: return datetime.date(year, month, day) except ValueError: raise InvalidComponent() def get_gender(number): """Get the gender of the person's fiscal code. >>> get_gender('RCCMNL83S18D969H') 'M' >>> get_gender('CNTCHR83T41D969D') 'F' """ number = compact(number) return 'M' if int(number[9:11]) < 32 else 'F' def validate(number): """Checks to see if the given fiscal code is valid. This checks the length and whether the check digit is correct.""" number = compact(number) if len(number) != 16: raise InvalidLength() if not _code_re.match(number): raise InvalidFormat() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() # check if birth date is valid birth_date = get_birth_date(number) return number def is_valid(number): """Checks to see if the given fiscal code is valid. This checks the length and whether the check digit is correct.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/mt/0000755000000000000000000000000012606445507016106 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/mt/__init__.py0000644000000000000000000000154411720140723020207 0ustar rootroot00000000000000# __init__.py - collection of Maltese numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Maltese numbers.""" python-stdnum-1.2/stdnum/mt/vat.py0000644000000000000000000000433512606424566017261 0ustar rootroot00000000000000# vat.py - functions for handling Maltese VAT numbers # # Copyright (C) 2012-2015 Arthur de Jong # # 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 """VAT (Maltese VAT number). The Maltese VAT registration number contains 8 digits and uses a simple weigted checksum. >>> validate('MT 1167-9112') '11679112' >>> validate('1167-9113') # invalid check digits Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('MT'): number = number[2:] return number def checksum(number): """Calculate the checksum.""" weights = (3, 4, 6, 7, 8, 9, 10, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 37 def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit() or number[0] == '0': raise InvalidFormat() if len(number) != 8: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/cl/0000755000000000000000000000000012606445507016064 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/cl/rut.py0000644000000000000000000000556312601744731017255 0ustar rootroot00000000000000# rut.py - functions for handling Chile RUT/RUN numbers # coding: utf-8 # # Copyright (C) 2008-2011 Cédric Krier # Copyright (C) 2008-2011 B2CK # Copyright (C) 2015 Arthur de Jong # # 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 """RUT (Rol Único Tributario, Chilean national tax number). The RUT, the Chilean national tax number is the same as the RUN (Rol Único Nacional) the Chilean national identification number. The number consists of 8 digits, followed by a check digit. >>> validate('76086428-5') '760864285' >>> validate('CL 12531909-2') '125319092' >>> validate('12531909-3') Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('76086A28-5') Traceback (most recent call last): ... InvalidFormat: ... >>> format('125319092') '12.531.909-2' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -.').upper().strip() if number.startswith('CL'): number = number[2:] return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" s = sum(int(n) * (4 + (5 - i) % 6) for i, n in enumerate(number[::-1])) return '0123456789K'[s % 11] def validate(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" number = compact(number) if len(number) not in (8, 9): raise InvalidLength() if not number[:-1].isdigit(): raise InvalidFormat() if number[-1] != calc_check_digit(number[:-1]): raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return (number[:-7] + '.' + number[-7:-4] + '.' + number[-4:-1] + '-' + number[-1]) python-stdnum-1.2/stdnum/cl/__init__.py0000644000000000000000000000171112601744731020171 0ustar rootroot00000000000000# __init__.py - collection of Chilean numbers # coding: utf-8 # # Copyright (C) 2015 Arthur de Jong # # 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 """Collection of Chilean numbers.""" # provide vat and run as an alias from stdnum.cl import rut as vat from stdnum.cl import rut as run python-stdnum-1.2/stdnum/si/0000755000000000000000000000000012606445507016101 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/si/__init__.py0000644000000000000000000000164411720140731020202 0ustar rootroot00000000000000# __init__.py - collection of Slovenian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # 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 """Collection of Slovenian numbers.""" # provide vat as an alias from stdnum.si import ddv as vat python-stdnum-1.2/stdnum/si/ddv.py0000644000000000000000000000501612154624371017226 0ustar rootroot00000000000000# ddv.py - functions for handling Slovenian VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # 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 """ID za DDV (Davčna številka, Slovenian VAT number). The DDV number (Davčna številka) is used for VAT (DDV, Davek na dodano vrednost) purposes and consist of 8 digits of which the last is a check digit. >>> validate('SI 5022 3054') '50223054' >>> validate('SI 50223055') # invalid check digits Traceback (most recent call last): ... InvalidChecksum: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' -').upper().strip() if number.startswith('SI'): number = number[2:] return number def calc_check_digit(number): """Calculate the check digit. The number passed should not have the check digit included.""" check = (11 - sum((8 - i) * int(n) for i, n in enumerate(number)) % 11) # this results in a two-digit check digit for 11 which should be wrong return '0' if check == 10 else str(check) def validate(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit() or number.startswith('0'): raise InvalidFormat() if len(number) != 8: raise InvalidLength() if calc_check_digit(number[:-1]) != number[-1]: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ec/0000755000000000000000000000000012606445507016055 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/ec/ruc.py0000644000000000000000000000615512606424566017231 0ustar rootroot00000000000000# ruc.py - functions for handling Ecuadorian fiscal numbers # coding: utf-8 # # Copyright (C) 2014 Jonathan Finlay # Copyright (C) 2014-2015 Arthur de Jong # # 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 """RUC (Registro Único de Contribuyentes, Ecuadorian company tax number). The RUC is a tax identification number for legal entities. It has 13 digits where the third digit is a number denoting the type of entity. >>> validate('1792060346-001') '1792060346001' >>> validate('1763154690001') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('179206034601') # too short Traceback (most recent call last): ... InvalidLength: ... """ from stdnum.ec import ci from stdnum.exceptions import * __all__ = ['compact', 'validate', 'is_valid'] # use the same compact function as CI compact = ci.compact def _checksum(number, weights): """Calculate a checksum over the number given the weights.""" return sum(w * int(n) for w, n in zip(weights, number)) % 11 def validate(number): """Checks to see if the number provided is a valid RUC number. This checks the length, formatting, check digit and check sum.""" number = compact(number) if len(number) != 13: raise InvalidLength() if not number.isdigit(): raise InvalidFormat() if number[:2] < '01' or number[:2] > '24': raise InvalidComponent() # invalid province code if number[2] < '6': # 0..5 = natural RUC: CI plus establishment number if number[-3:] == '000': raise InvalidComponent() # establishment number wrong ci.validate(number[:10]) elif number[2] == '6': # 6 = public RUC if number[-4:] == '0000': raise InvalidComponent() # establishment number wrong if _checksum(number[:9], (3, 2, 7, 6, 5, 4, 3, 2, 1)) != 0: raise InvalidChecksum() elif number[2] == '9': # 9 = juridical RUC if number[-3:] == '000': raise InvalidComponent() # establishment number wrong if _checksum(number[:10], (4, 3, 2, 7, 6, 5, 4, 3, 2, 1)) != 0: raise InvalidChecksum() else: raise InvalidComponent() # third digit wrong return number def is_valid(number): """Checks to see if the number provided is a valid RUC number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/ec/__init__.py0000644000000000000000000000164712517406407020173 0ustar rootroot00000000000000# __init__.py - collection of Ecuadorian numbers # coding: utf-8 # # Copyright (C) 2014 Jonathan Finlay # # 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 """Collection of Ecuadorian numbers.""" # provide vat as an alias from stdnum.ec import ruc as vat python-stdnum-1.2/stdnum/ec/ci.py0000644000000000000000000000502412517406407017020 0ustar rootroot00000000000000# ci.py - functions for handling Ecuadorian personal identity codes # coding: utf-8 # # Copyright (C) 2014 Jonathan Finlay # Copyright (C) 2014 Arthur de Jong # # 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 """CI (Cédula de identidad, Ecuadorian personal identity code). The CI is a 10 digit number used to identify Ecuadorian citizens. >>> validate('171430710-3') '1714307103' >>> validate('1714307104') # invalid check digit Traceback (most recent call last): ... InvalidChecksum: ... >>> validate('171430710') # digit missing Traceback (most recent call last): ... InvalidLength: ... """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' -').upper().strip() def _checksum(number): """Calculate a checksum over the number.""" fold = lambda x: x - 9 if x > 9 else x return sum(fold((2 - (i % 2)) * int(n)) for i, n in enumerate(number)) % 10 def validate(number): """Checks to see if the number provided is a valid CI number. This checks the length, formatting and check digit.""" number = compact(number) if len(number) != 10: raise InvalidLength() if not number.isdigit(): raise InvalidFormat() if number[:2] < '01' or number[:2] > '24': raise InvalidComponent() # invalid province code if number[2] > '5': raise InvalidComponent() # third digit wrong if _checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid CI number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False python-stdnum-1.2/stdnum/no/0000755000000000000000000000000012606445507016102 5ustar rootroot00000000000000python-stdnum-1.2/stdnum/no/mva.py0000644000000000000000000000443712601745212017236 0ustar rootroot00000000000000# mva.py - functions for handling Norwegian VAT numbers # coding: utf-8 # # Copyright (C) 2015 Tuomas Toivonen # Copyright (C) 2015 Arthur de Jong # # 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 """MVA (Merverdiavgift, Norwegian VAT number). The VAT number is the standard Norwegian organisation number (Organisasjonsnummer) with 'MVA' as suffix. >>> validate('NO 995 525 828 MVA') '995525828MVA' >>> validate('NO 995 525 829 MVA') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('995525828MVA') 'NO 995 525 828 MVA' """ from stdnum.exceptions import * from stdnum.no import orgnr from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" number = clean(number, ' ').upper().strip() if number.startswith('NO'): number = number[2:] return number def validate(number): """Checks to see if the number provided is a valid MVA number. This checks the length, formatting and check digit.""" number = compact(number) if not number.endswith('MVA'): raise InvalidFormat() orgnr.validate(number[:-3]) return number def is_valid(number): """Checks to see if the number provided is a valid MVA number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return 'NO ' + orgnr.format(number[:9]) + ' ' + number[9:] python-stdnum-1.2/stdnum/no/__init__.py0000644000000000000000000000164512601744764020223 0ustar rootroot00000000000000# __init__.py - collection of Norwegian numbers # coding: utf-8 # # Copyright (C) 2015 Tuomas Toivonen # # 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 """Collection of Norwegian numbers.""" # provide vat as an alias from stdnum.no import mva as vat python-stdnum-1.2/stdnum/no/orgnr.py0000644000000000000000000000470212606424566017610 0ustar rootroot00000000000000# orgnr.py - functions for handling Norwegian organisation numbers # coding: utf-8 # # Copyright (C) 2014 Tomas Thor Jonsson # Copyright (C) 2015 Tuomas Toivonen # Copyright (C) 2015 Arthur de Jong # # 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 """Orgnr (Organisasjonsnummer, Norwegian organisation number). The Organisasjonsnummer is a 9-digit number with a straightforward check mechanism. >>> validate('988 077 917') '988077917' >>> validate('988 077 918') Traceback (most recent call last): ... InvalidChecksum: ... >>> format('988077917') '988 077 917' """ from stdnum.exceptions import * from stdnum.util import clean def compact(number): """Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.""" return clean(number, ' ').strip() def checksum(number): """Calculate the checksum.""" weights = (3, 2, 7, 6, 5, 4, 3, 2, 1) return sum(w * int(n) for w, n in zip(weights, number)) % 11 def validate(number): """Checks to see if the number provided is a valid organisation number. This checks the length, formatting and check digit.""" number = compact(number) if not number.isdigit(): raise InvalidFormat() if len(number) != 9: raise InvalidLength() if checksum(number) != 0: raise InvalidChecksum() return number def is_valid(number): """Checks to see if the number provided is a valid organisation number. This checks the length, formatting and check digit.""" try: return bool(validate(number)) except ValidationError: return False def format(number): """Reformat the passed number to the standard format.""" number = compact(number) return number[:3] + ' ' + number[3:6] + ' ' + number[6:] python-stdnum-1.2/python_stdnum.egg-info/0000755000000000000000000000000012606445507020561 5ustar rootroot00000000000000python-stdnum-1.2/python_stdnum.egg-info/top_level.txt0000644000000000000000000000000712606445506023307 0ustar rootroot00000000000000stdnum python-stdnum-1.2/python_stdnum.egg-info/PKG-INFO0000644000000000000000000002326612606445506021666 0ustar rootroot00000000000000Metadata-Version: 1.1 Name: python-stdnum Version: 1.2 Summary: Python module to handle standardized numbers and codes Home-page: http://arthurdejong.org/python-stdnum/ Author: Arthur de Jong Author-email: arthur@arthurdejong.org License: LGPL Description: Parse, validate and reformat standard numbers and codes. This library offers functions for parsing, validating and reformatting standard numbers and codes in various formats. Currently this package supports the following formats: * al.nipt: NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number) * ar.cuit: CUIT (Código Único de Identificación Tributaria, Argentinian tax number) * at.businessid: Austrian Company Register Numbers * at.uid: UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number) * be.vat: BTW, TVA, NWSt (Belgian VAT number) * bg.egn: EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes) * bg.pnf: PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner) * bg.vat: VAT (Идентификационен номер по ДДС, Bulgarian VAT number) * br.cnpj: CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazillian company identifier) * br.cpf: CPF (Cadastro de Pessoas Físicas, Brazillian national identifier) * ch.ssn: Swiss social security number ("Sozialversicherungsnummer") * ch.uid: UID (Unternehmens-Identifikationsnummer, Swiss business identifier) * ch.vat: VAT, MWST, TVA, IVA, TPV (Mehrwertsteuernummer, the Swiss VAT number) * cl.rut: RUT (Rol Único Tributario, Chilean national tax number) * cn.ric: RIC No. (Chinese Resident Identity Card Number) * co.nit: NIT (Número De Identificación Tributaria, Colombian identity code) * cusip: CUSIP number (financial security identification number) * cy.vat: Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number) * cz.dic: DIČ (Daňové identifikační číslo, Czech VAT number) * cz.rc: RČ (Rodné číslo, the Czech birth number) * de.vat: Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number) * de.wkn: Wertpapierkennnummer (German securities identification code) * dk.cpr: CPR (personnummer, the Danish citizen number) * dk.cvr: CVR (Momsregistreringsnummer, Danish VAT number) * do.cedula: Cedula (Dominican Republic national identification number) * do.rnc: RNC (Registro Nacional del Contribuyente, Dominican Republic tax number) * ean: EAN (International Article Number) * ec.ci: CI (Cédula de identidad, Ecuadorian personal identity code) * ec.ruc: RUC (Registro Único de Contribuyentes, Ecuadorian company tax number) * ee.ik: Isikukood (Estonian Personcal ID number) * ee.kmkr: KMKR (Käibemaksukohuslase, Estonian VAT number) * es.cif: CIF (Certificado de Identificación Fiscal, Spanish company tax number) * es.dni: DNI (Documento nacional de identidad, Spanish personal identity codes) * es.nie: NIE (Número de Identificación de Extranjeros, Spanish foreigner number) * es.nif: NIF (Número de Identificación Fiscal, Spanish VAT number) * eu.at_02: SEPA Identifier of the Creditor (AT-02) * eu.vat: VAT (European Union VAT number) * fi.alv: ALV nro (Arvonlisäveronumero, Finnish VAT number) * fi.associationid: Finnish Association Identifier * fi.hetu: HETU (Henkilötunnus, Finnish personal identity code) * fi.ytunnus: Y-tunnus (Finnish business identifier) * fr.siren: SIREN (a French company identification number) * fr.tva: n° TVA (taxe sur la valeur ajoutée, French VAT number) * gb.sedol: SEDOL number (Stock Exchange Daily Official List number) * gb.vat: VAT (United Kingdom (and Isle of Man) VAT registration number) * gr.vat: FPA, ΦΠΑ, ΑΦΜ (Αριθμός Φορολογικού Μητρώου, the Greek VAT number) * grid: GRid (Global Release Identifier) * hr.oib: OIB (Osobni identifikacijski broj, Croatian identification number) * hu.anum: ANUM (Közösségi adószám, Hungarian VAT number) * iban: IBAN (International Bank Account Number) * ie.pps: PPS No (Personal Public Service Number, Irish personal number) * ie.vat: VAT (Irish VAT number) * imei: IMEI (International Mobile Equipment Identity) * imo: IMO number (International Maritime Organization number) * imsi: IMSI (International Mobile Subscriber Identity) * is_.kennitala: Kennitala (Icelandic personal and organisation identity code) * is_.vsk: VSK number (Virðisaukaskattsnúmer, Icelandic VAT number) * isan: ISAN (International Standard Audiovisual Number) * isbn: ISBN (International Standard Book Number) * isil: ISIL (International Standard Identifier for Libraries) * isin: ISIN (International Securities Identification Number) * ismn: ISMN (International Standard Music Number) * iso6346: ISO 6346 (International standard for container identification) * iso9362: ISO 9362 (Business identifier codes) * issn: ISSN (International Standard Serial Number) * it.codicefiscale: Codice Fiscale (Italian tax code for individuals) * it.iva: Partita IVA (Italian VAT number) * lt.pvm: PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number) * lu.tva: TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number) * lv.pvn: PVN (Pievienotās vērtības nodokļa, Latvian VAT number) * meid: MEID (Mobile Equipment Identifier) * mt.vat: VAT (Maltese VAT number) * mx.rfc: RFC (Registro Federal de Contribuyentes, Mexican tax number) * my.nric: NRIC No. (Malaysian National Registration Identity Card Number) * nl.brin: Brin number (Dutch number for schools) * nl.bsn: BSN (Burgerservicenummer, Dutch national identification number) * nl.btw: BTW-nummer (Omzetbelastingnummer, the Dutch VAT number) * nl.onderwijsnummer: Onderwijsnummer (Dutch student school number) * nl.postcode: Postcode (Dutch postal code) * no.mva: MVA (Merverdiavgift, Norwegian VAT number) * no.orgnr: Orgnr (Organisasjonsnummer, Norwegian organisation number) * pl.nip: NIP (Numer Identyfikacji Podatkowej, Polish VAT number) * pl.pesel: PESEL (Polish national identification number) * pl.regon: REGON (Rejestr Gospodarki Narodowej, Polish register of economic units) * pt.nif: NIF (Número de identificação fiscal, Portuguese VAT number) * ro.cf: CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number) * ro.cnp: CNP (Cod Numeric Personal, Romanian Numerical Personal Code) * ru.inn: ИНН (Идентификационный номер налогоплательщика, Russian tax identifier) * se.orgnr: Orgnr (Organisationsnummer, Swedish company number) * se.vat: VAT (Moms, Mervärdesskatt, Swedish VAT number) * si.ddv: ID za DDV (Davčna številka, Slovenian VAT number) * sk.dph: IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number) * sk.rc: RČ (Rodné číslo, the Slovak birth number) * sm.coe: COE (Codice operatore economico, San Marino national tax number) * us.atin: ATIN (U.S. Adoption Taxpayer Identification Number) * us.ein: EIN (U.S. Employer Identification Number) * us.itin: ITIN (U.S. Individual Taxpayer Identification Number) * us.ptin: PTIN (U.S. Preparer Tax Identification Number) * us.rtn: RTN (Routing transport number) * us.ssn: SSN (U.S. Social Security Number) * us.tin: TIN (U.S. Taxpayer Identification Number) Furthermore a number of generic check digit algorithms are available: * iso7064.mod_11_10: The ISO 7064 Mod 11, 10 algorithm * iso7064.mod_11_2: The ISO 7064 Mod 11, 2 algorithm * iso7064.mod_37_2: The ISO 7064 Mod 37, 2 algorithm * iso7064.mod_37_36: The ISO 7064 Mod 37, 36 algorithm * iso7064.mod_97_10: The ISO 7064 Mod 97, 10 algorithm * luhn: The Luhn and Luhn mod N algorithms * verhoeff: The Verhoeff algorithm All modules implement a common interface: >>> from stdnum import isbn >>> isbn.validate('978-9024538270') '9789024538270' >>> isbn.validate('978-9024538271') Traceback (most recent call last): ... InvalidChecksum: ... Apart from the validate() function, modules generally provide extra parsing, validation, formatting or conversion functions. Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Financial and Insurance Industry Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: Telecommunications Industry Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+) Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Topic :: Office/Business :: Financial Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Text Processing :: General python-stdnum-1.2/python_stdnum.egg-info/SOURCES.txt0000644000000000000000000001603612606445507022453 0ustar rootroot00000000000000COPYING ChangeLog MANIFEST.in NEWS README getcnloc.py getiban.py getimsi.py getisbn.py getisil.py getmybp.py getnumlist.py setup.cfg setup.py docs/conf.py docs/index.rst docs/stdnum.al.nipt.rst docs/stdnum.ar.cuit.rst docs/stdnum.at.businessid.rst docs/stdnum.at.uid.rst docs/stdnum.be.vat.rst docs/stdnum.bg.egn.rst docs/stdnum.bg.pnf.rst docs/stdnum.bg.vat.rst docs/stdnum.br.cnpj.rst docs/stdnum.br.cpf.rst docs/stdnum.ch.ssn.rst docs/stdnum.ch.uid.rst docs/stdnum.ch.vat.rst docs/stdnum.cl.rut.rst docs/stdnum.cn.ric.rst docs/stdnum.co.nit.rst docs/stdnum.cusip.rst docs/stdnum.cy.vat.rst docs/stdnum.cz.dic.rst docs/stdnum.cz.rc.rst docs/stdnum.de.vat.rst docs/stdnum.de.wkn.rst docs/stdnum.dk.cpr.rst docs/stdnum.dk.cvr.rst docs/stdnum.do.cedula.rst docs/stdnum.do.rnc.rst docs/stdnum.ean.rst docs/stdnum.ec.ci.rst docs/stdnum.ec.ruc.rst docs/stdnum.ee.ik.rst docs/stdnum.ee.kmkr.rst docs/stdnum.es.cif.rst docs/stdnum.es.dni.rst docs/stdnum.es.nie.rst docs/stdnum.es.nif.rst docs/stdnum.eu.at_02.rst docs/stdnum.eu.vat.rst docs/stdnum.exceptions.rst docs/stdnum.fi.alv.rst docs/stdnum.fi.associationid.rst docs/stdnum.fi.hetu.rst docs/stdnum.fi.ytunnus.rst docs/stdnum.fr.siren.rst docs/stdnum.fr.tva.rst docs/stdnum.gb.sedol.rst docs/stdnum.gb.vat.rst docs/stdnum.gr.vat.rst docs/stdnum.grid.rst docs/stdnum.hr.oib.rst docs/stdnum.hu.anum.rst docs/stdnum.iban.rst docs/stdnum.ie.pps.rst docs/stdnum.ie.vat.rst docs/stdnum.imei.rst docs/stdnum.imo.rst docs/stdnum.imsi.rst docs/stdnum.is_.kennitala.rst docs/stdnum.is_.vsk.rst docs/stdnum.isan.rst docs/stdnum.isbn.rst docs/stdnum.isil.rst docs/stdnum.isin.rst docs/stdnum.ismn.rst docs/stdnum.iso6346.rst docs/stdnum.iso7064.rst docs/stdnum.iso9362.rst docs/stdnum.issn.rst docs/stdnum.it.codicefiscale.rst docs/stdnum.it.iva.rst docs/stdnum.lt.pvm.rst docs/stdnum.lu.tva.rst docs/stdnum.luhn.rst docs/stdnum.lv.pvn.rst docs/stdnum.meid.rst docs/stdnum.mt.vat.rst docs/stdnum.mx.rfc.rst docs/stdnum.my.nric.rst docs/stdnum.nl.brin.rst docs/stdnum.nl.bsn.rst docs/stdnum.nl.btw.rst docs/stdnum.nl.onderwijsnummer.rst docs/stdnum.nl.postcode.rst docs/stdnum.no.mva.rst docs/stdnum.no.orgnr.rst docs/stdnum.pl.nip.rst docs/stdnum.pl.pesel.rst docs/stdnum.pl.regon.rst docs/stdnum.pt.nif.rst docs/stdnum.ro.cf.rst docs/stdnum.ro.cnp.rst docs/stdnum.ru.inn.rst docs/stdnum.se.orgnr.rst docs/stdnum.se.vat.rst docs/stdnum.si.ddv.rst docs/stdnum.sk.dph.rst docs/stdnum.sk.rc.rst docs/stdnum.sm.coe.rst docs/stdnum.us.atin.rst docs/stdnum.us.ein.rst docs/stdnum.us.itin.rst docs/stdnum.us.ptin.rst docs/stdnum.us.rtn.rst docs/stdnum.us.ssn.rst docs/stdnum.us.tin.rst docs/stdnum.verhoeff.rst docs/_templates/autosummary/module.rst python_stdnum.egg-info/PKG-INFO python_stdnum.egg-info/SOURCES.txt python_stdnum.egg-info/dependency_links.txt python_stdnum.egg-info/pbr.json python_stdnum.egg-info/requires.txt python_stdnum.egg-info/top_level.txt stdnum/__init__.py stdnum/cusip.py stdnum/ean.py stdnum/exceptions.py stdnum/grid.py stdnum/iban.dat stdnum/iban.py stdnum/imei.py stdnum/imo.py stdnum/imsi.dat stdnum/imsi.py stdnum/isan.py stdnum/isbn.dat stdnum/isbn.py stdnum/isil.dat stdnum/isil.py stdnum/isin.py stdnum/ismn.py stdnum/iso6346.py stdnum/iso9362.py stdnum/issn.py stdnum/luhn.py stdnum/meid.py stdnum/numdb.py stdnum/util.py stdnum/verhoeff.py stdnum/al/__init__.py stdnum/al/nipt.py stdnum/ar/__init__.py stdnum/ar/cuit.py stdnum/at/__init__.py stdnum/at/businessid.py stdnum/at/uid.py stdnum/be/__init__.py stdnum/be/vat.py stdnum/bg/__init__.py stdnum/bg/egn.py stdnum/bg/pnf.py stdnum/bg/vat.py stdnum/br/__init__.py stdnum/br/cnpj.py stdnum/br/cpf.py stdnum/ch/__init__.py stdnum/ch/ssn.py stdnum/ch/uid.py stdnum/ch/vat.py stdnum/cl/__init__.py stdnum/cl/rut.py stdnum/cn/__init__.py stdnum/cn/loc.dat stdnum/cn/ric.py stdnum/co/__init__.py stdnum/co/nit.py stdnum/cy/__init__.py stdnum/cy/vat.py stdnum/cz/__init__.py stdnum/cz/dic.py stdnum/cz/rc.py stdnum/de/__init__.py stdnum/de/vat.py stdnum/de/wkn.py stdnum/dk/__init__.py stdnum/dk/cpr.py stdnum/dk/cvr.py stdnum/do/__init__.py stdnum/do/cedula.py stdnum/do/rnc.py stdnum/ec/__init__.py stdnum/ec/ci.py stdnum/ec/ruc.py stdnum/ee/__init__.py stdnum/ee/ik.py stdnum/ee/kmkr.py stdnum/es/__init__.py stdnum/es/cif.py stdnum/es/dni.py stdnum/es/nie.py stdnum/es/nif.py stdnum/eu/__init__.py stdnum/eu/at_02.py stdnum/eu/vat.py stdnum/fi/__init__.py stdnum/fi/alv.py stdnum/fi/associationid.py stdnum/fi/hetu.py stdnum/fi/ytunnus.py stdnum/fr/__init__.py stdnum/fr/siren.py stdnum/fr/tva.py stdnum/gb/__init__.py stdnum/gb/sedol.py stdnum/gb/vat.py stdnum/gr/__init__.py stdnum/gr/vat.py stdnum/hr/__init__.py stdnum/hr/oib.py stdnum/hu/__init__.py stdnum/hu/anum.py stdnum/ie/__init__.py stdnum/ie/pps.py stdnum/ie/vat.py stdnum/is_/__init__.py stdnum/is_/kennitala.py stdnum/is_/vsk.py stdnum/iso7064/__init__.py stdnum/iso7064/mod_11_10.py stdnum/iso7064/mod_11_2.py stdnum/iso7064/mod_37_2.py stdnum/iso7064/mod_37_36.py stdnum/iso7064/mod_97_10.py stdnum/it/__init__.py stdnum/it/codicefiscale.py stdnum/it/iva.py stdnum/lt/__init__.py stdnum/lt/pvm.py stdnum/lu/__init__.py stdnum/lu/tva.py stdnum/lv/__init__.py stdnum/lv/pvn.py stdnum/mt/__init__.py stdnum/mt/vat.py stdnum/mx/__init__.py stdnum/mx/rfc.py stdnum/my/__init__.py stdnum/my/bp.dat stdnum/my/nric.py stdnum/nl/__init__.py stdnum/nl/brin.py stdnum/nl/bsn.py stdnum/nl/btw.py stdnum/nl/onderwijsnummer.py stdnum/nl/postcode.py stdnum/no/__init__.py stdnum/no/mva.py stdnum/no/orgnr.py stdnum/pl/__init__.py stdnum/pl/nip.py stdnum/pl/pesel.py stdnum/pl/regon.py stdnum/pt/__init__.py stdnum/pt/nif.py stdnum/ro/__init__.py stdnum/ro/cf.py stdnum/ro/cnp.py stdnum/ru/__init__.py stdnum/ru/inn.py stdnum/se/__init__.py stdnum/se/orgnr.py stdnum/se/vat.py stdnum/si/__init__.py stdnum/si/ddv.py stdnum/sk/__init__.py stdnum/sk/dph.py stdnum/sk/rc.py stdnum/sm/__init__.py stdnum/sm/coe.py stdnum/us/__init__.py stdnum/us/atin.py stdnum/us/ein.dat stdnum/us/ein.py stdnum/us/itin.py stdnum/us/ptin.py stdnum/us/rtn.py stdnum/us/ssn.py stdnum/us/tin.py tests/numdb-test.dat tests/test_al_nipt.doctest tests/test_ar_cuit.doctest tests/test_asx.doctest tests/test_bg_vat.doctest tests/test_br_cnpj.doctest tests/test_br_cpf.doctest tests/test_ch_uid.doctest tests/test_ch_vat.doctest tests/test_cl_rut.doctest tests/test_cn_ric.doctest tests/test_co_nit.doctest tests/test_cusip.doctest tests/test_de_wkn.doctest tests/test_do_cedula.doctest tests/test_do_rnc.doctest tests/test_ean.doctest tests/test_ec_ci.doctest tests/test_ec_ruc.doctest tests/test_ee_ik.doctest tests/test_eu_vat.doctest tests/test_fi_hetu.doctest tests/test_gb_sedol.doctest tests/test_gb_vat.doctest tests/test_iban.doctest tests/test_imei.doctest tests/test_is_kennitala.doctest tests/test_isan.doctest tests/test_isbn.doctest tests/test_isin.doctest tests/test_ismn.doctest tests/test_iso6346.doctest tests/test_iso7064.doctest tests/test_it_codicefiscale.doctest tests/test_luhn.doctest tests/test_markit_red6.doctest tests/test_meid.doctest tests/test_mx_rfc.doctest tests/test_my_nric.doctest tests/test_no_mva.doctest tests/test_pl_regon.doctest tests/test_robustness.doctest tests/test_ru_inn.doctest tests/test_verhoeff.doctestpython-stdnum-1.2/python_stdnum.egg-info/requires.txt0000644000000000000000000000004612606445506023160 0ustar rootroot00000000000000 [VIES] suds [VIES-ALT] PySimpleSOAP python-stdnum-1.2/python_stdnum.egg-info/pbr.json0000644000000000000000000000005612606445506022237 0ustar rootroot00000000000000{"is_release": true, "git_version": "1361817"}python-stdnum-1.2/python_stdnum.egg-info/dependency_links.txt0000644000000000000000000000000112606445506024626 0ustar rootroot00000000000000 python-stdnum-1.2/getcnloc.py0000755000000000000000000000600412606431641016321 0ustar rootroot00000000000000#!/usr/bin/env python # getcnloc.py - script to fetch data from the CN Open Data community # # Copyright (C) 2014-2015 Jiangge Zhang # Copyright (C) 2015 Arthur de Jong # # 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 from __future__ import print_function, unicode_literals import sys import codecs from collections import OrderedDict from datetime import datetime import requests data_url = 'https://github.com/cn/GB2260' data_revisions = [ 'GB2260-2002', 'GB2260-2003', 'GB2260-200306', 'GB2260-2004', 'GB2260-200403', 'GB2260-200409', 'GB2260-2005', 'GB2260-200506', 'GB2260-2006', 'GB2260-2007', 'GB2260-2008', 'GB2260-2009', 'GB2260-2010', 'GB2260-2011', 'GB2260-2012', 'GB2260-2013', 'GB2260-2014', ] def fetch_data(): data_collection = OrderedDict() for revision in data_revisions: response = requests.get('%s/raw/master/%s.txt' % (data_url, revision)) if response.ok: print('%s is fetched' % revision, file=sys.stderr) else: print('%s is missing' % revision, file=sys.stderr) continue for line in response.text.strip().split('\n'): code, name = line.split('\t') data_collection[code.strip()] = name.strip() return data_collection def group_data(data_collection): for code, name in sorted(data_collection.items()): if code.endswith('00'): continue # county only province_code = code[:2] + '0000' prefecture_code = code[:4] + '00' province_name = data_collection[province_code] prefecture_name = data_collection[prefecture_code] yield code, name, prefecture_name, province_name def print_data_file(file): print("# generated from National Bureau of Statistics of the People's", file=file) print('# Republic of China, downloaded from %s' % data_url, file=file) print('# %s' % datetime.utcnow(), file=file) print('Downloading...', file=sys.stderr) data_collection = fetch_data() print('Generating...', file=sys.stderr) for data in group_data(data_collection): print('%s county="%s" prefecture="%s" province="%s"' % data, file=file) if __name__ == '__main__': if sys.stdout.isatty(): print_data_file(sys.stdout) else: print_data_file(codecs.getwriter('utf-8')(sys.stdout)) python-stdnum-1.2/COPYING0000644000000000000000000006350411423014675015211 0ustar rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it!