# This code parses date/times, so please # # pip install python-dateutil # # To use this code, make sure you # # import json # # and then, to convert JSON from a string, do # # result = n_co_v2019_from_dict(json.loads(json_string))
from datetime import datetime import dateutil.parser
deffrom_int(x): assert isinstance(x, int) andnot isinstance(x, bool) return x
tree -L 1 . ├── app.py ├── nCoV2019.py └── templates
1 directory, 2 files
测试代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/env python3 # -*- coding: utf-8 -*-
from pyecharts.charts import Bar from pyecharts import options as opts from flask import Flask from jinja2 import Markup, Environment, FileSystemLoader from pyecharts.globals import CurrentConfig