Compare commits

...

20 commits

Author SHA1 Message Date
Yarne Coppens
428c69e7fb Allowed all origins 2024-09-04 12:03:59 +02:00
Yarne Coppens
128bbd9f36 Fixed wrong origin header 2024-09-04 11:45:11 +02:00
Yarne Coppens
0d91dcedfc Added requirements.txt 2024-09-04 11:39:36 +02:00
Yarne Coppens
41a6fb9fdc Updated origin header 2024-09-04 11:37:32 +02:00
Yarne Coppens
79aa831fea Added more svgs 2024-09-04 11:35:43 +02:00
Yarne Coppens
2d7768b72c Removed a debug print 2024-09-04 10:14:02 +02:00
Yarne Coppens
56b03a1054 Added more products 2024-09-04 10:08:41 +02:00
Yarne Coppens
b8727deca1 Added endpoint to convert price to cash 2024-08-24 13:07:15 +02:00
Yarninator
72bf8e5ce3 Added more icons 2024-08-05 14:02:39 +02:00
Yarninator
4eaa17e0ce Wrote a icon retrieval test 2024-08-05 13:49:17 +02:00
Yarninator
22a1227ee2 Validators now accept file content as string 2024-08-05 13:48:47 +02:00
Yarninator
bd685cfa72 Renamed validators to shop_validators to fix clash between existing validators library 2024-08-05 13:40:37 +02:00
Yarninator
a659bbfffc Validate if requested svg icon is an svg 2024-08-05 13:37:03 +02:00
Yarne Coppens
2b096baa88 Can now retrieve icon 2024-08-04 17:23:56 +02:00
Yarne Coppens
27f70b1221 Added definitions config 2024-08-04 17:23:41 +02:00
Yarne Coppens
ffb489c024 Added icons 2024-08-04 17:19:39 +02:00
Yarne Coppens
b024d1ba89 Changed product classes to contain image_filename instead of URL 2024-08-04 17:18:19 +02:00
Yarne Coppens
de974e76e2 Added barcode to products 2024-08-04 10:23:58 +02:00
Yarne Coppens
8e227fed84 Removed cors wildcard origin 2024-08-04 10:13:59 +02:00
Yarne Coppens
c196a85059 Added CORS 2024-08-04 10:06:07 +02:00
39 changed files with 56961 additions and 11 deletions

4
icons/apple.svg Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.9579 8.51864C10.9658 8.67799 10.9797 8.83851 10.9999 9C12.7875 9.22345 14.4571 8.67892 15.7223 7.65278C15.9571 7.63419 16.1896 7.63077 16.4174 7.64315C17.6741 7.71143 18.7111 8.24574 19.2969 9.28479C19.7417 10.0737 19.9999 10.9403 19.9999 12C19.9999 14.0817 19.0464 16.2523 17.6503 18.3122C16.5964 19.8671 14.5039 20.4164 12.5622 19.7362L12.3305 19.655C12.1165 19.58 11.8833 19.58 11.6693 19.655L11.4376 19.7362C9.49579 20.4164 7.40333 19.8671 6.34947 18.3122C4.95334 16.2523 3.99988 14.0817 3.99988 12C3.99988 10.9712 4.24322 10.1244 4.66059 9.3544C5.2333 8.29785 6.27177 7.74749 7.54043 7.66705C8.66006 7.59607 9.8982 7.90358 10.9579 8.51864ZM12.9999 3.58597V3C12.9999 2.44772 12.5522 2 11.9999 2C11.4476 2 10.9999 2.44772 10.9999 3V6.30987C9.85507 5.8274 8.60755 5.59538 7.41388 5.67106C5.62129 5.78471 3.87417 6.60835 2.90229 8.40131C2.33287 9.45181 1.99988 10.6248 1.99988 12C1.99988 14.6621 3.20202 17.2331 4.6939 19.4343C6.33311 21.8529 9.39734 22.5259 11.9999 21.6575C14.6024 22.5259 17.6667 21.8528 19.3059 19.4343C20.7977 17.2331 21.9999 14.662 21.9999 12C21.9999 10.5813 21.6455 9.3779 21.0391 8.30249C20.1929 6.80168 18.8033 5.99975 17.3096 5.73573C17.8976 4.64129 18.1692 3.35452 17.9999 2C16.0783 1.7598 14.2931 2.40702 12.9999 3.58597Z" fill="#000000"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

47
icons/banana.svg Normal file
View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<style type="text/css">
.st0{fill:#000000;}
</style>
<g>
<path class="st0" d="M470.19,207.829c-11.993-65.118-53.256-101.576-73.32-117.106l0.348-28.762h9.039h19.064l0.22-19.064
l0.27-23.395L426.033,0h-19.506h-88.012h-19.283v19.283v23.395v19.284h19.283h9.504l-0.37,30.048l-0.016,1.512l0.216,1.5
c0.612,4.206,1.077,8.28,1.61,12.41c-1.259,12.052-3.788,24.048-7.388,35.868c-23.451,20.739-50.728,37.424-78.885,49.815
c-33.636,14.826-68.439,23.608-98.824,26.42c-12.946,1.2-25.29,1.626-36.25,1.626c-13.157,0-24.32-0.615-32.152-1.224
c-3.916-0.307-7.002-0.615-9.089-0.841c-1.042-0.113-1.836-0.201-2.36-0.27l-0.58-0.07l-0.158-0.018l-0.009,0.069
c-1.482-0.295-2.972-0.546-4.451-0.546c-9.224,0-17.714,5.599-21.238,14.444l-0.01,0.025c-1.161,2.924-1.638,5.976-1.635,8.838
c0.094,7.564,2.796,13.791,5.464,19.967l0.038,0.088l0.047,0.094c0.537,1.174,5.803,11.688,21.286,23.558
c15.467,11.889,41.034,25.033,81.7,32.032c2.712,0.464,9.036,1.701,16.901,2.793c1.064,0.144,2.225,0.283,3.342,0.421
c-20.42,7.413-39.58,12.46-53.867,15.636c-7.648,1.701-13.904,2.881-18.222,3.634c-2.16,0.37-3.832,0.64-4.952,0.81l-1.258,0.188
l-0.377,0.057l0.006,0.044c-11.399,0.804-20.645,9.579-21.907,20.985l-0.004,0.025c-0.094,0.86-0.137,1.708-0.137,2.554
c0.006,5.43,1.817,10.188,4.07,14.237c2.281,4.086,5.078,7.676,7.969,11.229l0.06,0.076l0.075,0.082
c0.74,0.878,7.341,8.254,22.209,15.341c14.861,7.099,37.92,13.847,71.27,13.834c8.433,0,17.523-0.427,27.312-1.381
c13.141-1.306,28.426-1.789,44.878-5.078c2.458-0.489,4.953-1.073,7.461-1.714c-17.708,18.906-32.516,31.36-35.544,33.852
c-13.129,9.152-17.965,26.666-11.217,41.323c6.745,14.556,21.976,20.011,30.159,22.943l0.192,0.069l0.197,0.063
c1.867,0.628,8.873,2.668,20.526,2.668c22.302,0,58.817-7.375,106.118-42.528C455.134,398.93,490.076,315.79,470.19,207.829z
M164.519,301.001c-7.366-1.023-13.147-2.153-16.276-2.7c-38.056-6.566-60.436-18.511-73.236-28.322
c-6.402-4.916-10.417-9.315-12.78-12.347c-1.18-1.513-1.946-2.687-2.382-3.409l-0.405-0.703c-2.482-5.48-3.816-9.867-3.722-11.951
c0.003-0.81,0.11-1.3,0.283-1.752c0.555-1.406,1.921-2.272,3.314-2.272l0.854,0.107l0.515,0.125l0.524,0.069
c0.305,0.044,19.396,2.599,46.906,2.599c11.459,0,24.383-0.446,38.033-1.714c32.669-3.038,69.259-12.316,104.815-27.964
c19.623-8.65,38.887-19.322,56.987-31.932c-10.956,22.39-25.118,43.519-40.786,62.313c-16.238,19.522-34.003,36.527-51.074,49.872
c-5.69,4.457-11.296,8.462-16.747,12.059l-0.066-0.647c-3.239,0.32-6.657,0.465-10.122,0.465
C180.635,302.903,171.85,302.024,164.519,301.001z M238.538,393.89c-14.503,2.925-28.931,3.434-42.96,4.79
c-9.193,0.897-17.658,1.293-25.435,1.293c-30.774-0.007-50.785-6.158-62.969-11.958c-6.092-2.907-10.232-5.738-12.764-7.734
c-1.265-0.998-2.132-1.789-2.63-2.272l-0.436-0.439c-2.583-3.164-4.683-5.982-5.929-8.248c-1.296-2.329-1.647-3.867-1.641-4.865
l0.025-0.464c0.247-2.21,2.087-3.905,4.274-3.955l0.521-0.012l0.524-0.069c0.44-0.069,40.92-5.53,87.243-22.974h0.009l0.028-0.012
l1.252-0.471l-1.239,0.465c15.683-5.944,33.348-16.534,51.557-30.752c27.299-21.361,55.687-50.939,78.301-85.52
c11.088-16.98,20.768-35.196,28.181-54.241c3.029,87.441-15.768,156.1-57.476,212.211
C264.04,387.004,251.281,391.316,238.538,393.89z M348.721,453.993c-44.344,32.955-77.114,38.724-94.615,38.724
c-9.419,0-14.412-1.67-14.412-1.67c-8.882-3.182-16.189-6.472-19.145-12.85c-2.938-6.384-0.734-13.973,5.204-17.757
c0,0,31.423-25.209,61.378-63.124c1.186-1.5,2.279-3.076,3.436-4.601c1.073-0.734,2.147-1.425,3.217-2.209l-0.772-1.055
c49.35-66.65,72.055-153.25,55.835-282.282c0.066-0.735,0.208-1.456,0.267-2.19l-0.556-0.044
c-0.543-4.231-0.998-8.361-1.626-12.686l0.609-49.57h-29.025V19.283h88.012l-0.27,23.395h-28.09l-0.697,57.562
c13.766,10.382,61.239,43.124,73.756,111.08C466.223,292.74,452.174,377.105,348.721,453.993z"/>
<path class="st0" d="M394.196,177.63c2.241,11.958,6.563,36.408,6.563,67.065c-0.025,56.789-14.767,134.412-84.751,193.43
l4.143,4.908c71.901-60.611,87.06-140.551,87.035-198.338c0-31.247-4.406-56.155-6.676-68.245L394.196,177.63z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

41
icons/blueberry.svg Normal file
View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512.31 512.31" xml:space="preserve">
<g>
<g>
<path d="M412.955,249.91c0-1.6,0-3.2,0-4.8c0-12.8-1.6-24-4.8-35.2c36.8-49.6,56-110.4,51.2-169.6c0-8-6.4-14.4-14.4-14.4
c-68.8-9.6-139.2,11.2-193.6,56c-38.4-43.2-89.6-72-144-81.6c-8-1.6-16,3.2-19.2,9.6c-27.2,68.8-22.4,147.2,14.4,214.4
c-49.6,20.8-83.2,70.4-83.2,128c0,76.8,62.4,137.6,137.6,137.6c33.6,0,64-12.8,88-32c25.6,33.6,67.2,54.4,110.4,54.4
c76.8,0,137.6-62.4,137.6-137.6C492.955,318.71,459.355,270.71,412.955,249.91z M427.355,54.71c0,41.6-11.2,83.2-33.6,118.4
c-8-12.8-17.6-24-28.8-33.6l41.6-40c6.4-6.4,6.4-16,0-22.4c-6.4-6.4-16-6.4-22.4,0l-46.4,44.8c-19.2-9.6-40-16-62.4-16
c-1.6,0-3.2,0-3.2,0C315.355,70.71,371.355,51.51,427.355,54.71z M275.355,137.91c56,0,102.4,44.8,105.6,100.8
c-8-1.6-16-3.2-25.6-3.2c-32,0-64,11.2-88,32c-22.4-28.8-56-49.6-94.4-54.4C185.755,168.31,227.355,137.91,275.355,137.91z
M113.755,35.51c48,11.2,89.6,40,121.6,78.4c-16,4.8-32,12.8-44.8,24l-41.6-73.6c-3.2-8-12.8-9.6-20.8-6.4
c-8,4.8-11.2,14.4-6.4,22.4l44.8,78.4c-12.8,16-22.4,35.2-27.2,56c-1.6,0-3.2,0-6.4,0C100.955,158.71,94.555,93.11,113.755,35.51z
M156.955,456.31c-59.2,0-105.6-48-105.6-105.6c0-57.6,46.4-105.6,105.6-105.6s105.6,48,105.6,105.6
C262.555,408.31,214.555,456.31,156.955,456.31z M355.355,480.31c-35.2,0-68.8-17.6-88-46.4c17.6-22.4,27.2-51.2,27.2-83.2
c0-19.2-4.8-38.4-11.2-56c19.2-17.6,44.8-28.8,72-28.8c59.2,1.6,105.6,49.6,105.6,108.8
C460.955,433.91,412.955,480.31,355.355,480.31z"/>
</g>
</g>
<g>
<g>
<path d="M131.355,339.51l4.8-4.8c6.4-4.8,8-16,1.6-22.4c-4.8-6.4-16-8-22.4-1.6l-3.2,1.6l-1.6-3.2c-4.8-8-14.4-9.6-22.4-3.2
c-8,4.8-9.6,14.4-4.8,22.4l4.8,4.8l-4.8,4.8c-6.4,4.8-8,16-1.6,22.4c3.2,3.2,8,6.4,12.8,6.4c3.2,0,6.4-1.6,9.6-3.2l3.2-3.2
l1.6,3.2c3.2,4.8,8,6.4,12.8,6.4c3.2,0,6.4-1.6,9.6-3.2c8-4.8,9.6-14.4,3.2-22.4L131.355,339.51z"/>
</g>
</g>
<g>
<g>
<path d="M396.955,446.71c-1.6-8-9.6-14.4-19.2-12.8l-33.6,6.4c-9.6,1.6-16,11.2-12.8,19.2c1.6,8,8,12.8,16,12.8c1.6,0,1.6,0,3.2,0
l33.6-6.4C392.155,464.31,398.555,456.31,396.955,446.71z"/>
</g>
</g>
<g>
<g>
<path d="M288.155,160.31h-32c-9.6,0-16,6.4-16,16c0,9.6,6.4,16,16,16h32c9.6,0,16-6.4,16-16
C304.155,166.71,297.755,160.31,288.155,160.31z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

4
icons/cart.svg Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.29977 5H21L19 12H7.37671M20 16H8L6 3H3M9 20C9 20.5523 8.55228 21 8 21C7.44772 21 7 20.5523 7 20C7 19.4477 7.44772 19 8 19C8.55228 19 9 19.4477 9 20ZM20 20C20 20.5523 19.5523 21 19 21C18.4477 21 18 20.5523 18 20C18 19.4477 18.4477 19 19 19C19.5523 19 20 19.4477 20 20Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 594 B

26
icons/cash.svg Normal file
View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="800px" height="800px" viewBox="0 0 512 512" xml:space="preserve">
<style type="text/css">
<![CDATA[
.st0{fill:#000000;}
]]>
</style>
<g>
<path class="st0" d="M0,120v272h512V120H0z M32,313.813V198.156c22.969-3.875,40.844-22.703,43.188-46.156h132.938
c-30.016,20.375-50.313,59.25-50.313,104c0,44.734,20.281,83.625,50.297,104H75.188C72.844,336.547,54.969,317.688,32,313.813z
M287.969,238.156l-3.313,15.969h-54.516c-0.063,0.906-0.109,1.844-0.109,2.75c0,2.281,0.203,4.609,0.594,6.953h52.063
l-3.281,15.969h-42.563c7.75,12.063,20.969,19.359,35.469,19.359c4.906,0,9.859-0.891,14.656-2.672l3.844-1.438v22.469
l-2.109,0.563c-5.391,1.453-10.922,2.188-16.391,2.188c-26.094,0-49.563-16.188-59.016-40.469h-13.5v-15.969h9.578
c-0.297-2.453-0.438-4.719-0.438-6.953c0-0.906,0.031-1.844,0.063-2.75h-9.203v-15.969h12.047
c8.188-26.391,32.734-44.656,60.469-44.656c7.375,0,14.594,1.313,21.531,3.844l2.297,0.828l-4.313,21.141l-3.219-1.344
c-5.266-2.219-10.75-3.344-16.297-3.344c-16.031,0-30.75,9.297-37.844,23.531H287.969z M303.875,152h132.906
c2.344,23.453,20.25,42.281,43.219,46.156v115.656c-22.969,3.891-40.875,22.734-43.219,46.188H303.891
c30.016-20.375,50.297-59.266,50.297-104C354.188,211.25,333.906,172.375,303.875,152z"/>
<circle class="st0" cx="125.125" cy="256" r="13.75"/>
<circle class="st0" cx="386.875" cy="256" r="13.75"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

2
icons/cherry.svg Normal file
View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M261.056 449.6c13.824-69.696 34.88-128.96 63.36-177.728 23.744-40.832 61.12-88.64 112.256-143.872H320a32 32 0 0 1 0-64h384a32 32 0 1 1 0 64H554.752c14.912 39.168 41.344 86.592 79.552 141.76 47.36 68.48 84.8 106.752 106.304 114.304a224 224 0 1 1-84.992 14.784c-22.656-22.912-47.04-53.76-73.92-92.608-38.848-56.128-67.008-105.792-84.352-149.312-55.296 58.24-94.528 107.52-117.76 147.2-23.168 39.744-41.088 88.768-53.568 147.072a224.064 224.064 0 1 1-64.96-1.6zM288 832a160 160 0 1 0 0-320 160 160 0 0 0 0 320zm448-64a160 160 0 1 0 0-320 160 160 0 0 0 0 320z"/></svg>

After

Width:  |  Height:  |  Size: 801 B

6
icons/creditcard.svg Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
<title>credit-card</title>
<path d="M0 26.016q0 0.832 0.576 1.408t1.44 0.576h28q0.8 0 1.408-0.576t0.576-1.408v-20q0-0.832-0.576-1.408t-1.408-0.608h-28q-0.832 0-1.44 0.608t-0.576 1.408v20zM2.016 26.016v-14.016h28v14.016h-28zM2.016 8v-1.984h28v1.984h-28zM4 24h4v-1.984h-4v1.984zM4 20h6.016v-5.984h-6.016v5.984zM10.016 24h4v-1.984h-4v1.984zM16 24h4v-1.984h-4v1.984zM22.016 24h1.984v-1.984h-1.984v1.984zM26.016 24h1.984v-1.984h-1.984v1.984z"></path>
</svg>

After

Width:  |  Height:  |  Size: 696 B

4504
icons/fifty_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 443 KiB

12728
icons/five_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 864 KiB

4215
icons/fivehundred_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 396 KiB

2
icons/grape.svg Normal file
View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M544 195.2a160 160 0 0 1 96 60.8 160 160 0 1 1 146.24 254.976 160 160 0 0 1-128 224 160 160 0 1 1-292.48 0 160 160 0 0 1-128-224A160 160 0 1 1 384 256a160 160 0 0 1 96-60.8V128h-64a32 32 0 0 1 0-64h192a32 32 0 0 1 0 64h-64v67.2zM512 448a96 96 0 1 0 0-192 96 96 0 0 0 0 192zm-256 0a96 96 0 1 0 0-192 96 96 0 0 0 0 192zm128 224a96 96 0 1 0 0-192 96 96 0 0 0 0 192zm128 224a96 96 0 1 0 0-192 96 96 0 0 0 0 192zm128-224a96 96 0 1 0 0-192 96 96 0 0 0 0 192zm128-224a96 96 0 1 0 0-192 96 96 0 0 0 0 192z"/></svg>

After

Width:  |  Height:  |  Size: 743 B

4953
icons/hundred_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.4 MiB

65
icons/kiwi.svg Normal file
View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 326.581 326.581" xml:space="preserve">
<g>
<g>
<path d="M271.89,67.003c-25.603-15.427-60.453-24.637-93.224-24.637h-57.74C54.247,42.367,0,96.613,0,163.29
c0,66.677,54.246,120.922,120.924,120.924l0,0h57.742c32.77,0,67.62-9.21,93.224-24.637
c35.779-21.558,54.691-54.853,54.691-96.287S307.669,88.561,271.89,67.003z M15,163.29c0-58.406,47.519-105.924,105.926-105.924
c58.406,0,105.923,47.518,105.923,105.924c0,58.406-47.517,105.924-105.923,105.924C62.519,269.214,15,221.697,15,163.29z
M179.21,269.21c37.311-20.613,62.639-60.361,62.639-105.92S216.52,77.984,179.21,57.371
c46.109,0.172,132.371,22.461,132.371,105.92S225.319,269.039,179.21,269.21z"/>
<g>
<path d="M120.926,206.074c-23.591,0-42.783-19.192-42.783-42.783s19.192-42.783,42.783-42.783
c23.59,0,42.782,19.192,42.782,42.783S144.516,206.074,120.926,206.074z M120.926,135.507c-15.319,0-27.783,12.464-27.783,27.783
s12.464,27.783,27.783,27.783c15.319,0,27.782-12.464,27.782-27.783S136.245,135.507,120.926,135.507z"/>
</g>
<g>
<g>
<path d="M120.926,112.687c-4.142,0-7.5-3.357-7.5-7.5V92.554c0-4.143,3.358-7.5,7.5-7.5c4.143,0,7.5,3.357,7.5,7.5v12.633
C128.426,109.33,125.068,112.687,120.926,112.687z"/>
</g>
<g>
<path d="M120.926,241.528c-4.142,0-7.5-3.357-7.5-7.5v-12.633c0-4.143,3.358-7.5,7.5-7.5c4.143,0,7.5,3.357,7.5,7.5v12.633
C128.426,238.17,125.068,241.528,120.926,241.528z"/>
</g>
</g>
<g>
<g>
<path d="M62.82,170.79H50.188c-4.143,0-7.5-3.357-7.5-7.5c0-4.143,3.357-7.5,7.5-7.5H62.82c4.143,0,7.5,3.357,7.5,7.5
C70.32,167.433,66.963,170.79,62.82,170.79z"/>
</g>
<g>
<path d="M191.661,170.79h-12.633c-4.143,0-7.5-3.357-7.5-7.5c0-4.143,3.357-7.5,7.5-7.5h12.633c4.143,0,7.5,3.357,7.5,7.5
C199.161,167.433,195.804,170.79,191.661,170.79z"/>
</g>
</g>
<g>
<g>
<path d="M70.906,220.809c-1.919,0-3.839-0.732-5.303-2.196c-2.93-2.929-2.93-7.678-0.001-10.606l8.932-8.933
c2.93-2.93,7.679-2.929,10.606-0.001c2.93,2.929,2.93,7.678,0.001,10.607l-8.932,8.933
C74.745,220.077,72.825,220.809,70.906,220.809z"/>
</g>
<g>
<path d="M162.011,129.706c-1.919,0-3.839-0.732-5.303-2.196c-2.93-2.929-2.93-7.678-0.001-10.606l8.933-8.934
c2.93-2.93,7.679-2.929,10.606-0.001c2.93,2.929,2.93,7.678,0.001,10.606l-8.933,8.934
C165.85,128.974,163.93,129.706,162.011,129.706z"/>
</g>
</g>
<g>
<g>
<path d="M79.838,129.705c-1.919,0-3.839-0.732-5.304-2.196l-8.932-8.932c-2.929-2.93-2.929-7.678,0-10.607
c2.93-2.928,7.678-2.928,10.607,0l8.932,8.932c2.929,2.93,2.929,7.678,0,10.607C83.677,128.972,81.757,129.705,79.838,129.705z"
/>
</g>
<g>
<path d="M170.943,220.809c-1.92,0-3.839-0.732-5.304-2.197l-8.933-8.934c-2.929-2.929-2.929-7.678,0.001-10.607
c2.929-2.929,7.678-2.928,10.606,0.001l8.933,8.934c2.929,2.929,2.929,7.678-0.001,10.606
C174.782,220.077,172.862,220.809,170.943,220.809z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

35
icons/lemon.svg Normal file
View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<style type="text/css">
.st0{fill:#000000;}
</style>
<g>
<path class="st0" d="M502.742,172.999c6.548-18.315,20.17-56.424-7.02-93.426c-15.735-21.398-39.013-32.254-69.197-32.254
c-5.597,0-10.806,0.346-14.987,0.624l-1.824,0.118C377.878,29.266,334.548,18.63,288.938,18.63
c-62.008,0-121.782,18.838-168.313,53.044C30.44,137.991-5.738,257.512,10.515,335.055c-0.413,1.183-0.866,2.45-1.258,3.549
c-6.547,18.314-20.174,56.432,7.033,93.442c15.73,21.39,39.004,32.229,69.185,32.229c5.588,0,10.787-0.338,14.965-0.608l1.83-0.119
c32.157,19.042,75.739,29.822,121.464,29.822c61.244,0,120.374-18.687,166.504-52.606
c90.862-66.789,127.476-186.64,111.247-264.209C501.898,175.364,502.35,174.097,502.742,172.999z M457.786,179.698
c16.41,61.214-15.206,168.908-93.172,226.219c-42.286,31.097-93.797,44.2-140.882,44.2c-41.974,0-80.424-10.416-105.684-27.778
c-2.564-1.766-6.331-2.272-10.86-2.272c-6.21,0-13.846,0.955-21.715,0.955c-12.377,0-25.348-2.365-34.333-14.59
c-21.069-28.664,7.13-59.33,3.071-74.52c-16.414-61.214,14.074-168.063,92.032-225.391c42.641-31.35,94.988-44.638,142.694-44.638
c41.779,0,79.994,10.188,105.016,27.388c2.56,1.757,6.319,2.264,10.839,2.264c6.213,0,13.85-0.963,21.732-0.963
c12.376,0,25.352,2.382,34.34,14.614C481.923,133.843,453.719,164.509,457.786,179.698z"/>
<path class="st0" d="M227.082,328.137c-9.956,0-18.024,8.068-18.024,18.02c0,9.952,8.068,18.028,18.024,18.028
c9.952,0,18.02-8.076,18.02-18.028C245.102,336.204,237.034,328.137,227.082,328.137z"/>
<path class="st0" d="M364.771,218.567c-9.956,0-18.024,8.068-18.024,18.019s8.068,18.028,18.024,18.028
c9.952,0,18.02-8.076,18.02-18.028S374.723,218.567,364.771,218.567z"/>
<path class="st0" d="M347.47,156.577c9.952,0,18.019-8.076,18.019-18.028c0-9.952-8.068-18.02-18.019-18.02
c-9.956,0-18.024,8.068-18.024,18.02C329.446,148.5,337.514,156.577,347.47,156.577z"/>
<path class="st0" d="M135.532,305.801c-9.956,0-18.024,8.068-18.024,18.02c0,9.952,8.068,18.028,18.024,18.028
c9.952,0,18.019-8.076,18.019-18.028C153.552,313.868,145.484,305.801,135.532,305.801z"/>
<path class="st0" d="M342.426,328.145c-9.956,0-18.024,8.068-18.024,18.019c0,9.952,8.068,18.028,18.024,18.028
c9.952,0,18.019-8.076,18.019-18.028C360.446,336.213,352.378,328.145,342.426,328.145z"/>
<path class="st0" d="M244.384,207.027c-9.956,0-18.024,8.068-18.024,18.02s8.068,18.028,18.024,18.028
c9.952,0,18.019-8.076,18.019-18.028S254.336,207.027,244.384,207.027z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

25
icons/melon.svg Normal file
View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<style type="text/css">
.st0{fill:#000000;}
</style>
<g>
<path class="st0" d="M492.632,128.003h-19.353h-15.603h-19.353H73.691H54.324H38.721H19.368H0
c-0.015,70.637,28.685,134.754,74.98,181.013c46.266,46.302,110.39,74.995,181.02,74.98c70.644,0.014,134.754-28.678,181.02-74.98
C483.315,262.758,512,198.64,512,128.003H492.632z M436.463,153.817c-5.67,40.025-24.276,75.83-51.54,103.102
c-33.022,33.007-78.54,53.393-128.923,53.4c-50.368-0.007-95.886-20.393-128.909-53.4c-27.264-27.272-45.885-63.077-51.554-103.102
H436.463z M409.638,281.642c-39.38,39.343-93.572,63.619-153.638,63.634c-60.052-0.015-114.258-24.29-153.638-63.634
c-33.623-33.652-56.17-78.131-62.059-127.825h15.72C68.71,253.001,153.374,329.673,256,329.681
c102.64-0.007,187.29-76.68,199.977-175.863h15.72C465.822,203.511,443.26,247.99,409.638,281.642z"/>
<path class="st0" d="M256,259.864c6.71,0,13.712-6.453,12.145-19.397c-1.626-13.31-7.457-19.324-12.145-19.324
c-4.688,0-10.519,6.014-12.13,19.324C242.287,253.411,249.305,259.864,256,259.864z"/>
<path class="st0" d="M153.374,223.597c6.065,2.856,15.163,0.014,19.266-12.358c4.219-12.73,1.509-20.657-2.725-22.664
c-4.248-2-12.086,0.953-19.236,12.292C143.734,211.907,147.309,220.733,153.374,223.597z"/>
<path class="st0" d="M358.64,223.597c6.065-2.864,9.64-11.691,2.681-22.73c-7.135-11.339-14.988-14.292-19.221-12.292
c-4.234,2.007-6.944,9.934-2.725,22.664C343.477,223.612,352.56,226.454,358.64,223.597z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

109
icons/one_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

4
icons/orange.svg Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.0267 7.23101C10.9367 7.79959 10.924 8.39299 10.9999 9C12.9701 9.24627 14.7969 8.55968 16.097 7.3236C17.8557 8.59516 19 10.6639 19 13C19 16.866 15.866 20 12 20C8.13401 20 5 16.866 5 13C5 9.47355 7.60766 6.55616 10.9999 6.0709V7C10.9999 7.07951 11.0092 7.15686 11.0267 7.23101ZM21 13C21 10.0157 19.5475 7.37069 17.3109 5.73328C17.898 4.63937 18.1691 3.35351 17.9999 2C16.0783 1.7598 14.2931 2.40702 12.9999 3.58597V3C12.9999 2.44771 12.5522 2 11.9999 2C11.4476 2 10.9999 2.44771 10.9999 3V4.05493C6.5 4.55242 3 8.36747 3 13C3 17.9706 7.02944 22 12 22C16.9706 22 21 17.9706 21 13ZM8 12C8.55228 12 9 11.5523 9 11C9 10.4477 8.55228 10 8 10C7.44772 10 7 10.4477 7 11C7 11.5523 7.44772 12 8 12Z" fill="#000000"/>
</svg>

After

Width:  |  Height:  |  Size: 989 B

43
icons/paycard.svg Normal file
View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 496 496" xml:space="preserve">
<g>
<g>
<g>
<path d="M32,256h208V144H32V256z M48,160h176v80H48V160z"/>
<path d="M48,328h48v-48H48V328z M64,296h16v16H64V296z"/>
<path d="M112,328h48v-48h-48V328z M128,296h16v16h-16V296z"/>
<path d="M176,328h48v-48h-48V328z M192,296h16v16h-16V296z"/>
<path d="M48,392h48v-48H48V392z M64,360h16v16H64V360z"/>
<path d="M112,392h48v-48h-48V392z M128,360h16v16h-16V360z"/>
<path d="M176,392h48v-48h-48V392z M192,360h16v16h-16V360z"/>
<path d="M48,456h48v-48H48V456z M64,424h16v16H64V424z"/>
<path d="M112,456h48v-48h-48V456z M128,424h16v16h-16V424z"/>
<path d="M176,456h48v-48h-48V456z M192,424h16v16h-16V424z"/>
<rect x="192" y="208" width="16" height="16"/>
<rect x="128" y="208" width="48" height="16"/>
<rect x="80" y="48" width="112" height="16"/>
<rect x="176" y="80" width="16" height="16"/>
<path d="M400,148.248V112c0-13.232-10.768-24-24-24H272v-8c0-17.648-14.352-32-32-32h-16V0H48v48H32C14.352,48,0,62.352,0,80
l0.04,248.8l13.832,138.392C15.512,483.608,29.208,496,45.72,496h180.56c16.504,0,30.2-12.392,31.84-28.816L269.608,352h44.68
C312.8,360.76,312,369.624,312,378.504c0,31.352,9.192,61.712,26.584,87.8l5.416,8.12V496h16v-26.424l-8.104-12.16
C336.264,433.976,328,406.68,328,378.504c0-11.616,1.432-23.224,4.24-34.512l11.512-46.048L344,225.496
c0-9.656,7.84-17.496,17.488-17.496c8.808,0,16.264,6.584,17.36,15.32L392.936,336h22.224l9.088-81.8L400,213.784v-44.696
l80,66.664v75.216L440.264,461.96L440,496h16v-30.968l39.736-150.992L496,228.248L400,148.248z M64,16h16v16h16V16h16v16h16V16
h16v16h16V16h16v16h16V16h16v96H64V16z M242.2,465.592c-0.816,8.216-7.664,14.408-15.92,14.408H45.72
c-8.256,0-15.104-6.192-15.92-14.408L16,328V80c0-8.816,7.176-16,16-16h16v48H32v16h208v-16h-16V64h16c8.816,0,16,7.184,16,16
l0.04,247.2L242.2,465.592z M384,200.824c-5.992-5.464-13.888-8.824-22.512-8.824C343.024,192,328,207.024,328,225.496v69.52
L317.744,336H271.2l0.8-8V152v-48h104c4.416,0,8,3.584,8,8V200.824z M407.752,257.8l-3.984,35.848L400,263.536v-18.648
L407.752,257.8z"/>
<path d="M304,184c5.64,0,11.152-1.52,16-4.368c4.848,2.848,10.36,4.368,16,4.368c17.648,0,32-14.352,32-32s-14.352-32-32-32
c-5.64,0-11.152,1.52-16,4.368c-4.848-2.848-10.36-4.368-16-4.368c-17.648,0-32,14.352-32,32S286.352,184,304,184z M304,136
c3.88,0,7.656,1.48,10.648,4.168l5.352,4.824l5.352-4.824C328.344,137.48,332.12,136,336,136c8.816,0,16,7.176,16,16
c0,8.824-7.184,16-16,16c-3.88,0-7.656-1.48-10.648-4.168L320,159.008l-5.352,4.824C311.656,166.52,307.88,168,304,168
c-8.824,0-16-7.176-16-16C288,143.176,295.176,136,304,136z"/>
<rect x="288" y="200" width="16" height="88"/>
<rect x="288" y="304" width="16" height="16"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3 KiB

9
icons/peach.svg Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Peach</title>
<g id="Peach" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<path d="M11.7340035,20.4207539 C7.23300418,19.3867875 4.76089511,17.2206549 4.31767628,13.9223567 C3.94435925,11.1442461 5.2127244,8.40423045 7.96251924,7.67507001 C9.42725639,7.28670614 10.9137402,7.56339882 12.0945732,8.31809274 C13.2742303,7.56322315 14.7602916,7.28677662 16.224625,7.67498491 C18.974397,8.40423045 20.3438255,11.1519293 19.8694451,13.9223567 C19.289815,17.3074522 16.6978536,19.5000102 12.0935607,20.5000306 L12.0935607,20.5000306 Z M14.275622,11.2819506 C13.5387897,8.56082108 10.7123324,6.94597803 7.9625007,7.67500081 M12,8 C12,6.20842913 13.1464165,4.61786116 14.8460499,4.0513167 L15,4 M12,8 L12,5.45941171 C12,4.02936865 10.990621,2.7981242 9.58834841,2.51766968 L7,2 L7,2.54058829 C7,3.97063135 8.009379,5.2018758 9.41165159,5.48233032 L12,6" id="Combined-Shape" stroke="#000000">
</path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

24
icons/pear.svg Normal file
View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<style type="text/css">
.st0{fill:#000000;}
</style>
<g>
<path class="st0" d="M350.846,185.63c0-47.624-35.146-86.931-80.897-93.693c2.039-7.118,4.488-14.207,7.55-20.886
c4.974-10.886,11.402-20.628,19.438-27.92c3.966-3.602,4.261-9.742,0.652-13.707c-3.6-3.964-9.742-4.26-13.706-0.651
c-10.553,9.605-18.262,21.606-24.032,34.197c-4.215,9.226-7.384,18.786-9.818,28.134c-49.586,3.093-88.886,44.166-88.886,94.527
c0,81.541-70.109,87.659-70.109,174.992C91.038,451.731,164.892,512,256,512c91.108,0,164.962-60.269,164.962-151.377
C420.962,273.29,350.846,267.172,350.846,185.63z M256,480.948c-77.592,0-133.911-50.604-133.911-120.326
c0-33.796,12.994-50.572,29.452-71.815c18.112-23.387,40.658-52.483,40.658-103.177c0-31.074,22.356-56.994,51.831-62.611
c-1.842,15.002-2.054,26.738-2.054,31.12c0,1.152,0.015,1.804,0.015,1.872c0.121,5.36,4.564,9.605,9.924,9.484
c5.36-0.122,9.605-4.564,9.484-9.924l-0.008-0.318l-0.007-1.114c-0.008-4.071,0.22-16.406,2.289-31.78
c31.567,3.806,56.122,30.703,56.122,63.271c0,50.694,22.546,79.79,40.665,103.177c16.45,21.243,29.452,38.019,29.452,71.815
C389.911,430.345,333.591,480.948,256,480.948z"/>
<path class="st0" d="M244.303,71.203c0,0,9.241-28.853-15.041-52.643c-25.51-24.972-56.6-17.519-56.6-17.519
s-6.807,31.241,18.688,56.221C215.639,81.044,244.303,71.203,244.303,71.203z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

57
icons/pineapple.svg Normal file
View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 59.061 59.061" xml:space="preserve">
<g>
<path d="M45.193,15.034l1.188-0.285l-0.513-1.108c-0.747-1.613-3.4-4.428-8.09-3.563c-0.339,0.063-0.666,0.155-0.986,0.266
c1.825-3,5.66-5.323,8.418-6.035l1.892-0.488L45.6,2.572c-0.149-0.124-3.694-3.034-8.188-2.509
c-3.648,0.422-6.402,1.981-8.218,4.621c-1.33-0.806-3.009-1.389-5.127-1.617c-4.225-0.452-7.578,2.095-7.719,2.203l-1.651,1.277
l2.03,0.487c3.042,0.729,7.215,3.243,8.477,6.32c-0.334-0.108-0.682-0.206-1.061-0.276c-5.998-1.11-7.101,2.556-7.145,2.712
l-0.282,1.001l1.012,0.243c2.756,0.661,4.057,1.753,4.672,2.625c-3.981,0.848-6.68,2.613-8.309,5.389
c-2.131,3.63-2.13,8.567-2.13,13.793v0.22c0,11.028,7.602,20,16.945,20h0.456c9.343,0,16.944-8.972,16.944-20v-0.22
c0-3.308-0.003-6.497-0.543-9.315l0.031-0.02l-0.054-0.081c-0.314-1.595-0.797-3.073-1.563-4.377
c-1.479-2.52-3.841-4.207-7.241-5.131C38.386,18.315,41.398,15.944,45.193,15.034z M37.642,2.05
c1.993-0.228,3.804,0.408,5.036,1.034c-3.563,1.541-7.815,4.823-8.747,8.995c-0.015,0.013-0.028,0.027-0.042,0.04
c-0.004-0.021-0.009-0.042-0.013-0.063c-0.024-0.134-0.054-0.271-0.082-0.408c-0.028-0.135-0.054-0.269-0.086-0.405
c-0.04-0.168-0.087-0.337-0.134-0.507c-0.028-0.101-0.055-0.201-0.086-0.303c-0.062-0.203-0.132-0.406-0.205-0.609
c-0.023-0.062-0.044-0.124-0.068-0.186c-0.09-0.237-0.19-0.471-0.297-0.705c-0.01-0.022-0.02-0.043-0.03-0.065
c-0.493-1.06-1.174-2.081-2.112-2.97C32.26,3.7,34.565,2.405,37.642,2.05z M19.4,5.822c1.14-0.499,2.718-0.951,4.453-0.767
C26.12,5.299,27.78,6.029,29,7.032c0.223,0.184,0.433,0.375,0.626,0.576c0.041,0.042,0.087,0.082,0.127,0.125
c0.239,0.261,0.454,0.535,0.649,0.817c0.026,0.037,0.049,0.075,0.074,0.112c0.188,0.283,0.359,0.573,0.508,0.87
c0.003,0.005,0.005,0.01,0.008,0.015c0.322,0.645,0.557,1.316,0.727,1.982c0.003,0.01,0.005,0.02,0.008,0.03
c0.165,0.654,0.266,1.301,0.325,1.914c0.005,0.054,0.008,0.108,0.013,0.162c0.013,0.153,0.02,0.298,0.028,0.446
c-0.043,0.056-0.09,0.112-0.132,0.168c-0.113,0.119-0.201,0.248-0.262,0.359c-0.048,0.068-0.088,0.135-0.134,0.203
c-0.148,0.215-0.289,0.428-0.424,0.641c-0.046,0.074-0.091,0.146-0.136,0.219c-0.156,0.253-0.302,0.501-0.44,0.746
c-0.019,0.033-0.038,0.066-0.056,0.099c-0.32,0.575-0.59,1.113-0.807,1.58c-0.319-1.169-0.967-2.449-2.132-3.446
C27.238,10.724,23.178,7.405,19.4,5.822z M24.513,19.312c-0.577-1.222-1.894-2.79-4.886-3.811c0.66-0.468,1.896-0.875,4.15-0.457
c1.018,0.189,1.772,0.573,2.355,1.037c0.138,0.11,0.267,0.224,0.385,0.343c0.064,0.065,0.127,0.129,0.186,0.196
c0.129,0.149,0.249,0.301,0.353,0.456c0.025,0.037,0.051,0.073,0.074,0.11c0.418,0.665,0.624,1.351,0.726,1.887
c-0.037,0.001-0.071,0.004-0.108,0.005c-1.147,0.03-2.22,0.108-3.227,0.231C24.518,19.311,24.515,19.312,24.513,19.312z
M42.45,26.06c0.012,0.021,0.02,0.044,0.032,0.065l-3.229,3.229l1.414,1.414l2.138-2.137l1.06,1.591
c0.253,1.451,0.36,3.039,0.405,4.736l-1.31-1.31l-3.707,3.707l1.414,1.414l2.293-2.293l1.293,1.293l0.05-0.05
c0.001,0.373,0.002,0.742,0.002,1.122v0.22c0,1.168-0.1,2.308-0.278,3.415l-1.264-0.632l-3.51,3.51l1.414,1.414l2.49-2.49
l0.446,0.223c-1.919,7.274-7.577,12.56-14.243,12.56h-0.456c-6.601,0-12.207-5.187-14.18-12.351l0.235-0.235l2.293,2.293
l1.414-1.414l-3.707-3.707l-0.734,0.734c-0.168-1.078-0.266-2.185-0.266-3.32v-0.22c0-0.464,0.001-0.916,0.002-1.368l0.998-0.998
l2.293,2.293l1.414-1.414l-3.707-3.707l-0.951,0.951c0.07-2.167,0.249-4.157,0.725-5.897l0.226-0.226l2.293,2.293l1.414-1.414
l-2.998-2.998c0.052-0.096,0.09-0.202,0.146-0.296c1.177-2.006,3.108-3.376,5.902-4.169l-3.463,3.463l1.414,1.414l2.293-2.293
l2.293,2.293l1.414-1.414l-3.569-3.569c0.535-0.138,1.103-0.253,1.699-0.351l0.213-0.033c1.458-0.225,3.104-0.339,4.95-0.339h0.4
c0.216,0,0.422,0.006,0.633,0.009l0.021,0.002c1.871,0.029,3.557,0.185,5.012,0.463l0.363,0.07c0.169,0.036,0.338,0.071,0.502,0.11
l-3.639,3.639l1.414,1.414l2.293-2.293l2.293,2.293l1.414-1.414l-3.596-3.596C39.128,22.526,41.206,23.941,42.45,26.06z
M31.438,19.117c-0.001,0-0.002,0-0.003,0c0.114-0.251,0.249-0.532,0.399-0.83c0.018-0.036,0.036-0.071,0.054-0.108
c0.06-0.118,0.125-0.241,0.19-0.364c0.073-0.136,0.148-0.274,0.227-0.415c0.033-0.06,0.065-0.118,0.099-0.178
c0.137-0.238,0.282-0.481,0.438-0.727c0.003-0.005,0.006-0.009,0.009-0.014c0.161-0.254,0.332-0.511,0.513-0.766l0.595-0.776
c0.473-0.582,0.982-1.104,1.517-1.546l0.285-0.235l0.002-0.011c0.722-0.54,1.516-0.94,2.377-1.1
c2.733-0.508,4.357,0.564,5.191,1.445c-4.115,1.383-7.318,4.218-8.595,5.959C33.718,19.284,32.615,19.176,31.438,19.117z"/>
<polygon points="21.96,45.647 18.253,49.354 19.667,50.768 21.96,48.475 24.253,50.768 25.667,49.354 "/>
<polygon points="25.253,54.354 26.667,55.768 28.96,53.475 31.253,55.768 32.667,54.354 28.96,50.647 "/>
<polygon points="32.253,49.354 33.667,50.768 35.96,48.475 38.253,50.768 39.667,49.354 35.96,45.647 "/>
<polygon points="21.96,40.475 24.253,42.768 25.667,41.354 21.96,37.647 18.253,41.354 19.667,42.768 "/>
<polygon points="25.253,45.354 26.667,46.768 28.96,44.475 31.253,46.768 32.667,45.354 28.96,41.647 "/>
<polygon points="32.253,41.354 33.667,42.768 35.96,40.475 38.253,42.768 39.667,41.354 35.96,37.647 "/>
<polygon points="21.96,32.475 24.253,34.768 25.667,33.354 21.96,29.647 18.253,33.354 19.667,34.768 "/>
<polygon points="28.96,33.647 25.253,37.354 26.667,38.768 28.96,36.475 31.253,38.768 32.667,37.354 "/>
<polygon points="32.253,33.354 33.667,34.768 35.96,32.475 38.253,34.768 39.667,33.354 35.96,29.647 "/>
<polygon points="28.96,28.475 31.253,30.768 32.667,29.354 28.96,25.647 25.253,29.354 26.667,30.768 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

23
icons/raspberry.svg Normal file
View file

@ -0,0 +1,23 @@
<?xml version="1.0" ?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 32 32" id="Camada_1" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<g>
<path d="M13.8,6.4c-1.4-1.1-2.9-1.9-4.6-2.5c1.5,0.9,3,1.7,4.2,2.9c-0.1,1.1-1.5,1.8-3.1,1.7c-0.1-0.1,0.1-0.1,0.1-0.3 C10,8.1,9.5,8.2,9.2,8c0-0.1,0.2-0.1,0.1-0.2C9,7.6,8.6,7.5,8.3,7.3c0-0.1,0.2-0.1,0.3-0.2c-0.3-0.2-0.7-0.3-1-0.6 c0.1-0.1,0.2,0,0.3-0.2C7.6,6.1,7.3,5.9,7.1,5.6c0.1-0.1,0.2,0,0.3-0.1C7.3,5.2,6.9,5,6.8,4.7c0.2,0,0.3,0.1,0.5-0.1 C7.1,4.3,6.7,4.2,6.6,3.8c0.1-0.1,0.3,0,0.4-0.1c0-0.3-0.2-0.5-0.3-0.8c0.3-0.1,0.7,0,1-0.1c0-0.1-0.1-0.2-0.1-0.3 c0.4-0.2,0.8,0,1.2,0.1c0.1-0.2-0.1-0.2,0-0.4c0.3,0,0.6,0.2,1,0.2C9.9,2.2,9.6,2.2,9.6,2c0.4,0,0.7,0.2,1,0.4 c0.1-0.1,0-0.2,0.1-0.4c0.3,0.1,0.5,0.3,0.8,0.5c0.2,0,0.1-0.2,0.2-0.3c0.3,0.1,0.5,0.4,0.7,0.5c0.2,0,0.1-0.2,0.2-0.3 c0.3,0.2,0.5,0.5,0.7,0.7c0.2,0,0.1-0.2,0.3-0.2c0.6,0.7,1.2,1.5,1.1,2.5C14.7,5.9,14.3,6.2,13.8,6.4L13.8,6.4z"/>
<path d="M23.5,7.1c0.1,0.1,0.2,0.1,0.3,0.1c-0.3,0.3-0.7,0.3-1.1,0.5c0,0.1,0.1,0.1,0.1,0.2c-0.3,0.2-0.8,0.1-1.1,0.2 c-0.1,0.1,0.1,0.2,0,0.3c-0.4,0.1-0.8,0-1.3-0.1c-0.9-0.2-1.6-0.6-1.9-1.5c1.2-1.3,2.7-2.1,4.2-2.9c-1.7,0.6-3.2,1.4-4.6,2.4 c-0.6-0.2-0.9-0.7-0.9-1.3c0-0.7,0.6-1.8,1.2-2.3l0.2,0.3c0.3-0.2,0.5-0.6,0.8-0.7c0.1,0.1,0,0.3,0.2,0.3c0.2-0.1,0.4-0.4,0.7-0.5 c0.1,0.1,0,0.2,0.2,0.3C20.8,2.4,21,2.1,21.4,2c0,0.1-0.1,0.2,0,0.4C21.7,2.2,22,2,22.4,2c0,0.1-0.2,0.2-0.1,0.4 c0.3,0,0.6-0.2,1-0.2c0,0.1-0.1,0.2,0,0.4c0.4-0.1,0.8-0.2,1.2-0.1c0,0.1-0.1,0.2-0.1,0.3c0.3,0.1,0.7,0,1,0.1 C25.3,3.2,25,3.4,25,3.7c0.1,0.1,0.3,0,0.4,0.1c-0.1,0.4-0.5,0.5-0.6,0.8c0.1,0.2,0.3,0,0.4,0.1c-0.1,0.3-0.5,0.5-0.7,0.8 c0.1,0.2,0.2,0.1,0.3,0.1c-0.2,0.3-0.5,0.4-0.7,0.7c0.1,0.1,0.2,0.1,0.3,0.2C24.2,6.8,23.8,6.9,23.5,7.1L23.5,7.1z"/>
</g>
<g>
<path d="M15.4,16c0,1.8-1.4,3.6-3.2,4c-1.8,0.4-3.4-0.9-3.5-2.7c-0.1-1.8,1.2-3.6,2.9-4C13.7,12.7,15.4,14,15.4,16z"/>
<path d="M23.4,16.9c0,2.1-1.8,3.4-3.8,2.8c-1.8-0.6-3.1-2.5-2.8-4.4c0.3-1.8,2.1-2.9,3.9-2.2C22.3,13.7,23.4,15.3,23.4,16.9 L23.4,16.9z"/>
<path d="M16.1,19.4c1,0,2,0.4,2.7,1.2c1.2,1.3,1.1,3.2-0.2,4.3c-1.3,1.1-3.4,1.2-4.7,0.1c-1-0.8-1.4-1.8-1.2-3.1 c0.3-1.3,1.2-2,2.4-2.4C15.4,19.5,15.7,19.4,16.1,19.4L16.1,19.4z"/>
<path d="M19.8,25.3c0.1-1,0.5-2,1.3-2.9c0.5-0.5,1-1,1.5-1.4c0.3-0.2,0.6-0.3,0.9-0.4c0.6-0.1,1.1,0.1,1.3,0.7c0.4,1,0.5,2,0,3 c-0.6,1.4-1.7,2.3-3.2,2.6c-0.1,0-0.3,0-0.5,0C20.2,27,19.8,26.6,19.8,25.3z"/>
<path d="M6.9,22.7c0,0,0-0.2,0-0.3c0.1-1.1,0.7-1.5,1.8-1.2c1.7,0.5,3.3,2.5,3.4,4.3c0,1.1-0.5,1.6-1.6,1.4 c-1.5-0.2-2.5-1-3.1-2.3C7,24,6.9,23.4,6.9,22.7L6.9,22.7z"/>
<path d="M16.2,12.8c-0.8,0-1.6-0.1-2.3-0.5c-1.3-0.7-1.3-1.6-0.2-2.4c1.5-1.1,3.5-1,4.9,0.2c0.1,0.1,0.2,0.2,0.3,0.3 c0.5,0.6,0.4,1.2-0.2,1.7c-0.5,0.4-1.1,0.5-1.7,0.6C16.7,12.8,16.4,12.8,16.2,12.8L16.2,12.8z"/>
<path d="M16,30c-1.2,0-2.2-0.5-3.1-1.4c-0.4-0.4-0.4-0.8,0.1-1.1c0.7-0.4,1.4-0.6,2.2-0.7c1-0.1,2-0.1,3,0.2 c0.2,0.1,0.5,0.2,0.7,0.3c0.6,0.3,0.7,0.6,0.2,1.2c0,0,0,0-0.1,0.1C18.3,29.5,17.3,30,16,30z"/>
<path d="M7.8,16.8c0,1.1-0.2,2.1-0.6,3.1c-0.1,0.3-0.2,0.5-0.4,0.7C6.5,21,6.3,21,6,20.7c-1.4-1.4-1.2-4.1,0.5-5.3 c0.6-0.5,1-0.4,1.2,0.4C7.7,16.1,7.8,16.5,7.8,16.8L7.8,16.8z"/>
<path d="M26.9,18.3c0,0.8-0.3,1.7-0.9,2.4c-0.3,0.3-0.5,0.3-0.8,0c-0.3-0.4-0.5-0.9-0.6-1.4c-0.3-1-0.4-2.1-0.3-3.2 c0-0.2,0.1-0.5,0.2-0.7c0.2-0.4,0.4-0.5,0.8-0.2C26.3,15.8,26.9,16.9,26.9,18.3z"/>
<path d="M7.5,13.9c-0.1-1.3,0.3-2.5,1.4-3.3c1.1-0.8,2.3-1,3.6-0.8c0,0.3-0.2,0.5-0.3,0.7c-0.7,0.9-1.6,1.6-2.4,2.3 c-0.5,0.4-1,0.7-1.5,1C7.9,13.9,7.7,14.1,7.5,13.9z"/>
<path d="M24.6,14c-0.2,0.1-0.5,0-0.7-0.2c-0.7-0.4-1.4-0.9-2-1.4c-0.7-0.6-1.3-1.2-1.9-1.8c-0.1-0.2-0.3-0.4-0.3-0.6 c0.6-0.3,2.6-0.2,3.6,0.7C24.3,11.5,24.9,13.1,24.6,14z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

20
icons/shop.svg Normal file
View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<style type="text/css">
.st0{fill:#000000;}
</style>
<g>
<path class="st0" d="M33.394,458.311h242.247V318.635h116.323v139.676h86.642V222.61H33.394V458.311z M120.69,318.635h69.838
v69.838H120.69V318.635z"/>
<path class="st0" d="M310.836,368.565c-5.877,0-10.64,4.77-10.64,10.644v35.46c0,5.873,4.764,10.636,10.64,10.636
c5.874,0,10.637-4.763,10.637-10.636v-35.46C321.473,373.335,316.71,368.565,310.836,368.565z"/>
<polygon class="st0" points="230.104,53.689 158.593,53.689 143.977,196.421 226.22,196.421 "/>
<polygon class="st0" points="368.026,196.421 353.408,53.689 281.896,53.689 285.781,196.421 "/>
<polygon class="st0" points="512,196.421 478.606,53.689 405.207,53.689 427.591,196.421 "/>
<polygon class="st0" points="106.794,53.689 33.394,53.689 0,196.421 84.409,196.421 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

4
icons/strawberry.svg Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.4598 4.6821C11.999 4.10603 10.1634 4.03624 8.44724 4.89439C6.74737 5.74439 5.63985 7.23414 4.94838 9.30462C4.24917 11.3983 3.99976 14.0213 3.99976 16.9999C3.99976 17.6747 4.34721 18.4332 4.95687 19.0428C5.56652 19.6525 6.32499 20 6.99976 20C9.8827 20 12.505 19.7575 14.6233 19.06C16.7233 18.3687 18.253 17.258 19.1056 15.5528C19.9679 13.8281 19.9189 11.9841 19.3567 10.5262C19.108 9.88118 18.7767 9.34894 18.4078 8.94001L18.9806 11.8039C19.0889 12.3454 18.7377 12.8723 18.1961 12.9806C17.6546 13.0889 17.1277 12.7377 17.0194 12.1961L16.6363 10.2806L15.9138 11.9061C15.6895 12.4108 15.0985 12.6381 14.5939 12.4138C14.0892 12.1895 13.8619 11.5985 14.0862 11.0939L15.0302 8.96981L12.9061 9.91382C12.4014 10.1381 11.8105 9.91081 11.5862 9.40612C11.3619 8.90143 11.5892 8.31048 12.0939 8.08618L13.7195 7.36372L11.8039 6.98058C11.2623 6.87225 10.9111 6.34542 11.0194 5.80387C11.1277 5.26231 11.6546 4.9111 12.1961 5.01942L14.9778 5.57579C14.5776 5.23353 14.0688 4.92224 13.4598 4.6821ZM18.7737 6.64046C19.8668 7.33898 20.7216 8.50708 21.2227 9.80662C21.9674 11.7378 22.0321 14.1719 20.8944 16.4472C19.7338 18.7684 17.6849 20.1577 15.2488 20.9597C12.8311 21.7557 9.95984 22 6.99976 22C5.67452 22 4.43299 21.3474 3.54265 20.4571C2.6523 19.5667 1.99976 18.3252 1.99976 16.9999C1.99976 13.9461 2.25047 11.0693 3.05138 8.67108C3.86003 6.24973 5.25264 4.25571 7.55276 3.10556C9.83658 1.96357 12.2699 2.06296 14.1936 2.82154C15.4792 3.32855 16.6391 4.17819 17.3412 5.24451L18.2926 4.29301C18.6831 3.90247 19.3163 3.90243 19.7068 4.29293C20.0974 4.68343 20.0974 5.31659 19.7069 5.70714L18.7737 6.64046ZM13 17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17C11 16.4477 11.4477 16 12 16C12.5523 16 13 16.4477 13 17ZM17 16C17.5523 16 18 15.5523 18 15C18 14.4477 17.5523 14 17 14C16.4477 14 16 14.4477 16 15C16 15.5523 16.4477 16 17 16ZM12 13C12 13.5523 11.5523 14 11 14C10.4477 14 10 13.5523 10 13C10 12.4477 10.4477 12 11 12C11.5523 12 12 12.4477 12 13ZM7 13C7.55228 13 8 12.5523 8 12C8 11.4477 7.55228 11 7 11C6.44772 11 6 11.4477 6 12C6 12.5523 6.44772 13 7 13ZM8 17C8 17.5523 7.55228 18 7 18C6.44772 18 6 17.5523 6 17C6 16.4477 6.44772 16 7 16C7.55228 16 8 16.4477 8 17ZM9 7.99999C9.55228 7.99999 10 7.55228 10 6.99999C10 6.44771 9.55228 5.99999 9 5.99999C8.44772 5.99999 8 6.44771 8 6.99999C8 7.55228 8.44772 7.99999 9 7.99999Z" fill="#000000"/>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

24429
icons/ten_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 864 KiB

1969
icons/twenty_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 157 KiB

109
icons/two_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 37 KiB

3327
icons/twohundred_euro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 257 KiB

39
requirements.txt Normal file
View file

@ -0,0 +1,39 @@
annotated-types==0.7.0
anyio==4.4.0
certifi==2024.7.4
click==8.1.7
dnspython==2.6.1
email_validator==2.2.0
fastapi==0.112.0
fastapi-cli==0.0.5
h11==0.14.0
httpcore==1.0.5
httptools==0.6.1
httpx==0.27.0
idna==3.7
iniconfig==2.0.0
Jinja2==3.1.4
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mdurl==0.1.2
packaging==24.1
pillow==10.4.0
pluggy==1.5.0
pydantic==2.8.2
pydantic_core==2.20.1
Pygments==2.18.0
pytest==8.3.2
python-dotenv==1.0.1
python-multipart==0.0.9
PyYAML==6.0.1
rich==13.7.1
shellingham==1.5.4
sniffio==1.3.1
starlette==0.37.2
typer==0.12.3
typing_extensions==4.12.2
uvicorn==0.30.5
uvloop==0.19.0
validators==0.33.0
watchfiles==0.22.0
websockets==12.0

View file

View file

@ -0,0 +1,26 @@
import re
from PIL import Image
def is_valid_image(file_name: str = None, file_content: str = None):
try:
with Image.open(file_name) as img:
img.verify()
return True
except (IOError, SyntaxError):
return False
def is_valid_svg(file_name: str = None, file_content: str = None):
SVG_R = r'(?:<\?xml\b[^>]*>[^<]*)?(?:<!--.*?-->[^<]*)*(?:<svg|<!DOCTYPE svg)\b'
SVG_RE = re.compile(SVG_R, re.DOTALL)
if file_name != None:
file_object = open(file_name, 'r')
file_contents = file_object.read()
else:
file_contents = file_content
is_svg = SVG_RE.match(file_contents) is not None
return is_svg

View file

@ -0,0 +1,12 @@
from pydantic import BaseModel
class AmountOfBills(BaseModel):
one_euro: int
two_euro: int
five_euro: int
ten_euro: int
twenty_euro: int
fifty_euro: int
hundred_euro: int
twohundred_euro: int
fivehundred_euro: int

View file

@ -3,4 +3,5 @@ from pydantic import BaseModel, HttpUrl
class Product(BaseModel):
name: str
price: float
image_url: HttpUrl
barcode: int
image_filename: str

0
src/config/__init__.py Normal file
View file

View file

@ -0,0 +1,4 @@
import os
ROOT_PATH = project_root = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
ICONS_PATH = f"{ROOT_PATH}/icons"

View file

@ -1,9 +1,27 @@
from src.classes import product_classes
apple = product_classes.Product(name="Appel", price=1.0, image_url="https://i.etsystatic.com/16348658/r/il/380709/1340147432/il_570xN.1340147432_p3pc.jpg")
bubble_tea = product_classes.Product(name="Bubble Tea", price=5.0, image_url="https://uxwing.com/wp-content/themes/uxwing/download/food-and-drinks/bubble-tea-icon.png")
product_list = [apple, bubble_tea]
melon = product_classes.Product(name="Meloen", price=2.0, barcode=1000 ,image_filename="melon")
pear = product_classes.Product(name="Peer", price=1.0, barcode=1001 ,image_filename="pear")
peach = product_classes.Product(name="Perzik", price=1.0, barcode=1002 ,image_filename="peach")
orange = product_classes.Product(name="Appelsien", price=1.0, barcode=1003 ,image_filename="orange")
apple = product_classes.Product(name="Appel", price=1.0, barcode=1004 ,image_filename="apple")
banana = product_classes.Product(name="Banana", price=1.0, barcode=1005 ,image_filename="banana")
cherry = product_classes.Product(name="Kers", price=1.0, barcode=1006 ,image_filename="cherry")
kiwi = product_classes.Product(name="Kiwi", price=1.0, barcode=1007 ,image_filename="kiwi")
grape = product_classes.Product(name="Druif", price=2.0, barcode=1008 ,image_filename="grape")
strawberry = product_classes.Product(name="Aardbei", price=1.0, barcode=1009 ,image_filename="strawberry")
pineapple = product_classes.Product(name="Ananas", price=2.0, barcode=1010 ,image_filename="pineapple")
blueberry = product_classes.Product(name="Bosbes", price=1.0, barcode=1011 ,image_filename="blueberry")
raspberry = product_classes.Product(name="Framboos", price=1.0, barcode=1012 ,image_filename="raspberry")
lemon = product_classes.Product(name="Citroen", price=1.0, barcode=1013 ,image_filename="lemon")
product_list = [melon,pear,peach,orange,apple,banana,cherry,kiwi,grape,strawberry,pineapple,blueberry,raspberry,lemon]
def get_all_products() -> list[product_classes.Product]:
return product_list
return product_list
def get_single_product(barcode: int) -> product_classes.Product:
for product in product_list:
if product.barcode == barcode:
return product

View file

@ -1,9 +1,29 @@
from fastapi import FastAPI
from src.classes import product_classes
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import FileResponse
import os
from src.classes import product_classes, cash_classes
from src.config import definitions
from src.modules import price_to_cash_calculator
from shop_validators import image_validator
from src import data_connection
app = FastAPI()
origins = [
"*" #Will become something like 'shop.yarnecoppens.com'
]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/")
def read_root():
return {"Hello": "World"}
@ -12,7 +32,20 @@ def read_root():
def get_all_products():
return data_connection.get_all_products()
# @app.get("/boardgames/{boardgame_id}", response_model=boardgame_classes.BoardGame)
# def get_boardgame_by_id(boardgame_id: int):
# requested_boardgame: boardgame_classes.BoardGame = data_connection.get_boardgame(boardgame_id)
# return requested_boardgame
@app.get("/products/{barcode}", response_model=product_classes.Product)
def get_single_product(barcode: int):
return data_connection.get_single_product(barcode)
@app.get("/icons/{icon_filename}", response_class=FileResponse)
def get_icon(icon_filename: str):
full_filepath = os.path.join(definitions.ICONS_PATH, icon_filename) + ".svg"
assert os.path.exists(full_filepath), f"File {full_filepath} not found"
assert image_validator.is_valid_svg(file_name=full_filepath), f"File {full_filepath} is not a valid image"
return full_filepath
@app.get("/price_to_cash/{price}", response_model=cash_classes.AmountOfBills)
def price_to_cash(price: int):
cash_model = price_to_cash_calculator.price_to_cash_model(price)
return cash_model

View file

@ -0,0 +1,24 @@
from src.classes import cash_classes
import math
def price_to_cash_model(price: int) -> cash_classes.AmountOfBills:
cash_types = [500,200,100,50,20,10,5,2,1]
cash_model = {}
for cash_type in cash_types:
cash_fits_in_price = math.floor(price / cash_type)
cash_model[str(cash_type)] = cash_fits_in_price
price -= cash_type * cash_fits_in_price
return cash_classes.AmountOfBills(
one_euro=cash_model['1'],
two_euro=cash_model['2'],
five_euro=cash_model['5'],
ten_euro=cash_model['10'],
twenty_euro=cash_model['20'],
fifty_euro=cash_model['50'],
hundred_euro=cash_model['100'],
twohundred_euro=cash_model['200'],
fivehundred_euro=cash_model['500']
)

View file

@ -4,13 +4,14 @@ import validators
from src.main import app
from src.classes import product_classes
from shop_validators import image_validator
client = TestClient(app)
def default_product_test(product: product_classes.Product):
assert type(product.name) == str
assert type(product.price) == float
assert validators.url(str(product.image_url))
assert type(product.image_filename) == str
@ -27,3 +28,11 @@ def test_retrieve_products():
returned_product = product_classes.Product(**response.json()[0])
default_product_test(returned_product)
def test_retrieve_icon():
response = client.get("/icons/cart")
assert response.status_code == 200
returned_icon = response.text
assert image_validator.is_valid_svg(file_content=returned_icon)