import logging
logging.basicConfig(level=logging.INFO)
from pystatis import Table, clear_cache
# first, let's download two data sets
# these will be cached under your
Table(name="21311-0001").get_data()
INFO:pystatis.cache:Data was successfully cached under /Users/miay/.pystatis/data/21311-0001/5d17194a9264f364cb40/20240220.csv. INFO:pystatis.http_helper:Code 0: erfolgreich
# You can now test the clear_cache function!
# Either with a particular name
clear_cache("21311-0001")
INFO:pystatis.cache:Removed files: [PosixPath('/Users/miay/.pystatis/data/21311-0001')]
# Or without a name to clear the whole cache at once
clear_cache()