An API server to store and serve the data extracted by nixpkgs-graph-explorer core.
poetry install --only main
This package comes with a command line utility to load a JSONL file of Nix derivations, where each line follows derivation.schema.json
.
To extract such JSONL, see the core
package instructions.
poetry run python -m explorer.api.ingest PATH_TO_FILE
or to ingest from stdin:
poetry run python -m explorer.api.ingest -
Use the Nix development shell provided in this repository, see ../README.md#use-nix
poetry install
The API server expects Gremlin Server and Postgres to be available. You can launch these with the Docker Compose file in the project's root directory:
# From the repository root folder
docker-compose --profile db up
To launch the app with hot reloading for fast iteration, use:
poetry run uvicorn explorer.api:app --port 5000 --reload
The project uses pytest:
poetry run pytest