from django.core.management.base import BaseCommand
from django.core.cache import cache

from data.models import Summary
from data.parser import parse_summary_data, parse_per_region_data


class Command(BaseCommand):
    help = "Parse COVID-19 data."

    def handle(self, *args, **options):
        self.stdout.write("Starting COVID-19 data parse...")

        raw_summary = parse_summary_data()
        raw_regions_data = parse_per_region_data()
        summary = Summary.objects.create(**raw_summary, raw_data=raw_regions_data)
        self.stdout.write("Parsed data: ")
        print(summary.get_summary_data())
        self.stdout.write("Clearing cache...")
        cache.clear()
        self.stdout.write("Done")

744b8aaea296bd223e16dc99a939f5c6e7193a99
<mask token>

<mask token>


class Command(BaseCommand):
    <mask token>
    <mask token>

<mask token>


class Command(BaseCommand):
    help = 'Parse COVID-19 data.'

    def handle(self, *args, **options):
        self.stdout.write('Starting COVID-19 data parse...')
        raw_summary = parse_summary_data()
        raw_regions_data = parse_per_region_data()
        summary = Summary.objects.create(**raw_summary, raw_data=
            raw_regions_data)
        self.stdout.write('Parsed data: ')
        print(summary.get_summary_data())
        self.stdout.write('Clearing cache...')
        cache.clear()
        self.stdout.write('Done')

from django.core.management.base import BaseCommand
from django.core.cache import cache
from data.models import Summary
from data.parser import parse_summary_data, parse_per_region_data


class Command(BaseCommand):
    help = 'Parse COVID-19 data.'

    def handle(self, *args, **options):
        self.stdout.write('Starting COVID-19 data parse...')
        raw_summary = parse_summary_data()
        raw_regions_data = parse_per_region_data()
        summary = Summary.objects.create(**raw_summary, raw_data=
            raw_regions_data)
        self.stdout.write('Parsed data: ')
        print(summary.get_summary_data())
        self.stdout.write('Clearing cache...')
        cache.clear()
        self.stdout.write('Done')

from django.core.management.base import BaseCommand
from django.core.cache import cache

from data.models import Summary
from data.parser import parse_summary_data, parse_per_region_data


class Command(BaseCommand):
    help = "Parse COVID-19 data."

    def handle(self, *args, **options):
        self.stdout.write("Starting COVID-19 data parse...")

        raw_summary = parse_summary_data()
        raw_regions_data = parse_per_region_data()
        summary = Summary.objects.create(**raw_summary, raw_data=raw_regions_data)
        self.stdout.write("Parsed data: ")
        print(summary.get_summary_data())
        self.stdout.write("Clearing cache...")
        cache.clear()
        self.stdout.write("Done")
