Skip to content

Commit 613d905

Browse files
authored
First draft of Python V2 migration guide (#657)
* remove references to dataclass objects * Fix a copy-paste error. * remove extra file * Fix a copy-paste error. * Fix a copy-paste error. * remove extra file * Fix a copy-paste error. * add new parameter to node and dataframe * formatting fixes * remove unused file * Fix broken link * Add links to browser page for constraint properties * Remove unused file * Start work on Python library migration doc * More work on migration guide * More work on examples * More work on examples * More work on examples * Various formatting, wording improvements * More examples and pandas examples * Some fixes * restructuring * fix numbering * Add notes about future deprecation * Slight edit * Remove v1 reference from overview * Remove v1 reference from overview * Address Natalie's comments
1 parent 30ff6e8 commit 613d905

File tree

8 files changed

+1533
-16
lines changed

8 files changed

+1533
-16
lines changed

api/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The endpoints can be roughly grouped into four categories:
2828

2929
- **Graph query/SPARQL**: Given a subgraph where some of the nodes are
3030
variables, retrieve possible matches. This corresponds to a subset of the
31-
graph query language [SPARQL](https://www.w3.org/TR/rdf-sparql-query/){: target="_blank"}. This is useful for complex node connections which would require multiple API calls; for example, "hate crimes motivated by disability status in Californian cities".
31+
graph query language [SPARQL](https://www.w3.org/TR/rdf-sparql-query/){: target="_blank"}. This is useful for complex node connections which would require multiple API calls; for example, "hate crimes motivated by disability status in Californian cities".
3232

3333
In addition, Data Commons provides additional tools for accessing its data that call the REST APIs under the hood:
3434

@@ -47,7 +47,6 @@ A key is required by some APIs to authenticate and authorize requests.
4747
- Data Commons NL API requests (used by the [DataGemma](https://ai.google.devgit/gemma/docs/datagemma){: target="_blank"} tool). These are served by endpoints at `nl.datacommons.org`.
4848

4949
A key is currently not required for the following, although this may change in the future:
50-
- V1 Python and Pandas client libraries
5150
- Google Sheets
5251
- Web Components
5352

@@ -57,7 +56,6 @@ Data Commons API keys are managed by a self-service portal. To obtain an API key
5756

5857
To use the key in requests, see the relevant documentation:
5958
- [REST V2 APIs](/api/rest/v2/index.html#authentication).
60-
- [REST V1 APIs](/api/rest/v1/getting_started.html#authentication).
6159
- [Python/Pandas V2 APIs](api/python/v2/index.html#authentication).
6260
- For NL APIs in DataGemma, see the Colab notebooks in [https://github.com/datacommonsorg/llm-tools/tree/main/notebooks](https://github.com/datacommonsorg/llm-tools/tree/main/notebooks){: target="_blank"}
6361

api/pandas/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ has_children: true
88

99
# Data Commons Pandas API
1010

11+
> **Note:** This version of the Data Commons Python API will be deprecated in early 2026. Please migrate your applications to [V2](/api/python/v2). For help on translating your requests, see the [Migration guide](/api/python/v2/migration.html).
12+
1113
The **Data Commons Pandas API** is a superset of the Data Commons Python API:
1214
all functions from the Python API are also accessible from
1315
the Pandas API, and supplemental functions help with directly creating
1416
[pandas](https://pandas.pydata.org/){: target="_blank"}
1517
objects using data from the Data Commons knowledge graph for common
1618
use cases.
1719

18-
> **Note:** This and related pages cover [V1](/api/rest/v1) of the Pandas APIs. For V2 APIs, see [Data Commons Python API V2](/api/python/v2/)
19-
2020
Before proceeding, make sure you have followed the setup instructions below.
2121

2222
## Install the Python Data Commons API

api/python/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ has_children: true
88

99
# Data Commons Python API
1010

11+
> **Note:** This version of the Data Commons Python API will be deprecated in early 2026. Please migrate your applications to [V2](/api/python/v2). For help on translating your requests, see the [Migration guide](/api/python/v2/migration.html).
12+
1113
The Data Commons Python API is a Python library that enables developers to
1214
programmatically access nodes in the Data Commons knowledge graph. This package
1315
allows users to explore the structure of the graph, integrate statistics from
1416
the graph into data analysis workflows and much more.
1517

16-
> **Note:** This and related pages cover [V1](/api/rest/v1) of the Python APIs. For V2 APIs, see [Data Commons Python API V2](/api/python/v2/)
17-
1818
Before proceeding, make sure you have followed the setup instructions below.
1919

2020
## Install the Python Data Commons API

0 commit comments

Comments
 (0)