forked from datacommonsorg/api-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
45 lines (38 loc) · 1.99 KB
/
__init__.py
File metadata and controls
45 lines (38 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# isort: skip_file
import warnings
warnings.warn(
"\n\n'datacommons' is deprecated and will no longer be updated.\n"
"Please migrate to the 'datacommons_client' package.\n"
"Migration guide: https://docs.datacommons.org/api/python/v2/migration.html\n"
"Contact support@datacommons.org with any questions.\n",
category=DeprecationWarning,
stacklevel=2)
################################## IMPORTANT #################################
# All user-facing functions in this package must be symlinked to the #
# datacommons_pandas pkg. This is so that users do not need to import both #
# libraries for pd support. Please keep the below imports in sync with the #
# __init__.py in the datacommons_pandas/ dir, and add a symlink when #
# creating a new file. #
# TODO: https://github.com/datacommonsorg/api-python/issues/149 #
##############################################################################
# Data Commons SPARQL query support
from datacommons.sparql import query
# Data Commons Python API
from datacommons.core import get_property_labels, get_property_values, get_triples
from datacommons.places import get_places_in, get_related_places, get_stats
from datacommons.stat_vars import get_stat_value, get_stat_series, get_stat_all
from datacommons.key import set_api_key
from datacommons.node import properties, property_values, triples