Fuseki commands¶
kurra.cli.commands.db.fuseki ¶
CLI commands for administering a Fuseki database.
ping_command ¶
ping_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), username: str = None, password: str = None, timeout: int = 60) -> None
Check if the Fuseki server is alive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
server_command ¶
server_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), username: str = None, password: str = None, timeout: int = 60) -> None
Get basic Fuseki server info.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
stats_command ¶
stats_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), dataset_name: str = None, username: str = None, password: str = None, timeout: int = 60) -> None
Request statistics for all datasets, or one named dataset, on the Fuseki server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
dataset_name
|
str
|
The dataset to get statistics for. If not given, statistics for all datasets are returned. |
None
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
backup_command ¶
backup_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), dataset_name: str = typer.Argument(..., help='The name of the dataset to back up'), username: str = None, password: str = None, timeout: int = 60) -> None
Ask the Fuseki server to create a backup of a dataset.
NOTE: The associated library function is not yet implemented, so this command is not currently available through the CLI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
dataset_name
|
str
|
The name of the dataset to back up. |
Argument(..., help='The name of the dataset to back up')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
backups_list_command ¶
backups_list_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), username: str = None, password: str = None, timeout: int = 60) -> None
List all existing backups on the Fuseki server.
NOTE: The related backup library function is not yet implemented, so this command is not currently available through the CLI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
sleep_command ¶
sleep_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), username: str = None, password: str = None, timeout: int = 60) -> None
Tell the Fuseki server to sleep.
NOTE: The associated library function is not yet implemented, so this command is not currently available through the CLI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
tasks_command ¶
tasks_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), task_name: str = None, username: str = None, password: str = None, timeout: int = 60) -> None
List tasks currently running on the Fuseki server, or get one named task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
task_name
|
str
|
The task to get. If not given, all running tasks are listed. |
None
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
metrics_command ¶
metrics_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), username: str = None, password: str = None, timeout: int = 60) -> None
Get metrics for the Fuseki server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
describe_command ¶
describe_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), username: str = None, password: str = None, timeout: int = 60) -> None
Get the list of datasets on the Fuseki server, or describe one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
create_command ¶
create_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), dataset_name: str | None = typer.Argument(None, help='The name of the dataset to create'), dataset_type: str = typer.Option('tdb2', help=f'Dataset type. Options: {dataset_type_options}'), config: Path | None = typer.Option(None, help='Assembler file'), username: str = None, password: str = None, timeout: int = 60) -> None
Create a new dataset on the Fuseki server.
Either dataset_name or config must be given, not both.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
dataset_name
|
str | None
|
The name of the dataset to create, using |
Argument(None, help='The name of the dataset to create')
|
dataset_type
|
str
|
The dataset type to create, when |
Option('tdb2', help=f'Dataset type. Options: {dataset_type_options}')
|
config
|
Path | None
|
An assembler file describing the dataset to create, as an alternative to |
Option(None, help='Assembler file')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
BadParameter
|
If both |
Exception
|
If the request to the Fuseki server fails. |
Source code in kurra/cli/commands/db/fuseki.py
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | |
delete_command ¶
delete_command(fuseki_url: str = typer.Argument(..., help='Fuseki base URL. E.g. http://localhost:3030'), dataset_name: str = typer.Argument(..., help='The name of the dataset to delete'), username: str = None, password: str = None, timeout: int = 60)
Delete a dataset from the Fuseki server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fuseki_url
|
str
|
Fuseki base URL. E.g. http://localhost:3030 |
Argument(..., help='Fuseki base URL. E.g. http://localhost:3030')
|
dataset_name
|
str
|
The name of the dataset to delete. |
Argument(..., help='The name of the dataset to delete')
|
username
|
str
|
Fuseki username, if the server requires authentication. |
None
|
password
|
str
|
Fuseki password, if the server requires authentication. |
None
|
timeout
|
int
|
Timeout per request, in seconds. |
60
|
Raises:
| Type | Description |
|---|---|
FusekiError
|
If the dataset fails to delete. |