id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
14,700
test_clean_postcodes.py
osm-search_Nominatim/test/python/tokenizer/sanitizers/test_clean_postcodes.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for the sanitizer that normalizes postcodes. """ import pytest from nominatim_db.tokenizer.place_s...
9,714
Python
.py
158
58.101266
99
0.715808
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,701
test_generic_mutation.py
osm-search_Nominatim/test/python/tokenizer/token_analysis/test_generic_mutation.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for generic token analysis, mutation part. """ import pytest from icu import Transliterator impor...
3,017
Python
.py
62
38.677419
85
0.570208
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,702
test_generic.py
osm-search_Nominatim/test/python/tokenizer/token_analysis/test_generic.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for import name normalisation and variant generation. """ import pytest from icu import Transliter...
9,598
Python
.py
185
43.232432
85
0.535343
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,703
test_analysis_postcodes.py
osm-search_Nominatim/test/python/tokenizer/token_analysis/test_analysis_postcodes.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for special postcode analysis and variant generation. """ import pytest from icu import Transliter...
2,253
Python
.py
47
36.042553
87
0.562956
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,704
environment.py
osm-search_Nominatim/test/bdd/environment.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. from pathlib import Path import sys from behave import * sys.path.insert(1, str(Path(__file__, '..', '..', ...
1,896
Python
.py
51
32.941176
74
0.683924
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,705
table_compare.py
osm-search_Nominatim/test/bdd/steps/table_compare.py
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2022 by the Nominatim developer community. # For a full list of authors see the git log. """ Functions to facilitate accessing and comparing the content of DB tables. """ import re import json import p...
7,855
Python
.py
173
34.566474
103
0.564237
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,706
steps_api_queries.py
osm-search_Nominatim/test/bdd/steps/steps_api_queries.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Steps that run queries against the API. """ from pathlib import Path import json import os import re impo...
10,470
Python
.py
231
38.363636
113
0.639198
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,707
utils.py
osm-search_Nominatim/test/bdd/steps/utils.py
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2022 by the Nominatim developer community. # For a full list of authors see the git log. """ Various smaller helps for step execution. """ import logging import subprocess LOG = logging.getLogger(__nam...
887
Python
.py
24
32.791667
93
0.665891
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,708
check_functions.py
osm-search_Nominatim/test/bdd/steps/check_functions.py
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2023 by the Nominatim developer community. # For a full list of authors see the git log. """ Collection of assertion functions used for the steps. """ import json import math import re class Almost: ...
3,252
Python
.py
83
31.650602
81
0.584581
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,709
http_responses.py
osm-search_Nominatim/test/bdd/steps/http_responses.py
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2023 by the Nominatim developer community. # For a full list of authors see the git log. """ Classes wrapping HTTP responses from the Nominatim API. """ import re import json import xml.etree.ElementTre...
10,105
Python
.py
216
33.134259
103
0.528336
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,710
geometry_factory.py
osm-search_Nominatim/test/bdd/steps/geometry_factory.py
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2022 by the Nominatim developer community. # For a full list of authors see the git log. from pathlib import Path import os from steps.geometry_alias import ALIASES class GeometryFactory: """ Prov...
3,084
Python
.py
76
30.644737
90
0.559532
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,711
steps_osm_data.py
osm-search_Nominatim/test/bdd/steps/steps_osm_data.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. import tempfile import random import os from pathlib import Path from nominatim_db.tools.exec_utils import r...
5,220
Python
.py
121
35.099174
112
0.643757
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,712
geometry_alias.py
osm-search_Nominatim/test/bdd/steps/geometry_alias.py
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2022 by the Nominatim developer community. # For a full list of authors see the git log. """ Collection of aliases for various world coordinates. """ ALIASES = { # Country aliases 'AD': (1.58972, 42.54...
7,329
Python
.py
261
27.076628
58
0.58101
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,713
place_inserter.py
osm-search_Nominatim/test/bdd/steps/place_inserter.py
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2022 by the Nominatim developer community. # For a full list of authors see the git log. """ Helper classes for filling the place table. """ import random import string class PlaceColumn: """ Helpe...
4,186
Python
.py
96
34.302083
79
0.575817
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,714
steps_db_ops.py
osm-search_Nominatim/test/bdd/steps/steps_db_ops.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. import logging from itertools import chain import psycopg from psycopg import sql as pysql from place_inser...
20,337
Python
.py
382
41.175393
115
0.574194
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,715
nominatim_environment.py
osm-search_Nominatim/test/bdd/steps/nominatim_environment.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. from pathlib import Path import importlib import tempfile import psycopg from psycopg import sql as pysql f...
13,091
Python
.py
265
36.49434
98
0.573824
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,716
errors.py
osm-search_Nominatim/src/nominatim_api/errors.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Custom exception and error classes for Nominatim. """ class UsageError(Exception): """ An error rais...
457
Python
.py
13
32.846154
74
0.740406
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,717
reverse.py
osm-search_Nominatim/src/nominatim_api/reverse.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of reverse geocoding. """ from typing import Optional, List, Callable, Type, Tuple, Dict, ...
24,774
Python
.py
474
38.008439
98
0.561541
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,718
config.py
osm-search_Nominatim/src/nominatim_api/config.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. # This file is just a placeholder to make the config module available # during development. It will be repla...
423
Python
.py
11
37.363636
70
0.776156
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,719
logging.py
osm-search_Nominatim/src/nominatim_api/logging.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Functions for specialised logging with HTML output. """ from typing import Any, Iterator, Optional, List,...
13,227
Python
.py
329
31.382979
96
0.567219
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,720
status.py
osm-search_Nominatim/src/nominatim_api/status.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Classes and function related to status call. """ from typing import Optional import datetime as dt import...
1,426
Python
.py
42
29.690476
85
0.725091
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,721
results.py
osm-search_Nominatim/src/nominatim_api/results.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Dataclasses for search results and helper functions to fill them. Data classes are part of the public AP...
29,105
Python
.py
618
36.488673
99
0.613092
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,722
__init__.py
osm-search_Nominatim/src/nominatim_api/__init__.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ The public interface of the Nominatim library. Classes and functions defined in this file are considered...
1,876
Python
.py
40
36.55
81
0.664664
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,723
localization.py
osm-search_Nominatim/src/nominatim_api/localization.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Helper functions for localizing names of results. """ from typing import Mapping, List, Optional import ...
3,340
Python
.py
75
35.12
85
0.599445
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,724
core.py
osm-search_Nominatim/src/nominatim_api/core.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of classes for API access via libraries. """ from typing import Mapping, Optional, Any, As...
56,140
Python
.py
882
48.222222
100
0.60906
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,725
connection.py
osm-search_Nominatim/src/nominatim_api/connection.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Extended SQLAlchemy connection class that also includes access to the schema. """ from typing import cast...
5,562
Python
.py
112
39.25
96
0.625346
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,726
lookup.py
osm-search_Nominatim/src/nominatim_api/lookup.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of place lookup by ID. """ from typing import Optional, Callable, Tuple, Type import datet...
9,900
Python
.py
199
40.025126
98
0.630777
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,727
version.py
osm-search_Nominatim/src/nominatim_api/version.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Version information for the Nominatim API. """ NOMINATIM_API_VERSION = '4.5.0'
295
Python
.py
10
28.4
58
0.746479
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,728
result_formatting.py
osm-search_Nominatim/src/nominatim_api/result_formatting.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Helper classes and functions for formatting results into API responses. """ from typing import Type, Type...
4,894
Python
.py
96
41.96875
94
0.652612
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,729
types.py
osm-search_Nominatim/src/nominatim_api/types.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Complex datatypes used by the Nominatim API. """ from typing import Optional, Union, Tuple, NamedTuple, T...
19,833
Python
.py
459
34.359477
100
0.61116
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,730
typing.py
osm-search_Nominatim/src/nominatim_api/typing.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Type definitions for typing annotations. Complex type definitions are moved here, to keep the source fil...
1,341
Python
.py
34
37.676471
78
0.777863
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,731
server_glue.py
osm-search_Nominatim/src/nominatim_api/v1/server_glue.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Generic part of the server implementation of the v1 API. Combine with the scaffolding provided for the va...
16,723
Python
.py
337
39.94362
97
0.625698
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,732
classtypes.py
osm-search_Nominatim/src/nominatim_api/v1/classtypes.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Hard-coded information about tag categories. These tables have been copied verbatim from the old PHP cod...
7,840
Python
.py
188
36.659574
90
0.60558
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,733
format.py
osm-search_Nominatim/src/nominatim_api/v1/format.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Output formatters for API version v1. """ from typing import List, Dict, Mapping, Any import collections ...
10,642
Python
.py
222
38.472973
97
0.622091
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,734
__init__.py
osm-search_Nominatim/src/nominatim_api/v1/__init__.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of API version v1 (aka the legacy version). """ #pylint: disable=useless-import-alias fr...
360
Python
.py
11
31.545455
58
0.766571
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,735
format_xml.py
osm-search_Nominatim/src/nominatim_api/v1/format_xml.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Helper functions for output of results in XML format. """ from typing import Mapping, Any, Optional, Unio...
5,025
Python
.py
105
38.314286
94
0.614411
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,736
helpers.py
osm-search_Nominatim/src/nominatim_api/v1/helpers.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Helper function for parsing parameters and and outputting data specifically for the v1 version of the API...
8,311
Python
.py
172
39.215116
100
0.56993
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,737
format_json.py
osm-search_Nominatim/src/nominatim_api/v1/format_json.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Helper functions for output of results in json formats. """ from typing import Mapping, Any, Optional, Tu...
10,164
Python
.py
211
36.236967
99
0.567095
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,738
json_writer.py
osm-search_Nominatim/src/nominatim_api/utils/json_writer.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Streaming JSON encoder. """ from typing import Any, TypeVar, Optional, Callable import io try: import...
4,713
Python
.py
121
30.446281
88
0.599474
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,739
sqlalchemy_schema.py
osm-search_Nominatim/src/nominatim_api/sql/sqlalchemy_schema.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ SQLAlchemy definitions for all tables used by the frontend. """ import sqlalchemy as sa from .sqlalchemy...
5,298
Python
.py
105
39.571429
75
0.602626
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,740
sqlalchemy_functions.py
osm-search_Nominatim/src/nominatim_api/sql/sqlalchemy_functions.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Custom functions and expressions for SQLAlchemy. """ from __future__ import annotations from typing impor...
8,647
Python
.py
168
42.696429
113
0.629836
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,741
async_core_library.py
osm-search_Nominatim/src/nominatim_api/sql/async_core_library.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Import the base library to use with asynchronous SQLAlchemy. """ # pylint: disable=invalid-name, ungroupe...
674
Python
.py
21
29.47619
64
0.769585
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,742
sqlite_functions.py
osm-search_Nominatim/src/nominatim_api/sql/sqlite_functions.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Custom functions for SQLite. """ from typing import cast, Optional, Set, Any import json # pylint: disab...
4,271
Python
.py
96
37.260417
91
0.648108
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,743
key_value.py
osm-search_Nominatim/src/nominatim_api/sql/sqlalchemy_types/key_value.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ A custom type that implements a simple key-value store of strings. """ from typing import Any import sql...
2,133
Python
.py
46
41.456522
110
0.705456
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,744
int_array.py
osm-search_Nominatim/src/nominatim_api/sql/sqlalchemy_types/int_array.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Custom type for an array of integers. """ from typing import Any, List, cast, Optional import sqlalchemy...
3,896
Python
.py
86
39.267442
95
0.669494
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,745
geometry.py
osm-search_Nominatim/src/nominatim_api/sql/sqlalchemy_types/geometry.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Custom types for SQLAlchemy. """ from __future__ import annotations from typing import Callable, Any, cas...
10,898
Python
.py
212
42.59434
95
0.646176
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,746
__init__.py
osm-search_Nominatim/src/nominatim_api/sql/sqlalchemy_types/__init__.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Module with custom types for SQLAlchemy """ # See also https://github.com/PyCQA/pylint/issues/6006 # pyl...
535
Python
.py
15
34.533333
58
0.777992
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,747
json.py
osm-search_Nominatim/src/nominatim_api/sql/sqlalchemy_types/json.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Common json type for different dialects. """ from typing import Any import sqlalchemy as sa from sqlalch...
856
Python
.py
24
32.416667
80
0.734867
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,748
content_types.py
osm-search_Nominatim/src/nominatim_api/server/content_types.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Constants for various content types for server responses. """ CONTENT_TEXT = 'text/plain; charset=utf-8'...
452
Python
.py
13
33.692308
58
0.751142
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,749
asgi_adaptor.py
osm-search_Nominatim/src/nominatim_api/server/asgi_adaptor.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Base abstraction for implementing based on different ASGI frameworks. """ from typing import Optional, An...
5,225
Python
.py
115
36.521739
88
0.639377
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,750
server.py
osm-search_Nominatim/src/nominatim_api/server/falcon/server.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Server implementation using the falcon webserver framework. """ from typing import Optional, Mapping, Any...
7,082
Python
.py
154
37.74026
96
0.650044
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,751
server.py
osm-search_Nominatim/src/nominatim_api/server/starlette/server.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Server implementation using the starlette webserver framework. """ from typing import Any, Optional, Mapp...
6,294
Python
.py
133
39.293233
100
0.662522
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,752
icu_tokenizer.py
osm-search_Nominatim/src/nominatim_api/search/icu_tokenizer.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of query analysis for the ICU tokenizer. """ from typing import Tuple, Dict, List, Optiona...
12,549
Python
.py
257
37.023346
94
0.586528
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,753
db_search_lookups.py
osm-search_Nominatim/src/nominatim_api/search/db_search_lookups.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of lookup functions for the search_name table. """ from typing import List, Any import sq...
4,420
Python
.py
91
38.923077
84
0.584069
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,754
db_search_builder.py
osm-search_Nominatim/src/nominatim_api/search/db_search_builder.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Conversion from token assignment to an abstract DB search. """ from typing import Optional, List, Tuple, ...
20,342
Python
.py
383
38.295039
100
0.576838
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,755
db_searches.py
osm-search_Nominatim/src/nominatim_api/search/db_searches.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the actual database accesses for forward search. """ from typing import List, Tuple, As...
37,506
Python
.py
705
38.163121
98
0.55864
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,756
query_analyzer_factory.py
osm-search_Nominatim/src/nominatim_api/search/query_analyzer_factory.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Factory for creating a query analyzer for the configured tokenizer. """ from typing import List, cast, TY...
1,763
Python
.py
41
38.365854
94
0.72323
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,757
__init__.py
osm-search_Nominatim/src/nominatim_api/search/__init__.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Module for forward search. """ # pylint: disable=useless-import-alias from .geocoder import (ForwardGeoc...
510
Python
.py
14
33.928571
80
0.755556
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,758
query.py
osm-search_Nominatim/src/nominatim_api/search/query.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Datastructures for a tokenized query. """ from typing import List, Tuple, Optional, Iterator from abc imp...
9,899
Python
.py
239
33.560669
91
0.625117
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,759
geocoder.py
osm-search_Nominatim/src/nominatim_api/search/geocoder.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Public interface to the search code. """ from typing import List, Any, Optional, Iterator, Tuple, Dict im...
11,223
Python
.py
226
37.256637
97
0.584072
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,760
token_assignment.py
osm-search_Nominatim/src/nominatim_api/search/token_assignment.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Create query interpretations where each vertice in the query is assigned a specific function (expressed a...
16,770
Python
.py
346
36.546243
100
0.597565
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,761
db_search_fields.py
osm-search_Nominatim/src/nominatim_api/search/db_search_fields.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Data structures for more complex fields in abstract search descriptions. """ from typing import List, Tup...
8,878
Python
.py
202
35.272277
96
0.638915
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,762
errors.py
osm-search_Nominatim/src/nominatim_db/errors.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Custom exception and error classes for Nominatim. """ class UsageError(Exception): """ An error rais...
457
Python
.py
13
32.846154
74
0.740406
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,763
config.py
osm-search_Nominatim/src/nominatim_db/config.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Nominatim configuration accessor. """ from typing import Union, Dict, Any, List, Mapping, Optional import...
13,685
Python
.py
282
37.535461
93
0.609091
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,764
cli.py
osm-search_Nominatim/src/nominatim_db/cli.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Command-line interface to the Nominatim functions for import, update, database administration and queryin...
9,393
Python
.py
196
38.158163
93
0.636016
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,765
paths.py
osm-search_Nominatim/src/nominatim_db/paths.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Path settings for extra data used by Nominatim. """ from pathlib import Path SQLLIB_DIR = (Path(__file__...
508
Python
.py
13
38
73
0.611336
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,766
version.py
osm-search_Nominatim/src/nominatim_db/version.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Version information for Nominatim. """ from typing import NamedTuple, Optional # See also https://github...
2,629
Python
.py
54
43.518519
84
0.712275
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,767
typing.py
osm-search_Nominatim/src/nominatim_db/typing.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Type definitions for typing annotations. Complex type definitions are moved here, to keep the source fil...
1,375
Python
.py
34
36.352941
80
0.733835
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,768
place_name.py
osm-search_Nominatim/src/nominatim_db/data/place_name.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Data class for a single name of a place. """ from typing import Optional, Dict, Mapping class PlaceName:...
2,820
Python
.py
62
36.741935
89
0.628373
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,769
place_info.py
osm-search_Nominatim/src/nominatim_db/data/place_info.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Wrapper around place information the indexer gets from the database and hands to the tokenizer. """ from ...
3,003
Python
.py
67
36.820896
81
0.629071
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,770
country_info.py
osm-search_Nominatim/src/nominatim_db/data/country_info.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Functions for importing and managing static country information. """ from typing import Dict, Any, Iterab...
6,181
Python
.py
139
34.604317
91
0.601898
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,771
postcode_format.py
osm-search_Nominatim/src/nominatim_db/data/postcode_format.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Functions for formatting postcodes according to their country-specific format. """ from typing import Any...
4,349
Python
.py
88
40.75
97
0.651004
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,772
special_phrases.py
osm-search_Nominatim/src/nominatim_db/clicmd/special_phrases.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'special-phrases' command. """ import argparse import logging from pathlib impo...
3,790
Python
.py
75
43.613333
91
0.70165
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,773
setup.py
osm-search_Nominatim/src/nominatim_db/clicmd/setup.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'import' subcommand. """ from typing import Optional import argparse import logging...
10,864
Python
.py
190
43.321053
103
0.60969
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,774
refresh.py
osm-search_Nominatim/src/nominatim_db/clicmd/refresh.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of 'refresh' subcommand. """ from typing import Tuple, Optional import argparse import log...
8,555
Python
.py
153
42.294118
102
0.607621
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,775
export.py
osm-search_Nominatim/src/nominatim_db/clicmd/export.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'export' subcommand. """ from typing import Optional, List, cast import logging imp...
7,307
Python
.py
160
34.36875
91
0.575007
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,776
add_data.py
osm-search_Nominatim/src/nominatim_db/clicmd/add_data.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'add-data' subcommand. """ from typing import cast import argparse import logging i...
5,138
Python
.py
96
38.822917
94
0.579765
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,777
api.py
osm-search_Nominatim/src/nominatim_db/clicmd/api.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Subcommand definitions for API calls from the command line. """ from typing import Dict, Any, Optional, T...
20,926
Python
.py
404
38.012376
100
0.581318
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,778
convert.py
osm-search_Nominatim/src/nominatim_db/clicmd/convert.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'convert' subcommand. """ from typing import Set, Any, Union, Optional, Sequence im...
3,930
Python
.py
78
40.371795
95
0.626597
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,779
__init__.py
osm-search_Nominatim/src/nominatim_db/clicmd/__init__.py
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2023 by the Nominatim developer community. # For a full list of authors see the git log. """ Subcommand definitions for the command-line tool. """ # mypy and pylint disagree about the style of explicit ...
840
Python
.py
20
40.95
73
0.824176
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,780
replication.py
osm-search_Nominatim/src/nominatim_db/clicmd/replication.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'replication' sub-command. """ from typing import Optional import argparse import d...
8,785
Python
.py
160
42.55625
92
0.628189
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,781
admin.py
osm-search_Nominatim/src/nominatim_db/clicmd/admin.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'admin' subcommand. """ import logging import argparse import random from ..errors...
5,108
Python
.py
106
36.216981
91
0.606627
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,782
index.py
osm-search_Nominatim/src/nominatim_db/clicmd/index.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'index' subcommand. """ import argparse import asyncio import psutil from ..db im...
2,791
Python
.py
58
39.793103
89
0.665072
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,783
args.py
osm-search_Nominatim/src/nominatim_db/clicmd/args.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Provides custom functions over command-line arguments. """ from typing import Optional, List, Dict, Any, ...
5,986
Python
.py
186
25.166667
92
0.650373
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,784
freeze.py
osm-search_Nominatim/src/nominatim_db/clicmd/freeze.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Implementation of the 'freeze' subcommand. """ import argparse from ..db.connection import connect from ...
1,278
Python
.py
33
34.636364
78
0.728745
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,785
sql_preprocessor.py
osm-search_Nominatim/src/nominatim_db/db/sql_preprocessor.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Preprocessing of SQL files. """ from typing import Set, Dict, Any, cast import jinja2 from .connection ...
5,148
Python
.py
112
38.017857
94
0.642686
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,786
properties.py
osm-search_Nominatim/src/nominatim_db/db/properties.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Query and access functions for the in-database property table. """ from typing import Optional, cast fro...
1,477
Python
.py
37
33.351351
86
0.648951
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,787
status.py
osm-search_Nominatim/src/nominatim_db/db/status.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Access and helper functions for the status and status log table. """ from typing import Optional, Tuple i...
4,638
Python
.py
96
40.46875
99
0.639823
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,788
utils.py
osm-search_Nominatim/src/nominatim_db/db/utils.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Helper functions for handling DB accesses. """ from typing import IO, Optional, Union import subprocess i...
2,506
Python
.py
63
31.555556
87
0.613235
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,789
query_pool.py
osm-search_Nominatim/src/nominatim_db/db/query_pool.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ A connection pool that executes incoming queries in parallel. """ from typing import Any, Tuple, Optional...
2,916
Python
.py
68
32.573529
91
0.583598
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,790
connection.py
osm-search_Nominatim/src/nominatim_db/db/connection.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Specialised connection and cursor functions. """ from typing import Optional, Any, Dict, Tuple import log...
7,086
Python
.py
161
37.447205
86
0.663473
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,791
collect_os_info.py
osm-search_Nominatim/src/nominatim_db/tools/collect_os_info.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Collection of host system information including software versions, memory, storage, and database configur...
5,455
Python
.py
129
36.170543
95
0.661358
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,792
migration.py
osm-search_Nominatim/src/nominatim_db/tools/migration.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Functions for database migration to newer software versions. """ from typing import List, Tuple, Callable...
4,616
Python
.py
94
40.202128
91
0.644667
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,793
refresh.py
osm-search_Nominatim/src/nominatim_db/tools/refresh.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Functions for bringing auxiliary data in the database up-to-date. """ from typing import MutableSequence,...
10,264
Python
.py
212
37.221698
99
0.598339
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,794
add_osm_data.py
osm-search_Nominatim/src/nominatim_db/tools/add_osm_data.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Function to add additional OSM data from a file or the API into the database. """ from typing import Any,...
2,169
Python
.py
56
32.910714
87
0.642075
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,795
postcodes.py
osm-search_Nominatim/src/nominatim_db/tools/postcodes.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Functions for importing, updating and otherwise maintaining the table of artificial postcode centroids. "...
9,832
Python
.py
195
36.902564
94
0.575328
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,796
convert_sqlite.py
osm-search_Nominatim/src/nominatim_db/tools/convert_sqlite.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Exporting a Nominatim database to SQlite. """ from typing import Set, Any, Optional, Union import datetim...
11,157
Python
.py
218
38.022936
97
0.580663
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,797
check_database.py
osm-search_Nominatim/src/nominatim_db/tools/check_database.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Collection of functions that check if the database is complete and functional. """ from typing import Cal...
11,963
Python
.py
278
33.863309
99
0.625614
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,798
__init__.py
osm-search_Nominatim/src/nominatim_db/tools/__init__.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Module with functions for importing, updating Nominatim databases as well as general maintenance helpers....
325
Python
.py
10
31.5
65
0.774603
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
14,799
replication.py
osm-search_Nominatim/src/nominatim_db/tools/replication.py
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Functions for updating a database from a replication source. """ from typing import ContextManager, Mutab...
7,276
Python
.py
161
36.608696
97
0.651534
osm-search/Nominatim
3,062
711
96
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)