├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── LICENSE-CODE ├── README.md ├── SECURITY.md ├── app.py ├── data └── products.json ├── requirements.txt └── templates └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More_considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | 69 | Section 1 -- Definitions. 70 | 71 | a. Adapted Material means material subject to Copyright and Similar 72 | Rights that is derived from or based upon the Licensed Material 73 | and in which the Licensed Material is translated, altered, 74 | arranged, transformed, or otherwise modified in a manner requiring 75 | permission under the Copyright and Similar Rights held by the 76 | Licensor. For purposes of this Public License, where the Licensed 77 | Material is a musical work, performance, or sound recording, 78 | Adapted Material is always produced where the Licensed Material is 79 | synched in timed relation with a moving image. 80 | 81 | b. Adapter's License means the license You apply to Your Copyright 82 | and Similar Rights in Your contributions to Adapted Material in 83 | accordance with the terms and conditions of this Public License. 84 | 85 | c. Copyright and Similar Rights means copyright and/or similar rights 86 | closely related to copyright including, without limitation, 87 | performance, broadcast, sound recording, and Sui Generis Database 88 | Rights, without regard to how the rights are labeled or 89 | categorized. For purposes of this Public License, the rights 90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 91 | Rights. 92 | 93 | d. Effective Technological Measures means those measures that, in the 94 | absence of proper authority, may not be circumvented under laws 95 | fulfilling obligations under Article 11 of the WIPO Copyright 96 | Treaty adopted on December 20, 1996, and/or similar international 97 | agreements. 98 | 99 | e. Exceptions and Limitations means fair use, fair dealing, and/or 100 | any other exception or limitation to Copyright and Similar Rights 101 | that applies to Your use of the Licensed Material. 102 | 103 | f. Licensed Material means the artistic or literary work, database, 104 | or other material to which the Licensor applied this Public 105 | License. 106 | 107 | g. Licensed Rights means the rights granted to You subject to the 108 | terms and conditions of this Public License, which are limited to 109 | all Copyright and Similar Rights that apply to Your use of the 110 | Licensed Material and that the Licensor has authority to license. 111 | 112 | h. Licensor means the individual(s) or entity(ies) granting rights 113 | under this Public License. 114 | 115 | i. Share means to provide material to the public by any means or 116 | process that requires permission under the Licensed Rights, such 117 | as reproduction, public display, public performance, distribution, 118 | dissemination, communication, or importation, and to make material 119 | available to the public including in ways that members of the 120 | public may access the material from a place and at a time 121 | individually chosen by them. 122 | 123 | j. Sui Generis Database Rights means rights other than copyright 124 | resulting from Directive 96/9/EC of the European Parliament and of 125 | the Council of 11 March 1996 on the legal protection of databases, 126 | as amended and/or succeeded, as well as other essentially 127 | equivalent rights anywhere in the world. 128 | 129 | k. You means the individual or entity exercising the Licensed Rights 130 | under this Public License. Your has a corresponding meaning. 131 | 132 | 133 | Section 2 -- Scope. 134 | 135 | a. License grant. 136 | 137 | 1. Subject to the terms and conditions of this Public License, 138 | the Licensor hereby grants You a worldwide, royalty-free, 139 | non-sublicensable, non-exclusive, irrevocable license to 140 | exercise the Licensed Rights in the Licensed Material to: 141 | 142 | a. reproduce and Share the Licensed Material, in whole or 143 | in part; and 144 | 145 | b. produce, reproduce, and Share Adapted Material. 146 | 147 | 2. Exceptions and Limitations. For the avoidance of doubt, where 148 | Exceptions and Limitations apply to Your use, this Public 149 | License does not apply, and You do not need to comply with 150 | its terms and conditions. 151 | 152 | 3. Term. The term of this Public License is specified in Section 153 | 6(a). 154 | 155 | 4. Media and formats; technical modifications allowed. The 156 | Licensor authorizes You to exercise the Licensed Rights in 157 | all media and formats whether now known or hereafter created, 158 | and to make technical modifications necessary to do so. The 159 | Licensor waives and/or agrees not to assert any right or 160 | authority to forbid You from making technical modifications 161 | necessary to exercise the Licensed Rights, including 162 | technical modifications necessary to circumvent Effective 163 | Technological Measures. For purposes of this Public License, 164 | simply making modifications authorized by this Section 2(a) 165 | (4) never produces Adapted Material. 166 | 167 | 5. Downstream recipients. 168 | 169 | a. Offer from the Licensor -- Licensed Material. Every 170 | recipient of the Licensed Material automatically 171 | receives an offer from the Licensor to exercise the 172 | Licensed Rights under the terms and conditions of this 173 | Public License. 174 | 175 | b. No downstream restrictions. You may not offer or impose 176 | any additional or different terms or conditions on, or 177 | apply any Effective Technological Measures to, the 178 | Licensed Material if doing so restricts exercise of the 179 | Licensed Rights by any recipient of the Licensed 180 | Material. 181 | 182 | 6. No endorsement. Nothing in this Public License constitutes or 183 | may be construed as permission to assert or imply that You 184 | are, or that Your use of the Licensed Material is, connected 185 | with, or sponsored, endorsed, or granted official status by, 186 | the Licensor or others designated to receive attribution as 187 | provided in Section 3(a)(1)(A)(i). 188 | 189 | b. Other rights. 190 | 191 | 1. Moral rights, such as the right of integrity, are not 192 | licensed under this Public License, nor are publicity, 193 | privacy, and/or other similar personality rights; however, to 194 | the extent possible, the Licensor waives and/or agrees not to 195 | assert any such rights held by the Licensor to the limited 196 | extent necessary to allow You to exercise the Licensed 197 | Rights, but not otherwise. 198 | 199 | 2. Patent and trademark rights are not licensed under this 200 | Public License. 201 | 202 | 3. To the extent possible, the Licensor waives any right to 203 | collect royalties from You for the exercise of the Licensed 204 | Rights, whether directly or through a collecting society 205 | under any voluntary or waivable statutory or compulsory 206 | licensing scheme. In all other cases the Licensor expressly 207 | reserves any right to collect such royalties. 208 | 209 | 210 | Section 3 -- License Conditions. 211 | 212 | Your exercise of the Licensed Rights is expressly made subject to the 213 | following conditions. 214 | 215 | a. Attribution. 216 | 217 | 1. If You Share the Licensed Material (including in modified 218 | form), You must: 219 | 220 | a. retain the following if it is supplied by the Licensor 221 | with the Licensed Material: 222 | 223 | i. identification of the creator(s) of the Licensed 224 | Material and any others designated to receive 225 | attribution, in any reasonable manner requested by 226 | the Licensor (including by pseudonym if 227 | designated); 228 | 229 | ii. a copyright notice; 230 | 231 | iii. a notice that refers to this Public License; 232 | 233 | iv. a notice that refers to the disclaimer of 234 | warranties; 235 | 236 | v. a URI or hyperlink to the Licensed Material to the 237 | extent reasonably practicable; 238 | 239 | b. indicate if You modified the Licensed Material and 240 | retain an indication of any previous modifications; and 241 | 242 | c. indicate the Licensed Material is licensed under this 243 | Public License, and include the text of, or the URI or 244 | hyperlink to, this Public License. 245 | 246 | 2. You may satisfy the conditions in Section 3(a)(1) in any 247 | reasonable manner based on the medium, means, and context in 248 | which You Share the Licensed Material. For example, it may be 249 | reasonable to satisfy the conditions by providing a URI or 250 | hyperlink to a resource that includes the required 251 | information. 252 | 253 | 3. If requested by the Licensor, You must remove any of the 254 | information required by Section 3(a)(1)(A) to the extent 255 | reasonably practicable. 256 | 257 | 4. If You Share Adapted Material You produce, the Adapter's 258 | License You apply must not prevent recipients of the Adapted 259 | Material from complying with this Public License. 260 | 261 | 262 | Section 4 -- Sui Generis Database Rights. 263 | 264 | Where the Licensed Rights include Sui Generis Database Rights that 265 | apply to Your use of the Licensed Material: 266 | 267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 268 | to extract, reuse, reproduce, and Share all or a substantial 269 | portion of the contents of the database; 270 | 271 | b. if You include all or a substantial portion of the database 272 | contents in a database in which You have Sui Generis Database 273 | Rights, then the database in which You have Sui Generis Database 274 | Rights (but not its individual contents) is Adapted Material; and 275 | 276 | c. You must comply with the conditions in Section 3(a) if You Share 277 | all or a substantial portion of the contents of the database. 278 | 279 | For the avoidance of doubt, this Section 4 supplements and does not 280 | replace Your obligations under this Public License where the Licensed 281 | Rights include other Copyright and Similar Rights. 282 | 283 | 284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 285 | 286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 296 | 297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 306 | 307 | c. The disclaimer of warranties and limitation of liability provided 308 | above shall be interpreted in a manner that, to the extent 309 | possible, most closely approximates an absolute disclaimer and 310 | waiver of all liability. 311 | 312 | 313 | Section 6 -- Term and Termination. 314 | 315 | a. This Public License applies for the term of the Copyright and 316 | Similar Rights licensed here. However, if You fail to comply with 317 | this Public License, then Your rights under this Public License 318 | terminate automatically. 319 | 320 | b. Where Your right to use the Licensed Material has terminated under 321 | Section 6(a), it reinstates: 322 | 323 | 1. automatically as of the date the violation is cured, provided 324 | it is cured within 30 days of Your discovery of the 325 | violation; or 326 | 327 | 2. upon express reinstatement by the Licensor. 328 | 329 | For the avoidance of doubt, this Section 6(b) does not affect any 330 | right the Licensor may have to seek remedies for Your violations 331 | of this Public License. 332 | 333 | c. For the avoidance of doubt, the Licensor may also offer the 334 | Licensed Material under separate terms or conditions or stop 335 | distributing the Licensed Material at any time; however, doing so 336 | will not terminate this Public License. 337 | 338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 339 | License. 340 | 341 | 342 | Section 7 -- Other Terms and Conditions. 343 | 344 | a. The Licensor shall not be bound by any additional or different 345 | terms or conditions communicated by You unless expressly agreed. 346 | 347 | b. Any arrangements, understandings, or agreements regarding the 348 | Licensed Material not stated herein are separate from and 349 | independent of the terms and conditions of this Public License. 350 | 351 | 352 | Section 8 -- Interpretation. 353 | 354 | a. For the avoidance of doubt, this Public License does not, and 355 | shall not be interpreted to, reduce, limit, restrict, or impose 356 | conditions on any use of the Licensed Material that could lawfully 357 | be made without permission under this Public License. 358 | 359 | b. To the extent possible, if any provision of this Public License is 360 | deemed unenforceable, it shall be automatically reformed to the 361 | minimum extent necessary to make it enforceable. If the provision 362 | cannot be reformed, it shall be severed from this Public License 363 | without affecting the enforceability of the remaining terms and 364 | conditions. 365 | 366 | c. No term or condition of this Public License will be waived and no 367 | failure to comply consented to unless expressly agreed to by the 368 | Licensor. 369 | 370 | d. Nothing in this Public License constitutes or may be interpreted 371 | as a limitation upon, or waiver of, any privileges and immunities 372 | that apply to the Licensor or You, including from the legal 373 | processes of any jurisdiction or authority. 374 | 375 | 376 | ======================================================================= 377 | 378 | Creative Commons is not a party to its public 379 | licenses. Notwithstanding, Creative Commons may elect to apply one of 380 | its public licenses to material it publishes and in those instances 381 | will be considered the “Licensor.” The text of the Creative Commons 382 | public licenses is dedicated to the public domain under the CC0 Public 383 | Domain Dedication. Except for the limited purpose of indicating that 384 | material is shared under a Creative Commons public license or as 385 | otherwise permitted by the Creative Commons policies published at 386 | creativecommons.org/policies, Creative Commons does not authorize the 387 | use of the trademark "Creative Commons" or any other trademark or logo 388 | of Creative Commons without its prior written consent including, 389 | without limitation, in connection with any unauthorized modifications 390 | to any of its public licenses or any other arrangements, 391 | understandings, or agreements concerning use of licensed material. For 392 | the avoidance of doubt, this paragraph does not form part of the 393 | public licenses. 394 | 395 | Creative Commons may be contacted at creativecommons.org. -------------------------------------------------------------------------------- /LICENSE-CODE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Python Products 3 | 4 | A Python/Flask dashboard for a Products database. 5 | 6 | ## Prequisites 7 | 8 | * Visual Studio Code 9 | * Docker (WSL2 required for Windows users) 10 | * Remote Containers extension for VS Code 11 | 12 | ## Running 13 | 14 | 1. Clone the repo 15 | 2. Open the app 16 | 3. Select "Reopen in container" when prompted 17 | 2. Open a terminal and run... 18 | 19 | ``` 20 | python app.py 21 | ``` 22 | 23 | 3. Visit the running app on port 5000 24 | 25 | # Contributing 26 | 27 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 28 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 29 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 30 | 31 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 32 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 33 | provided by the bot. You will only need to do this once across all repos using our CLA. 34 | 35 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 36 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 37 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 38 | 39 | # Legal Notices 40 | 41 | Microsoft and any contributors grant you a license to the Microsoft documentation and other content 42 | in this repository under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/legalcode), 43 | see the [LICENSE](LICENSE) file, and grant you a license to any code in the repository under the [MIT License](https://opensource.org/licenses/MIT), see the 44 | [LICENSE-CODE](LICENSE-CODE) file. 45 | 46 | Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation 47 | may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. 48 | The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. 49 | Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653. 50 | 51 | Privacy information can be found at https://privacy.microsoft.com/en-us/ 52 | 53 | Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, 54 | or trademarks, whether by implication, estoppel or otherwise. 55 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). 40 | 41 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | from flask import render_template 3 | import json 4 | 5 | app = Flask(__name__) 6 | 7 | @app.route("/") 8 | def index(): 9 | with open('data/products.json') as f: 10 | data = json.load(f) 11 | 12 | return render_template('index.html', products=data) 13 | 14 | if __name__ == "__main__": 15 | app.run(debug=True) -------------------------------------------------------------------------------- /data/products.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Single red garden gnome", 4 | "price": 56, 5 | "brand": { 6 | "name": "Home & Pro tools" 7 | }, 8 | "stockUnits": 98 9 | }, 10 | { 11 | "name": "Two red garden gnomes", 12 | "price": 92, 13 | "brand": { 14 | "name": "Home & Pro tools" 15 | }, 16 | "stockUnits": 4 17 | }, 18 | { 19 | "name": "One sat gnome", 20 | "price": 34, 21 | "brand": { 22 | "name": "Home & Pro tools" 23 | }, 24 | "stockUnits": 34 25 | }, 26 | { 27 | "name": "One sat on shoe gnome", 28 | "price": 54, 29 | "brand": { 30 | "name": "Home & Pro tools" 31 | }, 32 | "stockUnits": 54 33 | }, 34 | { 35 | "name": "One barrow gnome", 36 | "price": 29, 37 | "brand": { 38 | "name": "Home & Pro tools" 39 | }, 40 | "stockUnits": 23 41 | }, 42 | { 43 | "name": "One glasses gnome", 44 | "price": 54, 45 | "brand": { 46 | "name": "Home & Pro tools" 47 | }, 48 | "stockUnits": 94 49 | }, 50 | { 51 | "name": "One smiling gnome", 52 | "price": 43, 53 | "brand": { 54 | "name": "Home & Pro tools" 55 | }, 56 | "stockUnits": 45 57 | }, 58 | { 59 | "name": "Two singing gnomes", 60 | "price": 65, 61 | "brand": { 62 | "name": "Home & Pro tools" 63 | }, 64 | "stockUnits": 78 65 | }, 66 | { 67 | "name": "Two sleeping gnomes", 68 | "price": 32, 69 | "brand": { 70 | "name": "Home & Pro tools" 71 | }, 72 | "stockUnits": 12 73 | }, 74 | { 75 | "name": "Seven-pack gnomes", 76 | "price": 2543, 77 | "brand": { 78 | "name": "Home & Pro tools" 79 | }, 80 | "stockUnits": 45 81 | }, 82 | { 83 | "name": "One afraid gnome", 84 | "price": 39, 85 | "brand": { 86 | "name": "Home & Pro tools" 87 | }, 88 | "stockUnits": 88 89 | }, 90 | { 91 | "name": "One welcome gnome", 92 | "price": 28, 93 | "brand": { 94 | "name": "Home & Pro tools" 95 | }, 96 | "stockUnits": 65 97 | }, 98 | { 99 | "name": "Two smiling gnomes", 100 | "price": 76, 101 | "brand": { 102 | "name": "Home & Pro tools" 103 | }, 104 | "stockUnits": 87 105 | }, 106 | { 107 | "name": "Microwave 33.9 Cu. Ft. 92325 W", 108 | "price": 1740, 109 | "brand": { 110 | "name": "ElctroDrill" 111 | }, 112 | "stockUnits": 58 113 | }, 114 | { 115 | "name": "Refrigerator 1.7 cu. ft. 110 watts", 116 | "price": 200, 117 | "brand": { 118 | "name": "ProSaws" 119 | }, 120 | "stockUnits": 54 121 | }, 122 | { 123 | "name": "Oven 900 W", 124 | "price": 300, 125 | "brand": { 126 | "name": "Drills Co" 127 | }, 128 | "stockUnits": 389 129 | }, 130 | { 131 | "name": "Washing machine 1200rpm", 132 | "price": 400, 133 | "brand": { 134 | "name": "Home & Pro tools" 135 | }, 136 | "stockUnits": 45 137 | }, 138 | { 139 | "name": "Washing machine 900rpm", 140 | "price": 300, 141 | "brand": { 142 | "name": "ElctroDrill" 143 | }, 144 | "stockUnits": 27 145 | }, 146 | { 147 | "name": "Kitchen stoves ", 148 | "price": 1400, 149 | "brand": { 150 | "name": "Home & Pro tools" 151 | }, 152 | "stockUnits": 58 153 | }, 154 | { 155 | "name": "Refrigerator ft. 90 watts", 156 | "price": 400, 157 | "brand": { 158 | "name": "ProSaws" 159 | }, 160 | "stockUnits": 25 161 | }, 162 | { 163 | "name": "One Handle Stainless Steel Pull Out Kitchen Faucet", 164 | "price": 20, 165 | "brand": { 166 | "name": "ProSaws" 167 | }, 168 | "stockUnits": 65 169 | }, 170 | { 171 | "name": "Bathing System Classic 18 in. H x 60 in. W x 32.5", 172 | "price": 200, 173 | "brand": { 174 | "name": "ElctroDrill" 175 | }, 176 | "stockUnits": 38 177 | }, 178 | { 179 | "name": "Showerhead 1.75 gpm", 180 | "price": 40, 181 | "brand": { 182 | "name": "ElctroDrill" 183 | }, 184 | "stockUnits": 32 185 | }, 186 | { 187 | "name": "Toilet 1.28 gal.", 188 | "price": 180, 189 | "brand": { 190 | "name": "ElctroDrill" 191 | }, 192 | "stockUnits": 35 193 | }, 194 | { 195 | "name": "Black Bathing System Classic 18 in. H x 60 in. W x 32.5", 196 | "price": 250, 197 | "brand": { 198 | "name": "Home & Pro tools" 199 | }, 200 | "stockUnits": 35 201 | }, 202 | { 203 | "name": "Bathroom Sink Faucet Waterfall", 204 | "price": 175, 205 | "brand": { 206 | "name": "Home & Pro tools" 207 | }, 208 | "stockUnits": 32 209 | }, 210 | { 211 | "name": "Bathroom Sink Faucet", 212 | "price": 99, 213 | "brand": { 214 | "name": "Home & Pro tools" 215 | }, 216 | "stockUnits": 15 217 | }, 218 | { 219 | "name": "Bathroom Sink Faucet Classic", 220 | "price": 100, 221 | "brand": { 222 | "name": "ProSaws" 223 | }, 224 | "stockUnits": 12 225 | }, 226 | { 227 | "name": "Showerhead 1.20 gpm", 228 | "price": 125, 229 | "brand": { 230 | "name": "ProSaws" 231 | }, 232 | "stockUnits": 14 233 | }, 234 | { 235 | "name": "Blend Solid White Sheer Curtains", 236 | "price": 110, 237 | "brand": { 238 | "name": "ProSaws" 239 | }, 240 | "stockUnits": 18 241 | }, 242 | { 243 | "name": "Door Hardware Kit Single Door", 244 | "price": 120, 245 | "brand": { 246 | "name": "Drills Co" 247 | }, 248 | "stockUnits": 61 249 | }, 250 | { 251 | "name": "White Sheer Curtains", 252 | "price": 105, 253 | "brand": { 254 | "name": "Drills Co" 255 | }, 256 | "stockUnits": 95 257 | }, 258 | { 259 | "name": "White Window", 260 | "price": 120, 261 | "brand": { 262 | "name": "Drills Co" 263 | }, 264 | "stockUnits": 32 265 | }, 266 | { 267 | "name": "Curtain Rod 48 in", 268 | "price": 25, 269 | "brand": { 270 | "name": "Drills Co" 271 | }, 272 | "stockUnits": 52 273 | }, 274 | { 275 | "name": "Steel Passage Door Knob", 276 | "price": 10, 277 | "brand": { 278 | "name": "ElctroDrill" 279 | }, 280 | "stockUnits": 41 281 | }, 282 | { 283 | "name": "White Door", 284 | "price": 123, 285 | "brand": { 286 | "name": "ElctroDrill" 287 | }, 288 | "stockUnits": 15 289 | }, 290 | { 291 | "name": "White Window Wood", 292 | "price": 230, 293 | "brand": { 294 | "name": "ElctroDrill" 295 | }, 296 | "stockUnits": 84 297 | }, 298 | { 299 | "name": "Indoor Kit Gardering", 300 | "price": 70, 301 | "brand": { 302 | "name": "ProSaws" 303 | }, 304 | "stockUnits": 25 305 | }, 306 | { 307 | "name": "Craftsman 100 ft. L x 5/8 in.", 308 | "price": 100, 309 | "brand": { 310 | "name": "ProSaws" 311 | }, 312 | "stockUnits": 74 313 | }, 314 | { 315 | "name": "Metal Watering Can", 316 | "price": 20, 317 | "brand": { 318 | "name": "ProSaws" 319 | }, 320 | "stockUnits": 59 321 | }, 322 | { 323 | "name": "Steel Contractor Wheelbarrow", 324 | "price": 100, 325 | "brand": { 326 | "name": "ProSaws" 327 | }, 328 | "stockUnits": 65 329 | }, 330 | { 331 | "name": "Craftsman 21 in. W 140", 332 | "price": 200, 333 | "brand": { 334 | "name": "ProSaws" 335 | }, 336 | "stockUnits": 82 337 | }, 338 | { 339 | "name": "Gardering", 340 | "price": 10, 341 | "brand": { 342 | "name": "Home & Pro tools" 343 | }, 344 | "stockUnits": 51 345 | }, 346 | { 347 | "name": "Celebrations C9", 348 | "price": 10, 349 | "brand": { 350 | "name": "Home & Pro tools" 351 | }, 352 | "stockUnits": 96 353 | }, 354 | { 355 | "name": "Artificial Tree", 356 | "price": 250, 357 | "brand": { 358 | "name": "Home & Pro tools" 359 | }, 360 | "stockUnits": 654 361 | }, 362 | { 363 | "name": "Celebrations C8", 364 | "price": 5, 365 | "brand": { 366 | "name": "Home & Pro tools" 367 | }, 368 | "stockUnits": 21 369 | }, 370 | { 371 | "name": "Artificial Tree Big", 372 | "price": 300, 373 | "brand": { 374 | "name": "Home & Pro tools" 375 | }, 376 | "stockUnits": 32 377 | }, 378 | { 379 | "name": "Wood Pack", 380 | "price": 30, 381 | "brand": { 382 | "name": "ElctroDrill" 383 | }, 384 | "stockUnits": 25 385 | }, 386 | { 387 | "name": "Wood Table", 388 | "price": 395, 389 | "brand": { 390 | "name": "ElctroDrill" 391 | }, 392 | "stockUnits": 68 393 | }, 394 | { 395 | "name": "Kitchen Stoves", 396 | "price": 85, 397 | "brand": { 398 | "name": "ElctroDrill" 399 | }, 400 | "stockUnits": 96 401 | }, 402 | { 403 | "name": "Kit Metal Casseroles", 404 | "price": 125, 405 | "brand": { 406 | "name": "Drills Co" 407 | }, 408 | "stockUnits": 64 409 | }, 410 | { 411 | "name": "Coffee Maker Red", 412 | "price": 200, 413 | "brand": { 414 | "name": "Drills Co" 415 | }, 416 | "stockUnits": 68 417 | }, 418 | { 419 | "name": "Extractor Steal", 420 | "price": 135, 421 | "brand": { 422 | "name": "Drills Co" 423 | }, 424 | "stockUnits": 35 425 | }, 426 | { 427 | "name": "Wooden Commode", 428 | "price": 50, 429 | "brand": { 430 | "name": "ElctroDrill" 431 | }, 432 | "stockUnits": 37 433 | }, 434 | { 435 | "name": "Metal Shelving", 436 | "price": 90, 437 | "brand": { 438 | "name": "ElctroDrill" 439 | }, 440 | "stockUnits": 95 441 | }, 442 | { 443 | "name": "Big Metal Shelving", 444 | "price": 99, 445 | "brand": { 446 | "name": "Home & Pro tools" 447 | }, 448 | "stockUnits": 6 449 | }, 450 | { 451 | "name": "Wooden Wardrobe", 452 | "price": 120, 453 | "brand": { 454 | "name": "Home & Pro tools" 455 | }, 456 | "stockUnits": 6 457 | }, 458 | { 459 | "name": "Wooden Saw", 460 | "price": 145, 461 | "brand": { 462 | "name": "ProSaws" 463 | }, 464 | "stockUnits": 65 465 | }, 466 | { 467 | "name": "Measuring Tape", 468 | "price": 123, 469 | "brand": { 470 | "name": "ProSaws" 471 | }, 472 | "stockUnits": 84 473 | }, 474 | { 475 | "name": "Multi Function Drill", 476 | "price": 159, 477 | "brand": { 478 | "name": "Home & Pro tools" 479 | }, 480 | "stockUnits": 21 481 | }, 482 | { 483 | "name": "Hammer", 484 | "price": 100, 485 | "brand": { 486 | "name": "Home & Pro tools" 487 | }, 488 | "stockUnits": 54 489 | }, 490 | { 491 | "name": "Screwdriver", 492 | "price": 110, 493 | "brand": { 494 | "name": "ElctroDrill" 495 | }, 496 | "stockUnits": 29 497 | }, 498 | { 499 | "name": "Pliers", 500 | "price": 105, 501 | "brand": { 502 | "name": "ElctroDrill" 503 | }, 504 | "stockUnits": 54 505 | }, 506 | { 507 | "name": "Red multi-tool plier", 508 | "price": 50, 509 | "brand": { 510 | "name": "ElctroDrill" 511 | }, 512 | "stockUnits": 86 513 | }, 514 | { 515 | "name": "Blue multi-tool plier", 516 | "price": 50, 517 | "brand": { 518 | "name": "ElctroDrill" 519 | }, 520 | "stockUnits": 69 521 | }, 522 | { 523 | "name": "Stainless multi-tool plier", 524 | "price": 90, 525 | "brand": { 526 | "name": "ElctroDrill" 527 | }, 528 | "stockUnits": 57 529 | }, 530 | { 531 | "name": "Yellow Rechargeable screwdriver", 532 | "price": 250, 533 | "brand": { 534 | "name": "Home & Pro tools" 535 | }, 536 | "stockUnits": 25 537 | }, 538 | { 539 | "name": "Red Rechargeable screwdriver", 540 | "price": 250, 541 | "brand": { 542 | "name": "ElctroDrill" 543 | }, 544 | "stockUnits": 26 545 | }, 546 | { 547 | "name": "Rechargeable screwdriver with extra battery", 548 | "price": 312, 549 | "brand": { 550 | "name": "Home & Pro tools" 551 | }, 552 | "stockUnits": 34 553 | }, 554 | { 555 | "name": "Yellow hard hat with tool bag pack", 556 | "price": 46, 557 | "brand": { 558 | "name": "ProSaws" 559 | }, 560 | "stockUnits": 65 561 | } 562 | ] -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # Flask Framework 2 | Flask==2.3.3 3 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Products Viewer 8 | 9 | 10 |
11 |
12 |
13 |
14 |
15 |

Products

16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {% for product in products %} 34 | 35 | 38 | 41 | 44 | 47 | 48 | {% endfor %} 49 | 50 |
NameBrandPriceUnits in Stock
36 | {{product.name}} 37 | 39 | {{product.brand.name}} 40 | 42 | {{product.price}} 43 | 45 | {{product.stockUnits}} 46 |
51 |
52 |
53 |
54 | 55 | --------------------------------------------------------------------------------