PROJ Network Settings

pyproj.network.set_network_enabled

pyproj.network.set_network_enabled(active=None)

New in version 3.0.0.

Set whether PROJ network is enabled by default. This has the same behavior as the PROJ_NETWORK environment variable.

Parameters

active (bool, optional) – Default is None, which uses the system defaults for networking. If True, it will force the use of network for grids regardless of any other network setting. If False, it will force disable use of network for grids regardless of any other network setting.

pyproj.network.is_network_enabled

pyproj.network.is_network_enabled()

New in version 3.0.0.

bool:

If PROJ network is enabled by default.

pyproj.network.set_ca_bundle_path

pyproj.network.set_ca_bundle_path(ca_bundle_path: Optional[Union[pathlib.Path, str, bool]] = None) → None[source]

New in version 3.0.0.

Sets the path to the CA Bundle used by the curl built into PROJ when PROJ network is enabled..

Environment variables that can be used with PROJ 7.2+:

  • PROJ_CURL_CA_BUNDLE

  • CURL_CA_BUNDLE

  • SSL_CERT_FILE

Parameters

ca_bundle_path (Union[Path, str, bool, None], optional) – Default is None, which only uses the certifi package path as a fallback if the environment variables are not set. If a path is passed in, then that will be the path used. If it is set to True, then it will default to using the path provied by the certifi package. If it is set to False or an empty string then it will default to the system settings or environment variables.