Skip to main content

GeoServer ACL Python Client

Python client for GeoServer ACL, the advanced authorization service for GeoServer: manage data access rules and workspace admin rules, and query authorization decisions.

The client is generated from the service's OpenAPI specification (synchronous, urllib3-based). The client version matches the server release it was built with; install the version matching your server.

Installation

pip install geoserver-acl-client==3.0.3

Usage

from geoserver_acl_client import (
    AccessRequest,
    ApiClient,
    AuthorizationApi,
    Configuration,
    DataRulesApi,
    GrantType,
    Rule,
)

configuration = Configuration(
    host="http://localhost:8080/acl/api", username="admin", password="s3cr3t"
)

with ApiClient(configuration) as client:
    # Rules match on the fields you set; a field left absent matches anything.
    # Lower priority values are evaluated first, and the first match decides.
    rules = DataRulesApi(client)
    rules.create_rule(
        Rule(priority=10, access=GrantType.ALLOW, role="ROLE_USER", workspace="users_ws")
    )

    # The same absence semantics apply to authorization requests.
    authorization = AuthorizationApi(client)
    request = AccessRequest(
        user="john",
        roles=["ROLE_USER"],
        workspace="users_ws",
        layer="a_layer",
        service="WMS",
        request="GetMap",
    )
    access = authorization.get_access_info(request)
    print(access.grant)  # GrantType.ALLOW

Try it locally

Run the service with the dev profile (in-memory database, credentials admin/s3cr3t):

docker run -p 8080:8080 -e SPRING_PROFILES_ACTIVE=dev geoservercloud/geoserver-acl:3.0.3

The interactive API documentation (Swagger UI) is then served at http://localhost:8080/acl/openapi/swagger-ui/index.html.

A complete runnable example, starting the service through testcontainers, lives in the repository: examples/python-client.

Links

License

GPL-2.0. (c) Open Source Geospatial Foundation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoserver_acl_client-3.0.3.tar.gz (55.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geoserver_acl_client-3.0.3-py3-none-any.whl (91.1 kB view details)

Uploaded Python 3

File details

Details for the file geoserver_acl_client-3.0.3.tar.gz.

File metadata

  • Download URL: geoserver_acl_client-3.0.3.tar.gz
  • Upload date:
  • Size: 55.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for geoserver_acl_client-3.0.3.tar.gz
Algorithm Hash digest
SHA256 6c0610d7ac904e6f456ef27f03905ffcb6c6af592cba6d0fea92862a1217a05c
MD5 77bcd8878d22057dae05eb5b8247455b
BLAKE2b-256 c99d3ac9dc3020325764c0ce0d8bec7ee8c9cc6304b1a4db298a5a6895c1ab68

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoserver_acl_client-3.0.3.tar.gz:

Publisher: publish-python-client.yaml on geoserver/geoserver-acl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geoserver_acl_client-3.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for geoserver_acl_client-3.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a07cf1e10ec4915071692fb35fd06207f2ec6f1fa992ab7c38828edcb6822ea2
MD5 53ddfef234a988c0a77afcf80b80800b
BLAKE2b-256 70578a659e80571318820c3be42a7600fac5e6bd29e4c57e1d3705a58d77543f

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoserver_acl_client-3.0.3-py3-none-any.whl:

Publisher: publish-python-client.yaml on geoserver/geoserver-acl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.0.3 This release

2 files

3.0.2

2 files

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