get_geodatastore#
- get_geodatastore() CloudPath | Path [source]#
Get database directory.
If
USE_S3_STORAGE
is set to1
, this function returnsAnyPath("s3://sertit-geodatastore")
.If
USE_S3_STORAGE
is set to0
it returns:AnyPath("//ds2/database02/BASES_DE_DONNEES")
if code is running on WindowsAnyPath(/home/ds2_db2/BASE_DE_DONNESS`)
if code is running in a Docker containers on Windows
- Returns:
Database directory
- Return type:
AnyPath
Example
Don’t set manually
USE_S3_STORAGE
withos.environ
!>>> from sertit.unistra import get_geodatastore >>> import os >>> os.environ["USE_S3_STORAGE"] = "1" >>> print(get_geodatastore()) s3://sertit-geodatastore
>>> from sertit.unistra import get_geodatastore >>> import os >>> os.environ["USE_S3_STORAGE"] = "0" >>> print(get_geodatastore()) //ds2/database02/BASES_DE_DONNEES/GLOBAL