Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
... version="v0.1",
... env="MYPROJECT_DATA_DIR")
>>> print(pup.path.parts)
('myproject', 'env', 'v0.1')
"""
if version is not None:
version = check_version(version, fallback=version_dev)
base_url = base_url.format(version=version)
# Don't create the cache folder here! This function is usually called in
# the module context (at import time), so touching the file system is not
# recommended. It could cause crashes when multiple processes/threads try
# to import at the same time (which would try to create the folder several
# times at once).
path = cache_location(path, env, version)
pup = Pooch(path=path, base_url=base_url, registry=registry, urls=urls)
return pup