reorganize api submodule

Use a directory for the submodule where the __init__ file contains
the public API. This makes it easier to separate public interface
from the internal implementation.
This commit is contained in:
Sarah Hoffmann
2023-01-24 13:28:04 +01:00
parent e56957f047
commit 32c1e59622
11 changed files with 36 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
#
# This file is part of Nominatim. (https://nominatim.org)
#
# Copyright (C) 2022 by the Nominatim developer community.
# Copyright (C) 2023 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
Server implementation using the falcon webserver framework.
@@ -13,8 +13,7 @@ from pathlib import Path
import falcon
import falcon.asgi
from nominatim.api import NominatimAPIAsync
from nominatim.apicmd.status import StatusResult
from nominatim.api import NominatimAPIAsync, StatusResult
import nominatim.result_formatter.v1 as formatting
CONTENT_TYPE = {

View File

@@ -2,7 +2,7 @@
#
# This file is part of Nominatim. (https://nominatim.org)
#
# Copyright (C) 2022 by the Nominatim developer community.
# Copyright (C) 2023 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
Server implementation using the sanic webserver framework.
@@ -12,8 +12,7 @@ from pathlib import Path
import sanic
from nominatim.api import NominatimAPIAsync
from nominatim.apicmd.status import StatusResult
from nominatim.api import NominatimAPIAsync, StatusResult
import nominatim.result_formatter.v1 as formatting
api = sanic.Blueprint('NominatimAPI')

View File

@@ -2,7 +2,7 @@
#
# This file is part of Nominatim. (https://nominatim.org)
#
# Copyright (C) 2022 by the Nominatim developer community.
# Copyright (C) 2023 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
Server implementation using the starlette webserver framework.
@@ -16,8 +16,7 @@ from starlette.exceptions import HTTPException
from starlette.responses import Response
from starlette.requests import Request
from nominatim.api import NominatimAPIAsync
from nominatim.apicmd.status import StatusResult
from nominatim.api import NominatimAPIAsync, StatusResult
import nominatim.result_formatter.v1 as formatting
CONTENT_TYPE = {