mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 15:01:00 +02:00
release/v2.4 -> master (#844)
This commit is contained in:
parent
a24df8e990
commit
89cabee1b4
386 changed files with 7202 additions and 5741 deletions
|
|
@ -9,10 +9,11 @@ from trustgraph.api.types import ConfigKey
|
|||
|
||||
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
|
||||
default_token = os.getenv("TRUSTGRAPH_TOKEN", None)
|
||||
default_workspace = os.getenv("TRUSTGRAPH_WORKSPACE", "default")
|
||||
|
||||
def delete_config_item(url, config_type, key, token=None):
|
||||
def delete_config_item(url, config_type, key, token=None, workspace="default"):
|
||||
|
||||
api = Api(url, token=token).config()
|
||||
api = Api(url, token=token, workspace=workspace).config()
|
||||
|
||||
config_key = ConfigKey(type=config_type, key=key)
|
||||
api.delete([config_key])
|
||||
|
|
@ -50,6 +51,12 @@ def main():
|
|||
help='Authentication token (default: $TRUSTGRAPH_TOKEN)',
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'-w', '--workspace',
|
||||
default=default_workspace,
|
||||
help=f'Workspace (default: {default_workspace})',
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
|
|
@ -59,6 +66,8 @@ def main():
|
|||
config_type=args.type,
|
||||
key=args.key,
|
||||
token=args.token,
|
||||
|
||||
workspace=args.workspace,
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue