Best Python code snippet using localstack_python
config.py
Source:config.py
...805 def __iter__(self):806 return self._provider_config.__iter__()807SERVICE_PROVIDER_CONFIG = ServiceProviderConfig("default")808SERVICE_PROVIDER_CONFIG.load_from_environment()809def init_legacy_directories() -> Directories:810 global PERSISTENCE811 from localstack import constants812 constants.DEFAULT_VOLUME_DIR = "/tmp/localstack"813 if DATA_DIR:814 PERSISTENCE = True815 if is_in_docker:816 dirs = Directories.legacy_for_container()817 else:818 dirs = Directories.legacy_from_config()819 dirs.mkdirs()820 return dirs821def init_directories() -> Directories:822 global DATA_DIR, PERSISTENCE823 if DATA_DIR:824 # deprecation path: DATA_DIR being set means persistence is activated, but we're ignoring the path set in825 # DATA_DIR826 os.environ["PERSISTENCE"] = "1"827 PERSISTENCE = True828 if is_in_docker:829 dirs = Directories.for_container()830 else:831 dirs = Directories.for_host()832 if PERSISTENCE:833 if DATA_DIR:834 LOG.warning(835 "Persistence mode was activated using the DATA_DIR variable. DATA_DIR is deprecated and "836 "its value is ignored. The data is instead stored into %s in the LocalStack volume.",837 dirs.data,838 )839 # deprecation path840 DATA_DIR = dirs.data841 os.environ["DATA_DIR"] = dirs.data # still needed for external tools842 return dirs843# initialize directories844dirs: Directories845if LEGACY_DIRECTORIES:846 CLEAR_TMP_FOLDER = False847 dirs = init_legacy_directories()848else:...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!