Skip to content

Commit

Permalink
Improve instruction with download Sqlite file
Browse files Browse the repository at this point in the history
  • Loading branch information
vycius committed Jul 18, 2024
1 parent 65b4978 commit bef9aba
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ Additional docker image environment options:
### SQLite Database

Optionally, use the SQLite database with all boundaries and addresses directly without running the
national-boundaries-api. Download the latest database version [here](TODO).
national-boundaries-api. Download the latest database
version [here](https://github.com/govlt/national-boundaries-api/releases/latest/download/boundaries.sqlite).

## Getting Started Development

Expand All @@ -67,14 +68,20 @@ To embark on your development journey, follow these simple steps:
- **Install GDAL 3.9+:** [Download GDAL](https://gdal.org/download.html) (Needed only for building the SQLite file on
your computer)

After setting up a Python virtual environment and installing dependencies with Poetry, create the database by
executing `create-database.sh`.
### Setup

To run the development API, execute the following command (change SPATIALITE_LIBRARY_PATH to the path of SpatialLite on
your computer):
1. Set up a Python virtual environment.
2. Install dependencies with Poetry.
3. Create the database by running `create-database.sh` or download the database file
from [this link](https://github.com/govlt/national-boundaries-api/releases/latest/download/boundaries.sqlite) and
place it in the project root directory.

### Run the Development API

Execute the following command, replacing `SPATIALITE_LIBRARY_PATH` with the path to SpatialLite on your computer:

```shell
SPATIALITE_LIBRARY_PATH="mod_spatialite.dylib" python -m uvicorn src.main:app --reload
SPATIALITE_LIBRARY_PATH="mod_spatialite.dylib" poetry run python -m uvicorn src.main:app --reload
```

## License
Expand Down

0 comments on commit bef9aba

Please sign in to comment.