Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
parkererickson-tg committed Nov 4, 2024
1 parent fb846cc commit 985e2a0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pyTigerGraph/pyTigerGraphBase.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
"""`TigerGraphConnection`
A TigerGraphConnection object provides the HTTP(S) communication used by all other modules.
This object is the **synchronous** version of the connection object.
If you want to use pyTigerGraph in an asynchronous environment, use the `AsyncTigerGraphConnection` object.
The `TigerGraphConnection` object is the main object that you will interact with when using pyTigerGraph.
To test your connection, you can use the `echo()` method. This method sends a simple request to the server and returns the response.
```python
from pyTigerGraph import TigerGraphConnection
conn = TigerGraphConnection(
host="http://localhost",
graphname="MyGraph",
username="tigergraph",
password="tigergraph")
print(conn.echo())
```
"""
import base64
import json
Expand Down
28 changes: 28 additions & 0 deletions pyTigerGraph/pytgasync/pyTigerGraphBase.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
"""`AsyncTigerGraphConnection`
A TigerGraphConnection object provides the HTTP(S) communication used by all other modules.
This object is the **asynchronous** version of the connection object. If you want to use pyTigerGraph in an synchronous
environment, use the `TigerGraphConnection` object.
The `AsyncTigerGraphConnection` object is the main object that you will interact with when using pyTigerGraph.
It provides the same core functionality as the synchronous `TigerGraphConnection` object, but with asynchronous methods.
**Note:** `AsyncTigerGraphConnection` does not currently support the GDS or TigerGraph CoPilot APIs found in the synchronous version.
To test your connection, you can use the `echo()` method. This method sends a simple request to the server and returns the response.
```python
from pyTigerGraph import TigerGraphConnection
conn = AsyncTigerGraphConnection(
host="http://localhost",
graphname="MyGraph",
username="tigergraph",
password="tigergraph")
resp = await conn.echo()
print(resp)
```
"""

import json
import logging
import httpx
Expand Down

0 comments on commit 985e2a0

Please sign in to comment.