Until you publish a web service on GCP while studying JQuery and Python

Introduction

Since COVID-19 has a lot of time left, I wondered if I could publish some services to the outside using JQuery, Python, etc., which I have a little knowledge of. After thinking about it, I decided to make what I wanted to use. It is ** editing the usage history of Mobile Suica so that it can be easily used for expense settlement **. Click here for the finished product https://www.mobilesuica.work

Writer's level

――I first touched the program 25 years ago when I used C language in university research. ――I didn't touch it at all after graduating from university, but about 10 years ago I started making scripts to hit Ruby and Visual Basic a little bit, and about 2 years ago to hit the REST API with Python (including studying my own products). ――From around February 2020, ask a detailed person in the company to teach you how to implement this architecture called Javascript + Python + Docker. --No experience in making so-called product level products

architecture

The following configuration was used to study containers and public clouds. mobilesuica.png

-** Reverse proxy with Nginx ** --Use ** jwilder / nginx-proxy ** for reverse proxy --For certificate creation, ** docker-letsencrypt-nginx-proxy-companion **. I found it easier to use this as a set with the above, so I decided to use it. -** Flask ** REST API server --For reading PDF files, use ** tabula-py ** to convert to CSV as it is --Process CSV with ** Pandas ** --Client processing with JQuery --Table display / file output is ** datatables ** -Use ** Bootstrap ** --Operates with f1-micro / Container-Optimized-OS on GCP.

Specification creation

As any member of society who goes around will understand, the usage history of Mobile Suica is difficult to use.

  1. Can only be output as PDF
  2. Since the filter has only the date, it is not possible to omit the history of shopping at convenience stores where expenses cannot be settled.
  3. There is no total value in the first place
  4. The usage amount is negative in the form of "difference"
  5. There are useless items such as "out", "in", and "remaining amount"

The goal is to create a Web service that solves all the above complaints. The functions planned to be implemented are as follows

--You can upload the PDF file downloaded from the Mobile Suica site as it is. --Display on the browser as a table in the same format as the Mobile Suica site --Allow items to be freely filtered with check boxes, etc. --Add the total value of the filtered results --Output the filtered result to a file

From the next time, I will explain how to implement it on the server side in Python.

Recommended Posts

Until you publish a web service on GCP while studying JQuery and Python
Until you publish (deploy) a web application made with bottle on Heroku
Until you install Python with pythonbrew and run Flask on a WSGI server
Until you create a machine learning environment with Python on Windows 7 and run it
Until you create Python Virtualenv on Windows and launch Jupyter
Until you get a snapshot of Amazon Elasticsearch service and restore it
A memo with Python2.7 and Python3 on CentOS
[Raspberry Pi] Publish a web application on https using Apache + WSGI + Python Flask
Create a web map using Python and GDAL
Launch a web server with Python and Flask
Until you use PhantomJS with Python on Heroku
[Python] Beginners troubleshoot while studying Django web applications
[Python3] Take a screenshot of a web page on the server and crop it further
Looking back on creating a web service with Django 1
Looking back on creating a web service with Django 2
Until you insert data into a spreadsheet in Python
Create a decent shell and python environment on Windows
A learning roadmap that allows you to develop and publish services from scratch with Python
Until Python [Django] de Web service is released [Tutorial, Part 1]
Building a Python environment on a Mac and using Jupyter lab
You who search and execute commands from a web browser 2
Sample to put Python Flask web app on Azure App Service (Web App)
Get a Python web page, character encode it, and display it
Until Python [Django] de Web service is released [Environment construction]
[GCP] A memorandum when running a Python program on Cloud Functions
Try and learn iptables, until you can browse the web
When you want to hit a UNIX command on Python
[Python] Notes on while statements (writing style and infinite loop)
Until building a Python development environment using pyenv on Ubuntu 20.04
Automation of a research on geographical information such as store network using Python and Web API