[{"id": "installation:installation-docker", "page": "installation", "ref": "installation-docker", "title": "Using Docker", "content": "A Docker image containing the latest release of Datasette is published to Docker\n                    Hub here:  https://hub.docker.com/r/datasetteproject/datasette/ \n                 If you have Docker installed (for example with  Docker for Mac  on OS X) you can download and run this\n                    image like so: \n                 docker run -p 8001:8001 -v `pwd`:/mnt \\\n    datasetteproject/datasette \\\n    datasette -p 8001 -h 0.0.0.0 /mnt/fixtures.db \n                 This will start an instance of Datasette running on your machine's port 8001,\n                    serving the  fixtures.db  file in your current directory. \n                 Now visit  http://127.0.0.1:8001/  to access Datasette. \n                 (You can download a copy of  fixtures.db  from\n                     https://latest.datasette.io/fixtures.db  ) \n                 To upgrade to the most recent release of Datasette, run the following: \n                 docker pull datasetteproject/datasette", "breadcrumbs": "[\"Installation\", \"Advanced installation options\"]", "references": "[{\"href\": \"https://hub.docker.com/r/datasetteproject/datasette/\", \"label\": \"https://hub.docker.com/r/datasetteproject/datasette/\"}, {\"href\": \"https://www.docker.com/docker-mac\", \"label\": \"Docker for Mac\"}, {\"href\": \"http://127.0.0.1:8001/\", \"label\": \"http://127.0.0.1:8001/\"}, {\"href\": \"https://latest.datasette.io/fixtures.db\", \"label\": \"https://latest.datasette.io/fixtures.db\"}]"}, {"id": "installation:installation-pipx", "page": "installation", "ref": "installation-pipx", "title": "Using pipx", "content": "pipx  is a tool for installing Python software with all of its dependencies in an isolated environment, to ensure that they will not conflict with any other installed Python software. \n                 If you use  Homebrew  on macOS you can install pipx like this: \n                 brew install pipx\npipx ensurepath \n                 Without Homebrew you can install it like so: \n                 python3 -m pip install --user pipx\npython3 -m pipx ensurepath \n                 The  pipx ensurepath  command configures your shell to ensure it can find commands that have been installed by pipx - generally by making sure  ~/.local/bin  has been added to your  PATH . \n                 Once pipx is installed you can use it to install Datasette like this: \n                 pipx install datasette \n                 Then run  datasette --version  to confirm that it has been successfully installed.", "breadcrumbs": "[\"Installation\", \"Advanced installation options\"]", "references": "[{\"href\": \"https://pipxproject.github.io/pipx/\", \"label\": \"pipx\"}, {\"href\": \"https://brew.sh/\", \"label\": \"Homebrew\"}]"}, {"id": "installation:installing-plugins", "page": "installation", "ref": "installing-plugins", "title": "Installing plugins", "content": "If you want to install plugins into your local Datasette Docker image you can do\n                        so using the following recipe. This will install the plugins and then save a\n                        brand new local image called  datasette-with-plugins : \n                     docker run datasetteproject/datasette \\\n    pip install datasette-vega\n\ndocker commit $(docker ps -lq) datasette-with-plugins \n                     You can now run the new custom image like so: \n                     docker run -p 8001:8001 -v `pwd`:/mnt \\\n    datasette-with-plugins \\\n    datasette -p 8001 -h 0.0.0.0 /mnt/fixtures.db \n                     You can confirm that the plugins are installed by visiting\n                         http://127.0.0.1:8001/-/plugins \n                     Some plugins such as  datasette-ripgrep  may need additional system packages. You can install these by running  apt-get install  inside the container: \n                     docker run datasette-057a0 bash -c '\n    apt-get update &&\n    apt-get install ripgrep &&\n    pip install datasette-ripgrep'\n\ndocker commit $(docker ps -lq) datasette-with-ripgrep", "breadcrumbs": "[\"Installation\", \"Advanced installation options\", \"Using Docker\"]", "references": "[{\"href\": \"http://127.0.0.1:8001/-/plugins\", \"label\": \"http://127.0.0.1:8001/-/plugins\"}, {\"href\": \"https://datasette.io/plugins/datasette-ripgrep\", \"label\": \"datasette-ripgrep\"}]"}, {"id": "installation:installing-plugins-using-pipx", "page": "installation", "ref": "installing-plugins-using-pipx", "title": "Installing plugins using pipx", "content": "You can install additional datasette plugins with  pipx inject  like so: \n                     $ pipx inject datasette datasette-json-html\ninjected package datasette-json-html into venv datasette\ndone! \u2728 \ud83c\udf1f \u2728\n\n$ datasette plugins\n[\n    {\n        \"name\": \"datasette-json-html\",\n        \"static\": false,\n        \"templates\": false,\n        \"version\": \"0.6\"\n    }\n]", "breadcrumbs": "[\"Installation\", \"Advanced installation options\", \"Using pipx\"]", "references": "[]"}, {"id": "installation:loading-spatialite", "page": "installation", "ref": "loading-spatialite", "title": "Loading SpatiaLite", "content": "The  datasetteproject/datasette  image includes a recent version of the\n                         SpatiaLite extension  for SQLite. To load and enable that\n                        module, use the following command: \n                     docker run -p 8001:8001 -v `pwd`:/mnt \\\n    datasetteproject/datasette \\\n    datasette -p 8001 -h 0.0.0.0 /mnt/fixtures.db \\\n    --load-extension=spatialite \n                     You can confirm that SpatiaLite is successfully loaded by visiting\n                         http://127.0.0.1:8001/-/versions", "breadcrumbs": "[\"Installation\", \"Advanced installation options\", \"Using Docker\"]", "references": "[{\"href\": \"http://127.0.0.1:8001/-/versions\", \"label\": \"http://127.0.0.1:8001/-/versions\"}]"}, {"id": "installation:upgrading-packages-using-pipx", "page": "installation", "ref": "upgrading-packages-using-pipx", "title": "Upgrading packages using pipx", "content": "You can upgrade your pipx installation to the latest release of Datasette using  pipx upgrade datasette : \n                     $ pipx upgrade datasette\nupgraded package datasette from 0.39 to 0.40 (location: /Users/simon/.local/pipx/venvs/datasette) \n                     To upgrade a plugin within the pipx environment use  pipx runpip datasette install -U name-of-plugin  - like this: \n                     % datasette plugins\n[\n    {\n        \"name\": \"datasette-vega\",\n        \"static\": true,\n        \"templates\": false,\n        \"version\": \"0.6\"\n    }\n]\n\n$ pipx runpip datasette install -U datasette-vega\nCollecting datasette-vega\nDownloading datasette_vega-0.6.2-py3-none-any.whl (1.8 MB)\n    |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.8 MB 2.0 MB/s\n...\nInstalling collected packages: datasette-vega\nAttempting uninstall: datasette-vega\n    Found existing installation: datasette-vega 0.6\n    Uninstalling datasette-vega-0.6:\n    Successfully uninstalled datasette-vega-0.6\nSuccessfully installed datasette-vega-0.6.2\n\n$ datasette plugins\n[\n    {\n        \"name\": \"datasette-vega\",\n        \"static\": true,\n        \"templates\": false,\n        \"version\": \"0.6.2\"\n    }\n]", "breadcrumbs": "[\"Installation\", \"Advanced installation options\", \"Using pipx\"]", "references": "[]"}]