Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added openeo production connection #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/openeo_classification/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

_default_url = "openeo-dev.vito.be"


def set_backend(url):
_default_url = url

Expand All @@ -14,7 +15,7 @@ def _cached_connection(url) -> Connection:
return openeo.connect(url).authenticate_oidc()


def connection(url = _default_url) -> Connection:
def connection(url=_default_url) -> Connection:
"""
Returns an authenticated openEO connection.
Connects to openEO platform by default, but others can be used as well by specifying the url.
Expand All @@ -25,6 +26,8 @@ def connection(url = _default_url) -> Connection:
c = _cached_connection(url)
return c

terrascope_dev = partial(connection,"openeo-dev.vito.be")
openeo_platform = partial(connection,"openeo.cloud")
creo = partial(connection,"openeo-dev.creo.vito.be")

terrascope_dev = partial(connection, "openeo-dev.vito.be")
openeo_platform = partial(connection, "openeo.cloud")
creo = partial(connection, "openeo-dev.creo.vito.be")
openeo_prod = partial(connection, "openeo.vito.be")