Skip to main content
Pre-release

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.22.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zepben.eas 2.22.0b2
File Size Uploaded Provenance Actions
zepben_eas-2.22.0b2.tar.gz 61.2 kB Without provenance Details for zepben_eas-2.22.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zepben.eas 2.22.0b2
File Interpreter ABI Platform Actions
zepben_eas-2.22.0b2-py3-none-any.whl Python 3 none any Details for zepben_eas-2.22.0b2-py3-none-any.whl

Total release size: 129.5 kB

Release files / zepben_eas-2.22.0b2.tar.gz

Download URL zepben_eas-2.22.0b2.tar.gz
Size 61.2 kB
Tags Source
SHA-256 checksum
How to use checksums
20a3112bbfe80903b7c8fc5ca27d9117c8fd624518e3c7e518ded10ea1c53ff9
BLAKE2b-256 checksum
How to use checksums
7dda227d579e129b27fef5f9c21db136d53fb1b02715b9d8ff4474cdc0a4d14c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / zepben_eas-2.22.0b2-py3-none-any.whl

Download URL zepben_eas-2.22.0b2-py3-none-any.whl
Size 68.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
754f8d6c7a381dab810bfde452d39040ffcddb48be7e3b1bbefd45a2477aa106
BLAKE2b-256 checksum
How to use checksums
9d41beffa65c2dd02e405a8dab2613d7ce4c7ab8f39939ff2bd2c4ddc3571681
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for zepben.eas 2.22.0b2

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page