Oxigraph CLI
============
[](https://crates.io/crates/oxigraph-cli)
[](https://crates.io/crates/oxigraph-cli)
[](https://anaconda.org/conda-forge/oxigraph-server)
[](https://github.com/oxigraph/oxigraph/actions)
[](https://gitter.im/oxigraph/community)
Oxigraph CLI is a graph database implementing the [SPARQL](https://www.w3.org/TR/sparql11-overview/) standard.
It is packaged as a command-line tool allowing to manipulate RDF files, query them using SPARQL...
It also allows spawning an HTTP server on top of the database.
Oxigraph is in heavy development, and SPARQL query evaluation has not been optimized yet.
Oxigraph provides different installation methods for Oxigraph CLI:
* [`cargo install`](#installation) (multiplatform)
* [A Docker image](#using-a-docker-image)
* [A Homebrew formula](#homebrew)
* [A Pypi package](https://pypi.org/project/oxigraph): with [UV](https://docs.astral.sh/uv/) just run `uvx oxigraph`
* [A conda-forge package](https://anaconda.org/conda-forge/oxigraph-server)
* [Pre-built binaries](https://github.com/oxigraph/oxigraph/releases/latest)
It is also usable as [a Rust library](https://crates.io/crates/oxigraph) and as [a Python library](https://pyoxigraph.readthedocs.io/).
Oxigraph implements the following specifications:
* [SPARQL 1.1 Query](https://www.w3.org/TR/sparql11-query/), [SPARQL 1.1 Update](https://www.w3.org/TR/sparql11-update/), and [SPARQL 1.1 Federated Query](https://www.w3.org/TR/sparql11-federated-query/).
* [Turtle](https://www.w3.org/TR/turtle/), [TriG](https://www.w3.org/TR/trig/), [N-Triples](https://www.w3.org/TR/n-triples/), [N-Quads](https://www.w3.org/TR/n-quads/), and [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) RDF serialization formats for both data ingestion and retrieval.
* [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/), [SPARQL 1.1 Query Results JSON Format](https://www.w3.org/TR/sparql11-results-json/) and [SPARQL 1.1 Query Results CSV and TSV Formats](https://www.w3.org/TR/sparql11-results-csv-tsv/).
* [SPARQL 1.1 Protocol](https://www.w3.org/TR/sparql11-protocol/#query-operation) and [SPARQL 1.1 Graph Store HTTP Protocol](https://www.w3.org/TR/sparql11-http-rdf-update/).
A preliminary benchmark [is provided](../bench/README.md).
Note that Oxigraph CLI was previously named Oxigraph Server before version 0.4. Older versions are available under [this name](https://crates.io/crates/oxigraph_server).
[](https://repology.org/project/oxigraph/versions)
## Installation
You need to have [a recent stable version of Rust and Cargo installed](https://www.rust-lang.org/tools/install).
To download, build, and install the latest released version run `cargo install oxigraph-cli`.
There is no need to clone the git repository.
To compile the command-line tool from source, clone this git repository including its submodules (`git clone --recursive https://github.com/oxigraph/oxigraph.git`), and execute `cargo build --release` in the `cli` directory to compile the full binary after having downloaded its dependencies.
It will create a fat binary in `target/release/oxigraph`.
Some build options (cargo features) are available:
- `rocksdb-pkg-config`: links against an already compiled rocksdb shared library found using [pkg-config](https://crates.io/crates/pkg-config).
- `native-tls`: Enables Oxigraph HTTP client for query federation using the host OS TLS stack (enabled by default).
- `rustls-native` Enables Oxigraph HTTP client for query federation using [Rustls](https://crates.io/crates/rustls) and the native certificates.
- `rustls-webpki` Enables Oxigraph HTTP client for query federation using [Rustls](https://crates.io/crates/rustls) and the [Common CA Database](https://www.ccadb.org/) certificates.
## Usage
Run `oxigraph serve --location my_data_storage_directory` to start the server where `my_data_storage_directory` is the directory where you want Oxigraph data to be stored. It listens by default on `localhost:7878`.
The server provides an HTML UI, based on [YASGUI](https://yasgui.triply.cc), with a form to execute SPARQL requests.
It provides the following REST actions:
* `/query` allows evaluating SPARQL queries against the server repository following the [SPARQL 1.1 Protocol](https://www.w3.org/TR/sparql11-protocol/#query-operation).
For example:
```bash
curl -X POST -H 'Content-Type:application/sparql-query' \
--data 'SELECT * WHERE { ?s ?p ?o } LIMIT 10' http://localhost:7878/query
```
This action supports content negotiation and could return [Turtle](https://www.w3.org/TR/turtle/), [N-Triples](https://www.w3.org/TR/n-triples/), [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/), [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/) and [SPARQL Query Results JSON Format](https://www.w3.org/TR/sparql11-results-json/).
* `/update` allows to execute SPARQL updates against the server repository following the [SPARQL 1.1 Protocol](https://www.w3.org/TR/sparql11-protocol/#update-operation).
For example:
```sh
curl -X POST -H 'Content-Type: application/sparql-update' \
--data 'DELETE WHERE { <http://example.com/s> ?p ?o }' http://localhost:7878/update
```
* `/store` allows to retrieve and change the server content using the [SPARQL 1.1 Graph Store HTTP Protocol](https://www.w3.org/TR/sparql11-http-rdf-update/).
For example:
```sh
curl -f -X POST -H 'Content-Type:application/n-triples' \
-T MY_FILE.nt "http://localhost:7878/store?graph=http://example.com/g"
```
will add the N-Triples file `MY_FILE.nt` to the server dataset inside of the `http://example.com/g` named graph.
[Turtle](https://www.w3.org/TR/turtle/), [N-Triples](https://www.w3.org/TR/n-triples/) and [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) are supported.
It is also possible to `POST`, `PUT` and `GET` the complete RDF dataset on the server using RDF dataset formats ([TriG](https://www.w3.org/TR/trig/) and [N-Quads](https://www.w3.org/TR/n-quads/)) against the `/store` endpoint.
For example:
```sh
curl -f -X POST -H 'Content-Type:application/n-quads' \
-T MY_FILE.nq http://localhost:7878/store
```
will add the N-Quads file `MY_FILE.nq` to the server dataset.
Use `oxigraph --help` to see the possible options when starting the server.
It is also possible to load RDF data offline using bulk loading:
`oxigraph load --location my_data_storage_directory --file my_file.nq`
## Using a Docker image
### Display the help menu
```sh
docker run --rm ghcr.io/oxigraph/oxigraph --help
```
### Run the Webserver
Expose the server on port `7878` of the host machine, and save data on the local `./data` folder
```sh
docker run --rm -v $PWD/data:/data -p 7878:7878 ghcr.io/oxigraph/oxigraph serve --location /data --bind 0.0.0.0:7878
```
You can then access it from your machine on port `7878`:
```sh
# Open the GUI in a browser
firefox http://localhost:7878
# Post some data
curl http://localhost:7878/store?default -H 'Content-Type: text/turtle' -T ./data.ttl
# Make a query
curl -X POST -H 'Accept: application/sparql-results+json' -H 'Content-Type: application/sparql-query' --data 'SELECT * WHERE { ?s ?p ?o } LIMIT 10' http://localhost:7878/query
# Make an UPDATE
curl -X POST -H 'Content-Type: application/sparql-update' --data 'DELETE WHERE { <http://example.com/s> ?p ?o }' http://localhost:7878/update
```
### Run the Web server with basic authentication
It can be useful to make Oxigraph SPARQL endpoint available publicly, with a layer of authentication on `/update` to be able to add data.
You can do so by using a nginx basic authentication in an additional docker container with `docker-compose`. First create a `nginx.conf` file:
```nginx
daemon off;
events {
worker_connections 1024;
}
http {
server {
server_name localhost;
listen 7878;
rewrite ^/(.*) /$1 break;
proxy_ignore_client_abort on;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Access-Control-Allow-Origin "*";
location ~ ^(/|/query)$ {
proxy_pass http://oxigraph:7878;
proxy_pass_request_headers on;
}
location ~ ^(/update|/store)$ {
auth_basic "Oxigraph Administrator's Area";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://oxigraph:7878;
proxy_pass_request_headers on;
}
}
}
```
Then a `docker-compose.yml` in the same folder, you can change the default user and password in the `environment` section:
```yaml
version: "3"
services:
oxigraph:
image: ghcr.io/oxigraph/oxigraph:latest
## To build from local source code:
# build:
# context: .
# dockerfile: server/Dockerfile
volumes:
- ./data:/data
nginx-auth:
image: nginx:1.21.4
environment:
- OXIGRAPH_USER=oxigraph
- OXIGRAPH_PASSWORD=oxigraphy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
## For multiple users: uncomment this line to mount a pre-generated .htpasswd
# - ./.htpasswd:/etc/nginx/.htpasswd
ports:
- "7878:7878"
entrypoint: "bash -c 'echo -n $OXIGRAPH_USER: >> /etc/nginx/.htpasswd && echo $OXIGRAPH_PASSWORD | openssl passwd -stdin -apr1 >> /etc/nginx/.htpasswd && /docker-entrypoint.sh nginx'"
```
Once the `docker-compose.yaml` and `nginx.conf` are ready, start the Oxigraph server and nginx proxy for authentication on http://localhost:7878:
```sh
docker-compose up
```
Then it is possible to update the graph using basic authentication mechanisms. For example with `curl`: change `$OXIGRAPH_USER` and `$OXIGRAPH_PASSWORD`, or set them as environment variables, then run this command to insert a simple triple:
```sh
curl -X POST -u $OXIGRAPH_USER:$OXIGRAPH_PASSWORD -H 'Content-Type: application/sparql-update' --data 'INSERT DATA { <http://example.com/s> <http://example.com/p> <http://example.com/o> }' http://localhost:7878/update
```
In case you want to have multiple users, you can comment the `entrypoint:` line in the `docker-compose.yml` file, uncomment the `.htpasswd` volume, then generate each user in the `.htpasswd` file with this command:
```sh
htpasswd -Bbn $OXIGRAPH_USER $OXIGRAPH_PASSWORD >> .htpasswd
```
### Build the image
You could easily build your own Docker image by cloning this repository with its submodules, and going to the root folder:
```sh
git clone --recursive https://github.com/oxigraph/oxigraph.git
cd oxigraph
```
Then run this command to build the image locally:
````sh
docker build -t ghcr.io/oxigraph/oxigraph -f server/Dockerfile .
````
## Homebrew
Oxigraph maintains a [Homebrew](https://brew.sh) formula in [a custom tap](https://github.com/oxigraph/homebrew-oxigraph).
To install Oxigraph server using Homebrew do:
```sh
brew tap oxigraph/oxigraph
brew install oxigraph
```
It installs the `oxigraph` binary. [See the usage documentation to know how to use it](#usage).
## Systemd
It is possible to run Oxigraph in the background using systemd.
For that, you can use the following `oxigraph.service` file (it might be inserted into `/etc/systemd/system/` or `$HOME/.config/systemd/user`):
```ini
[Unit]
Description=Oxigraph database server
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
ExecStart=/PATH/TO/oxigraph serve --location /PATH/TO/OXIGRAPH/DATA
[Install]
WantedBy=multi-user.target
```
## Man pages and autocompletion
Autocompletion for various shells are generated on build in the `target/{debug,release}/build/oxigraph-cli-<hash>/out/complete` directory.
Similarly, man pages are generated in the `target/{debug,release}/build/oxigraph-cli-<hash>/out/man` directory.
## Migration guide
### From 0.2 to 0.3
* The cli API has been completely rewritten. To start the server run `oxigraph serve --location MY_STORAGE` instead of `oxigraph --file MY_STORAGE`.
* Fast data bulk loading is now supported using `oxigraph load --location MY_STORAGE --file MY_FILE`. The file format is guessed from the extension (`.nt`, `.ttl`, `.nq`, ...).
* [RDF-star](https://w3c.github.io/rdf-star/cg-spec/2021-12-17.html) is now implemented.
* All operations are now transactional using the "repeatable read" isolation level:
the store only exposes changes that have been "committed" (i.e. no partial writes)
and the exposed state does not change for the complete duration of a read operation (e.g. a SPARQL query) or a read/write operation (e.g. a SPARQL update).
## Help
Feel free to use [GitHub discussions](https://github.com/oxigraph/oxigraph/discussions) or [the Gitter chat](https://gitter.im/oxigraph/community) to ask questions or talk about Oxigraph.
[Bug reports](https://github.com/oxigraph/oxigraph/issues) are also very welcome.
If you need advanced support or are willing to pay to get some extra features, feel free to reach out to [Tpt](https://github.com/Tpt).
## License
This project is licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](../LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](../LICENSE-MIT) or
http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Raw data
{
"_id": null,
"home_page": "https://oxigraph.org/cli/",
"name": "oxigraph",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "RDF, SPARQL, graph-database, database",
"author": "Tpt <thomas@pellissier-tanon.fr>",
"author_email": "Tpt <thomas@pellissier-tanon.fr>",
"download_url": "https://files.pythonhosted.org/packages/fc/a2/f0c17ead964c71d4f808f1e2c3fed3526c902e2cb8c77a33e4bab87d51b8/oxigraph-0.4.11.tar.gz",
"platform": null,
"description": "Oxigraph CLI\n============\n\n[](https://crates.io/crates/oxigraph-cli)\n[](https://crates.io/crates/oxigraph-cli)\n[](https://anaconda.org/conda-forge/oxigraph-server)\n[](https://github.com/oxigraph/oxigraph/actions)\n[](https://gitter.im/oxigraph/community)\n\nOxigraph CLI is a graph database implementing the [SPARQL](https://www.w3.org/TR/sparql11-overview/) standard.\nIt is packaged as a command-line tool allowing to manipulate RDF files, query them using SPARQL...\nIt also allows spawning an HTTP server on top of the database.\n\nOxigraph is in heavy development, and SPARQL query evaluation has not been optimized yet.\n\nOxigraph provides different installation methods for Oxigraph CLI:\n* [`cargo install`](#installation) (multiplatform)\n* [A Docker image](#using-a-docker-image)\n* [A Homebrew formula](#homebrew)\n* [A Pypi package](https://pypi.org/project/oxigraph): with [UV](https://docs.astral.sh/uv/) just run `uvx oxigraph`\n* [A conda-forge package](https://anaconda.org/conda-forge/oxigraph-server)\n* [Pre-built binaries](https://github.com/oxigraph/oxigraph/releases/latest)\n\nIt is also usable as [a Rust library](https://crates.io/crates/oxigraph) and as [a Python library](https://pyoxigraph.readthedocs.io/).\n\nOxigraph implements the following specifications:\n* [SPARQL 1.1 Query](https://www.w3.org/TR/sparql11-query/), [SPARQL 1.1 Update](https://www.w3.org/TR/sparql11-update/), and [SPARQL 1.1 Federated Query](https://www.w3.org/TR/sparql11-federated-query/).\n* [Turtle](https://www.w3.org/TR/turtle/), [TriG](https://www.w3.org/TR/trig/), [N-Triples](https://www.w3.org/TR/n-triples/), [N-Quads](https://www.w3.org/TR/n-quads/), and [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) RDF serialization formats for both data ingestion and retrieval.\n* [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/), [SPARQL 1.1 Query Results JSON Format](https://www.w3.org/TR/sparql11-results-json/) and [SPARQL 1.1 Query Results CSV and TSV Formats](https://www.w3.org/TR/sparql11-results-csv-tsv/).\n* [SPARQL 1.1 Protocol](https://www.w3.org/TR/sparql11-protocol/#query-operation) and [SPARQL 1.1 Graph Store HTTP Protocol](https://www.w3.org/TR/sparql11-http-rdf-update/).\n\nA preliminary benchmark [is provided](../bench/README.md).\n\nNote that Oxigraph CLI was previously named Oxigraph Server before version 0.4. Older versions are available under [this name](https://crates.io/crates/oxigraph_server).\n\n[](https://repology.org/project/oxigraph/versions)\n\n## Installation\n\nYou need to have [a recent stable version of Rust and Cargo installed](https://www.rust-lang.org/tools/install).\n\nTo download, build, and install the latest released version run `cargo install oxigraph-cli`.\nThere is no need to clone the git repository.\n\nTo compile the command-line tool from source, clone this git repository including its submodules (`git clone --recursive https://github.com/oxigraph/oxigraph.git`), and execute `cargo build --release` in the `cli` directory to compile the full binary after having downloaded its dependencies.\nIt will create a fat binary in `target/release/oxigraph`.\n\nSome build options (cargo features) are available:\n- `rocksdb-pkg-config`: links against an already compiled rocksdb shared library found using [pkg-config](https://crates.io/crates/pkg-config).\n- `native-tls`: Enables Oxigraph HTTP client for query federation using the host OS TLS stack (enabled by default).\n- `rustls-native` Enables Oxigraph HTTP client for query federation using [Rustls](https://crates.io/crates/rustls) and the native certificates.\n- `rustls-webpki` Enables Oxigraph HTTP client for query federation using [Rustls](https://crates.io/crates/rustls) and the [Common CA Database](https://www.ccadb.org/) certificates.\n\n\n## Usage\n\nRun `oxigraph serve --location my_data_storage_directory` to start the server where `my_data_storage_directory` is the directory where you want Oxigraph data to be stored. It listens by default on `localhost:7878`.\n\nThe server provides an HTML UI, based on [YASGUI](https://yasgui.triply.cc), with a form to execute SPARQL requests.\n\nIt provides the following REST actions:\n* `/query` allows evaluating SPARQL queries against the server repository following the [SPARQL 1.1 Protocol](https://www.w3.org/TR/sparql11-protocol/#query-operation).\n For example:\n ```bash\n curl -X POST -H 'Content-Type:application/sparql-query' \\\n --data 'SELECT * WHERE { ?s ?p ?o } LIMIT 10' http://localhost:7878/query\n ```\n This action supports content negotiation and could return [Turtle](https://www.w3.org/TR/turtle/), [N-Triples](https://www.w3.org/TR/n-triples/), [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/), [SPARQL Query Results XML Format](https://www.w3.org/TR/rdf-sparql-XMLres/) and [SPARQL Query Results JSON Format](https://www.w3.org/TR/sparql11-results-json/).\n* `/update` allows to execute SPARQL updates against the server repository following the [SPARQL 1.1 Protocol](https://www.w3.org/TR/sparql11-protocol/#update-operation).\n For example:\n ```sh\n curl -X POST -H 'Content-Type: application/sparql-update' \\\n --data 'DELETE WHERE { <http://example.com/s> ?p ?o }' http://localhost:7878/update\n ```\n* `/store` allows to retrieve and change the server content using the [SPARQL 1.1 Graph Store HTTP Protocol](https://www.w3.org/TR/sparql11-http-rdf-update/).\n For example:\n ```sh\n curl -f -X POST -H 'Content-Type:application/n-triples' \\\n -T MY_FILE.nt \"http://localhost:7878/store?graph=http://example.com/g\"\n ```\n will add the N-Triples file `MY_FILE.nt` to the server dataset inside of the `http://example.com/g` named graph.\n [Turtle](https://www.w3.org/TR/turtle/), [N-Triples](https://www.w3.org/TR/n-triples/) and [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) are supported.\n It is also possible to `POST`, `PUT` and `GET` the complete RDF dataset on the server using RDF dataset formats ([TriG](https://www.w3.org/TR/trig/) and [N-Quads](https://www.w3.org/TR/n-quads/)) against the `/store` endpoint.\n For example:\n ```sh\n curl -f -X POST -H 'Content-Type:application/n-quads' \\\n -T MY_FILE.nq http://localhost:7878/store\n ```\n will add the N-Quads file `MY_FILE.nq` to the server dataset.\n\nUse `oxigraph --help` to see the possible options when starting the server.\n\nIt is also possible to load RDF data offline using bulk loading:\n`oxigraph load --location my_data_storage_directory --file my_file.nq`\n\n## Using a Docker image\n\n### Display the help menu\n```sh\ndocker run --rm ghcr.io/oxigraph/oxigraph --help\n```\n\n### Run the Webserver\nExpose the server on port `7878` of the host machine, and save data on the local `./data` folder\n```sh\ndocker run --rm -v $PWD/data:/data -p 7878:7878 ghcr.io/oxigraph/oxigraph serve --location /data --bind 0.0.0.0:7878\n```\n\nYou can then access it from your machine on port `7878`:\n\n```sh\n# Open the GUI in a browser\nfirefox http://localhost:7878\n\n# Post some data\ncurl http://localhost:7878/store?default -H 'Content-Type: text/turtle' -T ./data.ttl\n\n# Make a query\ncurl -X POST -H 'Accept: application/sparql-results+json' -H 'Content-Type: application/sparql-query' --data 'SELECT * WHERE { ?s ?p ?o } LIMIT 10' http://localhost:7878/query\n\n# Make an UPDATE\ncurl -X POST -H 'Content-Type: application/sparql-update' --data 'DELETE WHERE { <http://example.com/s> ?p ?o }' http://localhost:7878/update\n```\n\n### Run the Web server with basic authentication\n\nIt can be useful to make Oxigraph SPARQL endpoint available publicly, with a layer of authentication on `/update` to be able to add data.\n\nYou can do so by using a nginx basic authentication in an additional docker container with `docker-compose`. First create a `nginx.conf` file:\n\n```nginx\ndaemon off;\nevents {\n worker_connections 1024;\n}\nhttp {\n server {\n server_name localhost;\n listen 7878;\n rewrite ^/(.*) /$1 break;\n proxy_ignore_client_abort on;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header Host $http_host;\n proxy_set_header Access-Control-Allow-Origin \"*\";\n location ~ ^(/|/query)$ {\n proxy_pass http://oxigraph:7878;\n proxy_pass_request_headers on;\n }\n location ~ ^(/update|/store)$ {\n auth_basic \"Oxigraph Administrator's Area\";\n auth_basic_user_file /etc/nginx/.htpasswd; \n proxy_pass http://oxigraph:7878;\n proxy_pass_request_headers on;\n }\n }\n}\n```\n\nThen a `docker-compose.yml` in the same folder, you can change the default user and password in the `environment` section:\n\n```yaml\nversion: \"3\"\nservices:\n oxigraph:\n image: ghcr.io/oxigraph/oxigraph:latest\n ## To build from local source code:\n # build:\n # context: .\n # dockerfile: server/Dockerfile\n volumes:\n - ./data:/data\n\n nginx-auth:\n image: nginx:1.21.4\n environment:\n - OXIGRAPH_USER=oxigraph\n - OXIGRAPH_PASSWORD=oxigraphy\n volumes:\n - ./nginx.conf:/etc/nginx/nginx.conf\n ## For multiple users: uncomment this line to mount a pre-generated .htpasswd \n # - ./.htpasswd:/etc/nginx/.htpasswd\n ports:\n - \"7878:7878\"\n entrypoint: \"bash -c 'echo -n $OXIGRAPH_USER: >> /etc/nginx/.htpasswd && echo $OXIGRAPH_PASSWORD | openssl passwd -stdin -apr1 >> /etc/nginx/.htpasswd && /docker-entrypoint.sh nginx'\"\n```\n\nOnce the `docker-compose.yaml` and `nginx.conf` are ready, start the Oxigraph server and nginx proxy for authentication on http://localhost:7878:\n\n```sh\ndocker-compose up\n```\n\nThen it is possible to update the graph using basic authentication mechanisms. For example with `curl`: change `$OXIGRAPH_USER` and `$OXIGRAPH_PASSWORD`, or set them as environment variables, then run this command to insert a simple triple:\n\n```sh\ncurl -X POST -u $OXIGRAPH_USER:$OXIGRAPH_PASSWORD -H 'Content-Type: application/sparql-update' --data 'INSERT DATA { <http://example.com/s> <http://example.com/p> <http://example.com/o> }' http://localhost:7878/update\n```\n\nIn case you want to have multiple users, you can comment the `entrypoint:` line in the `docker-compose.yml` file, uncomment the `.htpasswd` volume, then generate each user in the `.htpasswd` file with this command:\n\n```sh\nhtpasswd -Bbn $OXIGRAPH_USER $OXIGRAPH_PASSWORD >> .htpasswd\n```\n\n### Build the image\n\nYou could easily build your own Docker image by cloning this repository with its submodules, and going to the root folder:\n\n```sh\ngit clone --recursive https://github.com/oxigraph/oxigraph.git\ncd oxigraph\n```\n\nThen run this command to build the image locally:\n\n````sh\ndocker build -t ghcr.io/oxigraph/oxigraph -f server/Dockerfile .\n````\n\n## Homebrew\n\nOxigraph maintains a [Homebrew](https://brew.sh) formula in [a custom tap](https://github.com/oxigraph/homebrew-oxigraph).\n\nTo install Oxigraph server using Homebrew do:\n```sh\nbrew tap oxigraph/oxigraph\nbrew install oxigraph\n```\nIt installs the `oxigraph` binary. [See the usage documentation to know how to use it](#usage).\n\n\n## Systemd\n\nIt is possible to run Oxigraph in the background using systemd.\n\nFor that, you can use the following `oxigraph.service` file (it might be inserted into `/etc/systemd/system/` or `$HOME/.config/systemd/user`):\n```ini\n[Unit]\nDescription=Oxigraph database server\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nType=notify\nExecStart=/PATH/TO/oxigraph serve --location /PATH/TO/OXIGRAPH/DATA\n\n[Install]\nWantedBy=multi-user.target\n```\n\n## Man pages and autocompletion\n\nAutocompletion for various shells are generated on build in the `target/{debug,release}/build/oxigraph-cli-<hash>/out/complete` directory.\nSimilarly, man pages are generated in the `target/{debug,release}/build/oxigraph-cli-<hash>/out/man` directory.\n\n## Migration guide\n\n### From 0.2 to 0.3\n* The cli API has been completely rewritten. To start the server run `oxigraph serve --location MY_STORAGE` instead of `oxigraph --file MY_STORAGE`.\n* Fast data bulk loading is now supported using `oxigraph load --location MY_STORAGE --file MY_FILE`. The file format is guessed from the extension (`.nt`, `.ttl`, `.nq`, ...).\n* [RDF-star](https://w3c.github.io/rdf-star/cg-spec/2021-12-17.html) is now implemented.\n* All operations are now transactional using the \"repeatable read\" isolation level:\n the store only exposes changes that have been \"committed\" (i.e. no partial writes)\n and the exposed state does not change for the complete duration of a read operation (e.g. a SPARQL query) or a read/write operation (e.g. a SPARQL update).\n\n\n## Help\n\nFeel free to use [GitHub discussions](https://github.com/oxigraph/oxigraph/discussions) or [the Gitter chat](https://gitter.im/oxigraph/community) to ask questions or talk about Oxigraph.\n[Bug reports](https://github.com/oxigraph/oxigraph/issues) are also very welcome.\n\nIf you need advanced support or are willing to pay to get some extra features, feel free to reach out to [Tpt](https://github.com/Tpt).\n\n\n## License\n\nThis project is licensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](../LICENSE-APACHE) or\n http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license ([LICENSE-MIT](../LICENSE-MIT) or\n http://opensource.org/licenses/MIT)\n\nat your option.\n\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n",
"bugtrack_url": null,
"license": "MIT OR Apache-2.0",
"summary": "Oxigraph CLI tool and SPARQL HTTP server",
"version": "0.4.11",
"project_urls": {
"Changelog": "https://github.com/oxigraph/oxigraph/blob/main/CHANGELOG.md",
"Documentation": "https://oxigraph.org/",
"Homepage": "https://oxigraph.org/",
"Source": "https://github.com/oxigraph/oxigraph/tree/main/cli",
"Tracker": "https://github.com/oxigraph/oxigraph/issues"
},
"split_keywords": [
"rdf",
" sparql",
" graph-database",
" database"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6da90ddc9266a99a6ee2d860a80b0d9b7e016796ae50a51064c73c402abb3af4",
"md5": "d6cee5d1c6438039444453a67d2066c6",
"sha256": "816073269929487ff4590100653e23718bb5723a384694ad6e3c1ecfc0753f0e"
},
"downloads": -1,
"filename": "oxigraph-0.4.11-py3-none-macosx_10_14_x86_64.whl",
"has_sig": false,
"md5_digest": "d6cee5d1c6438039444453a67d2066c6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6327905,
"upload_time": "2025-05-21T20:54:04",
"upload_time_iso_8601": "2025-05-21T20:54:04.358834Z",
"url": "https://files.pythonhosted.org/packages/6d/a9/0ddc9266a99a6ee2d860a80b0d9b7e016796ae50a51064c73c402abb3af4/oxigraph-0.4.11-py3-none-macosx_10_14_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "02c9454aaa6eab5978cc44b0cf05fdf5775b85f60568c23fafe001d7f0dc6c4f",
"md5": "fc82f5f1082d75ee8b881a59df003ab7",
"sha256": "ccdfe775fd5d2817af22e9265f03f8253ed8da6e71c0f2c2b4ae222719e576fd"
},
"downloads": -1,
"filename": "oxigraph-0.4.11-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "fc82f5f1082d75ee8b881a59df003ab7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5773572,
"upload_time": "2025-05-21T20:54:06",
"upload_time_iso_8601": "2025-05-21T20:54:06.063047Z",
"url": "https://files.pythonhosted.org/packages/02/c9/454aaa6eab5978cc44b0cf05fdf5775b85f60568c23fafe001d7f0dc6c4f/oxigraph-0.4.11-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "32665199176db0348eea6946f34d420da10b14e8eedc9b593f2abc5f10b6fcc7",
"md5": "925f1781739a81316cb6aeedbffff341",
"sha256": "f3600a61894a20a0dd948fe3bd0646a83adb7bbf3452e55dfb9916eb7a03fb7a"
},
"downloads": -1,
"filename": "oxigraph-0.4.11-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "925f1781739a81316cb6aeedbffff341",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7288694,
"upload_time": "2025-05-21T20:54:08",
"upload_time_iso_8601": "2025-05-21T20:54:08.457737Z",
"url": "https://files.pythonhosted.org/packages/32/66/5199176db0348eea6946f34d420da10b14e8eedc9b593f2abc5f10b6fcc7/oxigraph-0.4.11-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8418d6551b605bc97b963ebf5c94678160fb02e0ff713d100c2a5f4c2706320a",
"md5": "c5dc11df3f988c07b97b0da88fc4a8c0",
"sha256": "cfa23e59907c47bb9198888a6a17dd4762d40b38c3ae9e68db5ab6e5bdc9469c"
},
"downloads": -1,
"filename": "oxigraph-0.4.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "c5dc11df3f988c07b97b0da88fc4a8c0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7679259,
"upload_time": "2025-05-21T20:54:10",
"upload_time_iso_8601": "2025-05-21T20:54:10.581898Z",
"url": "https://files.pythonhosted.org/packages/84/18/d6551b605bc97b963ebf5c94678160fb02e0ff713d100c2a5f4c2706320a/oxigraph-0.4.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b20cd7236a0b603d1c938ad48be20d796e71e30f5a1f19ef72fc1214845bc8c0",
"md5": "4c106709d0ef9ec32097ea13a73cfb3e",
"sha256": "ac0725641b317ec487c7f996f8cdb8a5a25b01f27a767c9cc6535c149d717f3e"
},
"downloads": -1,
"filename": "oxigraph-0.4.11-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "4c106709d0ef9ec32097ea13a73cfb3e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5356629,
"upload_time": "2025-05-21T20:54:12",
"upload_time_iso_8601": "2025-05-21T20:54:12.505661Z",
"url": "https://files.pythonhosted.org/packages/b2/0c/d7236a0b603d1c938ad48be20d796e71e30f5a1f19ef72fc1214845bc8c0/oxigraph-0.4.11-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fca2f0c17ead964c71d4f808f1e2c3fed3526c902e2cb8c77a33e4bab87d51b8",
"md5": "6d399f3688edd284d08130aa821c1edc",
"sha256": "4df60e793afa1ad9dcb1e63960648d916abb784fb488e6f1e2397b6676efff13"
},
"downloads": -1,
"filename": "oxigraph-0.4.11.tar.gz",
"has_sig": false,
"md5_digest": "6d399f3688edd284d08130aa821c1edc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6158812,
"upload_time": "2025-05-21T20:54:14",
"upload_time_iso_8601": "2025-05-21T20:54:14.261373Z",
"url": "https://files.pythonhosted.org/packages/fc/a2/f0c17ead964c71d4f808f1e2c3fed3526c902e2cb8c77a33e4bab87d51b8/oxigraph-0.4.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-05-21 20:54:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "oxigraph",
"github_project": "oxigraph",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "oxigraph"
}