{"id":14986481,"url":"https://github.com/govlt/national-boundaries-api","last_synced_at":"2026-01-04T16:16:56.484Z","repository":{"id":248896184,"uuid":"830110294","full_name":"govlt/national-boundaries-api","owner":"govlt","description":"National Boundaries and Addresses API of Lithuania","archived":false,"fork":false,"pushed_at":"2025-08-01T15:07:21.000Z","size":234,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-01T17:33:51.878Z","etag":null,"topics":["addresses","api","boundaries","openapi"],"latest_commit_sha":null,"homepage":"https://boundaries-openapi.startupgov.lt","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/govlt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-17T15:54:14.000Z","updated_at":"2025-06-03T18:28:55.000Z","dependencies_parsed_at":"2024-10-13T23:40:56.907Z","dependency_job_id":"f76021a4-8117-4dfa-b400-3ec1ad541e35","html_url":"https://github.com/govlt/national-boundaries-api","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"be49343c5c96905c516c564e1a5c0e6aac8fb8ef"},"previous_names":["govlt/national-boundaries-api"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/govlt/national-boundaries-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govlt%2Fnational-boundaries-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govlt%2Fnational-boundaries-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govlt%2Fnational-boundaries-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govlt%2Fnational-boundaries-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/govlt","download_url":"https://codeload.github.com/govlt/national-boundaries-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govlt%2Fnational-boundaries-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269780617,"owners_count":24474686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["addresses","api","boundaries","openapi"],"created_at":"2024-09-24T14:12:56.444Z","updated_at":"2026-01-04T16:16:56.478Z","avatar_url":"https://github.com/govlt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# National Boundaries and Addresses API of Lithuania\n\nAccess comprehensive data on national boundaries and addresses registered in the Republic of Lithuania. This API\nprovides detailed information and geometries about counties, municipalities, elderships, residential areas, streets,\naddresses, rooms and parcels.\n\n## Key features\n\n1. **No extra dependencies**: A single Docker image without the need for databases like Postgres or MySQL.\n2. **Easy Usage**: OpenAPI support for quick client and contract generation in your favorite programming language.\n3. **Advanced Filtering and Searching**: Filter by geometries, various attributes, transform geometries to different\n   SRIDs, and more.\n4. **Frequent Updates**: Daily Docker image updates on changes to boundaries or addresses.\n\n5. **Infinite horizontal scaling**: API can be scaled horizontally without state or extra services.\n6. **Compact and Efficient**: SQLite database with all boundaries, addresses, and geometries under 500 MB.\n7. **Flexible Deployment**: Easily deployable on various infrastructures, supporting containerization and orchestration\n   tools.\n8. **Completely Open Source and Free**: Join our community of contributors and users. The entire project is open-source\n   and free of restrictions..\n\n## Data Hierarchy\n\nThe API organizes data into the following administrative and address levels:\n\n1. **Counties** (Apskritys)\n2. **Municipalities** (Savivaldybės)\n3. **Elderships** (Seniūnijos)\n4. **Residential Areas** (Gyvenamosios vietovės)\n5. **Streets** (Gatvės)\n6. **Addresses** (Adresai)\n7. **Rooms/Parcels** (Patalpos ir sklypai)\n\n## Self-hosting\n\nHost National Boundaries and Addresses API of Lithuania on your own infrastructure.\n\n### Docker Image\n\nHere's an example of its usage with Docker Compose:\n\n```yaml\nservices:\n  national-boundaries-api:\n    image: ghcr.io/govlt/national-boundaries-api:main\n    pull_policy: always\n    restart: unless-stopped\n    ports:\n      - \"80:80\"\n    healthcheck:\n      test: [ \"CMD-SHELL\", \"wget --no-verbose --tries=1 --spider http://127.0.0.1:80/health || exit 1\" ]\n      interval: 5s\n      timeout: 3s\n      start_period: 5s\n      retries: 5\n```\n\nAdditional docker image environment options:\n\n| Environment Variable | Description                                                                                                                                                                                                                                                                  | Default Value |\n|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|\n| `SENTRY_DSN`         | The DSN for Sentry, used for error tracking and monitoring. Leave empty if Sentry is not used.                                                                                                                                                                               |               |\n| `SENTRY_ENVIRONMENT` | Specifies the environment for Sentry (e.g., production, staging, development).                                                                                                                                                                                               | `production`  |\n| `ROOT_URL`           | The root URL of the application. Only change if the application is mounted below a specific URL path.                                                                                                                                                                        |               |\n| `WORKERS`            | The number of Uvicorn worker processes to run. Adjust based on workload and available resources. If you have a cluster of machines with Kubernetes, Docker Swarm, or another similar system, handle replication at the cluster level and keep a single worker per container. | `1`           |\n\n### SQLite Database\n\nOptionally, use the SQLite database with all boundaries and addresses directly without running the\nnational-boundaries-api. Download the latest database\nversion [here](https://github.com/govlt/national-boundaries-api/releases/latest/download/boundaries.sqlite).\n\n## Architecture\n\n```mermaid\nflowchart TD\n    ar[\"State Enterprise Centre of Registers\u003cbr\u003e\u003ca href=\"https://www.registrucentras.lt/p/1187\"\u003eAddress Registry raw data\u003c/a\u003e\"]--\u003etransform[\"\u003ca href=\"https://github.com/govlt/national-boundaries-api/blob/main/create-database.sh\"\u003eCreate SQLite database\u003c/a\u003e\"]--\u003e|\"\u003ca href=\"https://github.com/govlt/national-boundaries-api/releases/latest/download/boundaries.sqlite\"\u003eboundaries.sqlite\u003c/a\u003e\"|docker-image\n\ndocker-image[\"Docker image\u003cbr\u003e\u003ca href=\"https://github.com/govlt/national-boundaries-api/pkgs/container/national-boundaries-api\"\u003enational-boundaries-api\u003c/a\u003e\"]\n```\n\n## Getting Started Development\n\nTo embark on your development journey, follow these simple steps:\n\n- **Install Python 3.12+:** [Download Python](https://www.python.org/downloads/)\n- **Install uv 0.9+:** [Download uv](https://docs.astral.sh/uv/)\n- **Install SpatialLite 5+**: [Download SpatialLite](https://www.gaia-gis.it/fossil/libspatialite/index)\n- **Install GDAL 3.9+:** [Download GDAL](https://gdal.org/download.html) (Needed only for building the SQLite file on\n  your computer)\n\n### Setup\n\n1. Set up a Python virtual environment.\n2. Install dependencies with uv.\n3. Create the database by running `create-database.sh` or download the database file\n   from [this link](https://github.com/govlt/national-boundaries-api/releases/latest/download/boundaries.sqlite) and\n   place it in the project root directory.\n\n### Run the Development API\n\nExecute the following command, replacing `SPATIALITE_LIBRARY_PATH` with the path to SpatialLite on your computer:\n\n```shell\nSPATIALITE_LIBRARY_PATH=\"mod_spatialite.dylib\" uv run python -m uvicorn src.main:app --reload\n```\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE). Data from this API is licensed\nunder [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/deed.lt). For more information,\nvisit [Registrų centras](https://www.registrucentras.lt/p/1187).\n\nWhile preparing the National Boundaries and Addresses API, some changes were made such as changing attribute names to\nEnglish. For full details, check out the [create-database.sh](./create-database.sh) file.\n\n## Contributing\n\nJoin our community! Your contributions are invaluable. Whether you spot issues or have innovative ideas, feel free to\nopen an issue or submit a pull request. Check out\nour [contribution guidelines](https://github.com/govlt/.github/blob/main/CONTRIBUTING.md) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovlt%2Fnational-boundaries-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgovlt%2Fnational-boundaries-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovlt%2Fnational-boundaries-api/lists"}