You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Signed-off-by: Max Chesterfield <max.chesterfield@zepben.com>
Signed-off-by: Anthony Charlton <anthony.charlton@zepben.com>
Co-authored-by: Anthony Charlton <anthony.charlton@zepben.com>
Asyncio is also supported using aiohttp. A session will be created for you when you create an EasClient if not provided via the `session` parameter to EasClient.
63
-
64
-
To use the asyncio API use `async_upload_study` like so:
65
+
The EasClient can operate in async mode if specified, like so:
65
66
66
67
```python
67
68
from aiohttp import ClientSession
68
69
from geojson import FeatureCollection
69
-
from zepben.eas import EasClient, Study, Result, Section, GeoJsonOverlay
70
+
from zepben.eas import EasClient, StudyInput, StudyResultInput, GeoJsonOverlayInput, ResultSectionInput, SectionType, Mutation
71
+
70
72
71
73
asyncdefupload():
72
74
eas_client = EasClient(
73
75
host="<host>",
74
76
port=1234,
75
77
access_token="<access_token>",
76
-
client_id="<client_id>",
77
-
username="<username>",
78
-
password="<password>",
79
-
client_secret="<client_secret>",
80
-
session=ClientSession(...)
78
+
asynchronous=True, # returns all methods as plain async methods
"ariadne-codegen @ git+https://github.com/chestm007/ariadne-codegen"# This could break a pypi upload. Waiting on https://github.com/mirumee/ariadne-codegen/pull/413 to be merged.
54
+
]
53
55
54
56
[tool.setuptools.packages.find]
55
57
where = ["src/"]
58
+
59
+
[tool.ariadne-codegen]
60
+
remote_schema_url = "http://127.0.0.1:7654/api/graphql"# Set to address of Evolve App Server
0 commit comments