From 42764fae91e1235af279ca5f11b1ab8d762b5956 Mon Sep 17 00:00:00 2001 From: Georg Sauthoff Date: Mon, 6 Dec 2021 23:09:03 +0100 Subject: [PATCH] add new prices for 2021 --- examples/update_products.py | 1 + inema/data/products-2022-01-01.json | 488 ++++++++++++++++++++++++++++ setup.py | 3 +- 3 files changed, 491 insertions(+), 1 deletion(-) create mode 100644 inema/data/products-2022-01-01.json diff --git a/examples/update_products.py b/examples/update_products.py index 261c86a..26653a6 100755 --- a/examples/update_products.py +++ b/examples/update_products.py @@ -18,6 +18,7 @@ import decimal def quantize(x): x = decimal.Decimal(x).quantize(decimal.Decimal('.01')) + return str(x) def main(csv_filename, json_filename, filename): with open(csv_filename, newline='', encoding='latin-1') as f \ diff --git a/inema/data/products-2022-01-01.json b/inema/data/products-2022-01-01.json new file mode 100644 index 0000000..c66c6d0 --- /dev/null +++ b/inema/data/products-2022-01-01.json @@ -0,0 +1,488 @@ +{ + "1": { + "cost_price": "0.85", + "international": false, + "max_weight": "20", + "name": "Standardbrief" + }, + "10001": { + "cost_price": "1.1", + "international": true, + "max_weight": "20", + "name": "Standardbrief Intern. GK" + }, + "10011": { + "cost_price": "1.7", + "international": true, + "max_weight": "50", + "name": "Kompaktbrief Intern. GK" + }, + "1002": { + "cost_price": "3.20", + "international": false, + "max_weight": "20", + "name": "Standardbrief Integral + EINSCHREIBEN EINWURF" + }, + "10051": { + "cost_price": "3.7", + "international": true, + "max_weight": "500", + "name": "Großbrief Intern. GK" + }, + "1007": { + "cost_price": "3.50", + "international": false, + "max_weight": "20", + "name": "Standardbrief Integral + EINSCHREIBEN" + }, + "10071": { + "cost_price": "7", + "international": true, + "max_weight": "1000", + "name": "Maxibrief Intern. bis 1.000g GK" + }, + "1009": { + "cost_price": "5.70", + "international": false, + "max_weight": "20", + "name": "Standardbrief Integral + EINSCHREIBEN + EIGENHÄNDIG" + }, + "10091": { + "cost_price": "17", + "international": true, + "max_weight": "2000", + "name": "Maxibrief Intern. bis 2.000g GK" + }, + "1012": { + "cost_price": "3.35", + "international": false, + "max_weight": "50", + "name": "Kompaktbrief Integral + EINSCHREIBEN EINWURF" + }, + "10162": { + "cost_price": "4.30", + "international": true, + "max_weight": "2000", + "name": "Brief Kilotarif international ohne USt + EINSCHREIBEN" + }, + "10166": { + "cost_price": "0.80", + "international": true, + "max_weight": "2000", + "name": "Brief Kilotarif international ohne USt." + }, + "1017": { + "cost_price": "3.65", + "international": false, + "max_weight": "50", + "name": "Kompaktbrief Integral + EINSCHREIBEN" + }, + "1019": { + "cost_price": "5.85", + "international": false, + "max_weight": "50", + "name": "Kompaktbrief Integral + EINSCHREIBEN + EIGENHÄNDIG" + }, + "10201": { + "cost_price": "0.95", + "international": true, + "max_weight": "15", + "name": "Postkarte Intern. GK" + }, + "1022": { + "cost_price": "3.95", + "international": false, + "max_weight": "500", + "name": "Großbrief Integral + EINSCHREIBEN EINWURF" + }, + "10246": { + "cost_price": "3.8", + "international": true, + "max_weight": "500", + "name": "Warenpost International XS" + }, + "10247": { + "cost_price": "5", + "international": true, + "max_weight": "500", + "name": "Warenpost International S" + }, + "10248": { + "cost_price": "9", + "international": true, + "max_weight": "1000", + "name": "Warenpost International M" + }, + "10249": { + "cost_price": "19.9", + "international": true, + "max_weight": "2000", + "name": "Warenpost International L" + }, + "10250": { + "cost_price": "6.15", + "international": true, + "max_weight": "500", + "name": "Warenpost International XS Tracked" + }, + "10251": { + "cost_price": "7.35", + "international": true, + "max_weight": "500", + "name": "Warenpost International S Tracked" + }, + "10252": { + "cost_price": "11.35", + "international": true, + "max_weight": "1000", + "name": "Warenpost International M Tracked" + }, + "10253": { + "cost_price": "22.25", + "international": true, + "max_weight": "2000", + "name": "Warenpost International L Tracked" + }, + "10254": { + "cost_price": "3.81", + "international": true, + "max_weight": "500", + "name": "Warenpost International XS (EU/USt.)" + }, + "10255": { + "cost_price": "4.4", + "international": true, + "max_weight": "500", + "name": "Warenpost International S (EU/USt.)" + }, + "10256": { + "cost_price": "8.33", + "international": true, + "max_weight": "1000", + "name": "Warenpost International M (EU/USt.)" + }, + "10257": { + "cost_price": "20.23", + "international": true, + "max_weight": "2000", + "name": "Warenpost International L (EU/USt.)" + }, + "10258": { + "cost_price": "6.6", + "international": true, + "max_weight": "500", + "name": "Warenpost International XS Tracked (EU/USt.)" + }, + "10259": { + "cost_price": "7.2", + "international": true, + "max_weight": "500", + "name": "Warenpost International S Tracked (EU/USt.)" + }, + "10260": { + "cost_price": "11.13", + "international": true, + "max_weight": "1000", + "name": "Warenpost International M Tracked (EU/USt.)" + }, + "10261": { + "cost_price": "23.03", + "international": true, + "max_weight": "2000", + "name": "Warenpost International L Tracked (EU/USt.)" + }, + "1027": { + "cost_price": "4.25", + "international": false, + "max_weight": "500", + "name": "Großbrief Integral + EINSCHREIBEN" + }, + "10270": { + "cost_price": "1.50", + "international": true, + "max_weight": "2000", + "name": "Warenpost Int. KT (EU/USt.) für Internetmarke" + }, + "10271": { + "cost_price": "3.60", + "international": true, + "max_weight": "2000", + "name": "Warenpost Int. KT Tracked (EU/USt.) für Internetmarke" + }, + "10272": { + "cost_price": "2", + "international": true, + "max_weight": "2000", + "name": "Warenpost Int. KT (Non EU) für Internetmarke" + }, + "10273": { + "cost_price": "4.10", + "international": true, + "max_weight": "2000", + "name": "Warenpost Int. KT Tracked (Non EU) für Internetmarke" + }, + "10280": { + "cost_price": "7.3", + "international": true, + "max_weight": "500", + "name": "Warenpost International XS Unterschrift" + }, + "10281": { + "cost_price": "8.5", + "international": true, + "max_weight": "500", + "name": "Warenpost International S Unterschrift" + }, + "10282": { + "cost_price": "12.5", + "international": true, + "max_weight": "1000", + "name": "Warenpost International M Unterschrift" + }, + "10283": { + "cost_price": "23.4", + "international": true, + "max_weight": "2000", + "name": "Warenpost International L Unterschrift" + }, + "10284": { + "cost_price": "7.97", + "international": true, + "max_weight": "500", + "name": "Warenpost International XS Unterschrift (EU/USt.)" + }, + "10285": { + "cost_price": "8.57", + "international": true, + "max_weight": "500", + "name": "Warenpost International S Unterschrift (EU/USt.)" + }, + "10286": { + "cost_price": "12.5", + "international": true, + "max_weight": "1000", + "name": "Warenpost International M Unterschrift (EU/USt.)" + }, + "10287": { + "cost_price": "24.4", + "international": true, + "max_weight": "2000", + "name": "Warenpost International L Unterschrift (EU/USt.)" + }, + "1029": { + "cost_price": "6.45", + "international": false, + "max_weight": "500", + "name": "Großbrief Integral + EINSCHREIBEN + EIGENHÄNDIG" + }, + "10292": { + "cost_price": "4.75", + "international": true, + "max_weight": "2000", + "name": "Warenpost Int. KT Unterschrift (EU/USt.) für Internetmarke" + }, + "10293": { + "cost_price": "5.25", + "international": true, + "max_weight": "2000", + "name": "Warenpost Int. KT Unterschrift (Non EU) für Internetmarke" + }, + "1032": { + "cost_price": "5.10", + "international": false, + "max_weight": "1000", + "name": "Maxibrief Integral + EINSCHREIBEN EINWURF" + }, + "1037": { + "cost_price": "5.40", + "international": false, + "max_weight": "1000", + "name": "Maxibrief Integral + EINSCHREIBEN" + }, + "1039": { + "cost_price": "7.60", + "international": false, + "max_weight": "1000", + "name": "Maxibrief Integral + EINSCHREIBEN + EIGENHÄNDIG" + }, + "1042": { + "cost_price": "7.30", + "international": false, + "max_weight": "2000", + "name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN EINWURF" + }, + "1047": { + "cost_price": "7.60", + "international": false, + "max_weight": "2000", + "name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN" + }, + "1049": { + "cost_price": "9.80", + "international": false, + "max_weight": "2000", + "name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN + EIGENHÄNDIG" + }, + "1052": { + "cost_price": "3.05", + "international": false, + "max_weight": "15", + "name": "Postkarte Integral + EINSCHREIBEN EINWURF" + }, + "1057": { + "cost_price": "3.35", + "international": false, + "max_weight": "15", + "name": "Postkarte Integral + EINSCHREIBEN" + }, + "1059": { + "cost_price": "5.55", + "international": false, + "max_weight": "15", + "name": "Postkarte Integral + EINSCHREIBEN + EIGENHÄNDIG" + }, + "11": { + "cost_price": "1.00", + "international": false, + "max_weight": "50", + "name": "Kompaktbrief" + }, + "11006": { + "cost_price": "4.6", + "international": true, + "max_weight": "20", + "name": "Standardbrief Intern. GK Integral + EINSCHREIBEN" + }, + "11016": { + "cost_price": "5.2", + "international": true, + "max_weight": "50", + "name": "Kompaktbrief Intern. GK Integral + EINSCHREIBEN" + }, + "11056": { + "cost_price": "7.2", + "international": true, + "max_weight": "500", + "name": "Großbrief Intern. GK Integral + EINSCHREIBEN" + }, + "11076": { + "cost_price": "10.5", + "international": true, + "max_weight": "1000", + "name": "Maxibrief Intern. bis 1.000g GK Integral + EINSCHREIBEN" + }, + "11096": { + "cost_price": "20.5", + "international": true, + "max_weight": "2000", + "name": "Maxibrief Intern. bis 2.000g GK Integral + EINSCHREIBEN" + }, + "11202": { + "cost_price": "4.45", + "international": true, + "max_weight": "15", + "name": "Postkarte Intern. GK Integral + EINSCHREIBEN" + }, + "195": { + "cost_price": "1.95", + "international": false, + "max_weight": "20", + "name": "Standardbrief + Prio" + }, + "196": { + "cost_price": "2.10", + "international": false, + "max_weight": "50", + "name": "Kompaktbrief + Prio" + }, + "197": { + "cost_price": "2.70", + "international": false, + "max_weight": "500", + "name": "Großbrief + Prio" + }, + "198": { + "cost_price": "3.85", + "international": false, + "max_weight": "1000", + "name": "Maxibrief + Prio" + }, + "199": { + "cost_price": "6.05", + "international": false, + "max_weight": "2000", + "name": "Maxibrief bis 2000 g + Zusatzentgelt MBf + Prio" + }, + "200": { + "cost_price": "1.80", + "international": false, + "max_weight": "15", + "name": "Postkarte + Prio" + }, + "21": { + "cost_price": "1.60", + "international": false, + "max_weight": "500", + "name": "Großbrief" + }, + "282": { + "cost_price": "1.95", + "international": false, + "max_weight": "500", + "name": "Bücher- und Warensendung 500" + }, + "290": { + "cost_price": "2.25", + "international": false, + "max_weight": "1000", + "name": "Bücher- und Warensendung 1000" + }, + "31": { + "cost_price": "2.75", + "international": false, + "max_weight": "1000", + "name": "Maxibrief" + }, + "401": { + "cost_price": "0.89", + "international": false, + "max_weight": "50", + "name": "Streifbandzeitung bis 50 g" + }, + "402": { + "cost_price": "1.19", + "international": false, + "max_weight": "100", + "name": "Streifbandzeitung bis 100 g" + }, + "403": { + "cost_price": "1.37", + "international": false, + "max_weight": "250", + "name": "Streifbandzeitung bis 250 g" + }, + "404": { + "cost_price": "1.67", + "international": false, + "max_weight": "500", + "name": "Streifbandzeitung bis 500 g" + }, + "405": { + "cost_price": "2.50", + "international": false, + "max_weight": "1000", + "name": "Streifbandzeitung bis 1000 g" + }, + "41": { + "cost_price": "4.95", + "international": false, + "max_weight": "2000", + "name": "Maxibrief bis 2000 g + Zusatzentgelt MBf" + }, + "51": { + "cost_price": "0.70", + "international": false, + "max_weight": "15", + "name": "Postkarte" + } +} \ No newline at end of file diff --git a/setup.py b/setup.py index 1678200..4effff2 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ install_requires = [ setup( name='inema', - version='0.8.4', + version='0.8.5', description='A Python interface to the Deutsche Post Internetmarke and Warenpost International Online Franking', long_description=open('README.rst').read(), author='Harald Welte', @@ -17,6 +17,7 @@ setup( packages=['inema'], install_requires=install_requires, package_data={'inema': ['data/products.json', + 'data/products-2022-01-01.json', 'data/formats.json']}, license='AGPLv3', classifiers=[