-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,445 additions
and
534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Marketplace URL | ||
MP_HOST="https://dataspace.reaxpro.eu" | ||
# Access token for markeplace connection. Need to change time to time when expired | ||
MP_ACCESS_TOKEN=.... | ||
|
||
# Env variables needed for data-sink connection otherwise optional | ||
# Client-ID of the datasink application | ||
CLIENT_ID="2c791805-ea52-4446-af97-80c0355a73b4" | ||
|
||
# optional: if incase if we want to get access_token directly from key_cloak | ||
KEYCLOAK_SERVER_URL="https://dataspace.reaxpro.eu/auth/" | ||
KEYCLOAK_CLIENT_ID=.... | ||
KEYCLOAK_REALM_NAME=.... | ||
KEYCLOAK_CLIENT_SECRET_KEY=.... | ||
MARKETPLACE_USERNAME=.... | ||
MARKETPLACE_PASSWORD=.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.get_collection_dcat(collection_name="c1") | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.get_dataset_dcat(collection_name="c1", dataset_name="d1") | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.delete_collection(collection_name="c1") | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.delete_dataset(collection_name="c1", dataset_name="d1") | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.download_dataset( | ||
collection_name="upload_file_example", | ||
dataset_name="file3.txt", | ||
targetdir="/root/symphony/reaxpro", | ||
raise_if_directory_not_empty=False, | ||
) | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.download_datasets_from_collection( | ||
collection_name="Simulation_folder9", | ||
targetdir="/root/symphony/reaxpro", | ||
raise_if_directory_not_empty=False, | ||
) | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.list_collections() | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.list_datasets(collection_name="c1") | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
query = """SELECT ?subject ?predicate ?object WHERE {{ ?subject ?predicate ?object . }} LIMIT 5""" | ||
with MPSession() as test: | ||
objects = test.query(query=query) | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
query = "SELECT ?subject ?predicate ?object WHERE {{ ?subject ?predicate ?object . }} LIMIT 5" | ||
with MPSession() as test: | ||
objects = test.query_dataset(collection_name="c1", dataset_name="d1", query=query) | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.create_dataset_from_path( | ||
path="/root/symphony/reaxpro/Simulation_folder9/file3.txt", | ||
collection_name="ams_wrapper9", | ||
) | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from marketplace.data_sink_client.session import MPSession | ||
|
||
with MPSession() as test: | ||
objects = test.create_datasets_from_sourcedir( | ||
sourcedir="/root/symphony/reaxpro/Simulation_folder9", | ||
collection_name="Simulation_folder1", | ||
) | ||
print(objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.