This release is a pre-release and may not be stable for production use.
Evolve App Server Python Client
This library provides a wrapper to the Evolve App Server's API, allowing users of the Evolve SDK to authenticate with the Evolve App Server and upload studies.
Usage
from geojson import FeatureCollection
from src.zepben.eas import EasClient, StudyInput, StudyResultInput, GeoJsonOverlayInput, ResultSectionInput,
SectionType, Mutation
eas_client = EasClient(
host="<host>",
port=1234,
access_token="<access_token>",
asynchronous=False,
)
eas_client.mutation(
Mutation.add_studies(
[
StudyInput(
name="<study name>",
description="<study description>",
tags=["<tag>", "<tag2>"],
results=[
StudyResultInput(
name="<result_name>",
geoJsonOverlay=GeoJsonOverlayInput(
data=FeatureCollection(...),
styles=["style1"]
),
sections=[
ResultSectionInput(
type=SectionType.TABLE,
name="<table name>",
description="<table description>",
columns=[
{"key": "<column 1 key>", "name": "<column 1 name>"},
{"key": "<column 2 key>", "name": "<column 2 name>"},
],
data=[
{"<column 1 key>": "<column 1 row 1 value>",
"<column 2 key>": "<column 2 row 1 value>"},
{"<column 1 key>": "<column 1 row 2 value>",
"<column 2 key>": "<column 2 row 2 value>"}
]
)
]
)
],
styles=[
{
"id": "style1",
# other Mapbox GL JS style properties
}
]
)
]
)
)
eas_client.close()
AsyncIO
The EasClient can operate in async mode if specified, like so:
from aiohttp import ClientSession
from geojson import FeatureCollection
from src.zepben.eas import EasClient, StudyInput, StudyResultInput, GeoJsonOverlayInput, ResultSectionInput,
SectionType, Mutation
async def upload():
eas_client = EasClient(
host="<host>",
port=1234,
access_token="<access_token>",
asynchronous=True, # returns all methods as plain async methods
)
await eas_client.mutation(
Mutation.add_studies(
[
StudyInput(
name="<study name>",
description="<study description>",
tags=["<tag>", "<tag2>"],
results=[
StudyResultInput(
name="<result_name>",
geoJsonOverlay=GeoJsonOverlayInput(
data=FeatureCollection(...),
styles=["style1"]
),
sections=[
ResultSectionInput(
type=SectionType.TABLE,
name="<table name>",
description="<table description>",
columns=[
{"key": "<column 1 key>", "name": "<column 1 name>"},
{"key": "<column 2 key>", "name": "<column 2 name>"},
],
data=[
{"<column 1 key>": "<column 1 row 1 value>",
"<column 2 key>": "<column 2 row 1 value>"},
{"<column 1 key>": "<column 1 row 2 value>",
"<column 2 key>": "<column 2 row 2 value>"}
]
)
]
)
],
styles=[
{
"id": "style1",
# other Mapbox GL JS style properties
}
]
)
]
)
)
await eas_client.close()
Development
To regenerate the graphql client, run the following command
docker compose run codegen
If you have done any of the following, you will need to regenerate the docker image if testing locally.
- Made changes to anything that affects the python package
- Changed anything under
ariadne_plugins
docker build .
Metadata
Release files for zepben.eas 2.20.0b8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zepben_eas-2.20.0b8.tar.gz | 61.1 kB | Without provenance | Details for zepben_eas-2.20.0b8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zepben_eas-2.20.0b8-py3-none-any.whl | Python 3 | none | any | Details for zepben_eas-2.20.0b8-py3-none-any.whl |
Total release size: 129.2 kB
Release files / zepben_eas-2.20.0b8.tar.gz
| Download URL | zepben_eas-2.20.0b8.tar.gz |
|---|---|
| Size | 61.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b48227d4464cd84c26429f49639514809c5703a8fc76f2d7f593f63df62df720
|
|
BLAKE2b-256 checksum How to use checksums |
15c91935261ba4864bef500196e49a7c5a8f6731b0250e26f46939b98bad89e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / zepben_eas-2.20.0b8-py3-none-any.whl
| Download URL | zepben_eas-2.20.0b8-py3-none-any.whl |
|---|---|
| Size | 68.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
670e7ba4f5d1c19b2688d5add5361ef36a03e6c1b2bc74a697a9d8ef5db4ded6
|
|
BLAKE2b-256 checksum How to use checksums |
7f79c7cc950ce289ecacafdaba0438c8ccc225dc8f64e84e61db26e6d3ce261f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for zepben.eas 2.20.0b8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.