Fokko commented on code in PR #6389:
URL: https://github.com/apache/iceberg/pull/6389#discussion_r1044384157


##########
python/mkdocs/docs/api.md:
##########
@@ -0,0 +1,336 @@
+<!--
+  - Licensed to the Apache Software Foundation (ASF) under one
+  - or more contributor license agreements.  See the NOTICE file
+  - distributed with this work for additional information
+  - regarding copyright ownership.  The ASF licenses this file
+  - to you 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.
+  -->
+
+# Python API
+
+PyIceberg is based around catalogs to load tables. First, we need to 
instantiate a catalog. Let's say we have the following configuration
+
+```yaml
+catalog:
+  prod:
+    uri: http://rest-catalog/ws/
+    credential: t-1234:secret
+```
+
+We can then load the `prod` catalog:
+
+```python
+from pyiceberg.catalog import load_catalog
+
+catalog = load_catalog("prod")
+
+catalog.list_namespaces()
+```
+
+Returns two namespaces:
+
+```python
+[("default",), ("nyc",)]
+```
+
+Listing the tables in the `nyc` namespace:
+
+```python
+catalog.list_tables("nyc")
+```
+
+Returns as list with tuples, containing a single table `taxis`:
+
+```python
+[("nyc", "taxis")]
+```
+
+## Load a table
+
+Loading the `taxis` table:
+
+```python
+catalog.load_table(("nyc", "taxis"))

Review Comment:
   Good one, thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to