Skip to main content

Python client for the Request Authorization gRPC service

Project description

request-auth-client

Python client for the Request Authorization gRPC permit service.

Installation

Install from the local package directory:

pip install ./client

Or from PyPI:

pip install dwilson-request-auth-client

Requires: Python 3.11+, grpcio>=1.64.0, protobuf>=5.0.0


Quick start

from request_auth_client import RequestAuthClient

client = RequestAuthClient("localhost:9000")

try:
    with client.acquire("example.com") as permit:
        # run request here
        permit.set_status(200)
finally:
    client.close()

Explicit release

permit = client.acquire("example.com")
try:
    # run request here
    permit.release(200)
except Exception:
    permit.release(0)

Project details


Download files

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

Source Distribution

dwilson_request_auth_client-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

dwilson_request_auth_client-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file dwilson_request_auth_client-0.1.0.tar.gz.

File metadata

File hashes

Hashes for dwilson_request_auth_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 234006c63d26e4a9c263cce3d29c993587f817860c2a0bf9261accbc6e0b4112
MD5 a813b2307e0d2e754ce8f510ede54afc
BLAKE2b-256 74186821c7b9d554b2a38f33eea0eecc358c69dee4ed799769843aa875d4e5fc

See more details on using hashes here.

File details

Details for the file dwilson_request_auth_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dwilson_request_auth_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3d9e6b7a5af0bc93028757f336bf520a4cb23d6ad8a28deeee72d08ba6e9b6c
MD5 2133393c98076044f4ffb3e4b5ec2737
BLAKE2b-256 374e21f0d27a8b1850c266baf016b39ffd70f41c6f1770c90917f36d4ad50955

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page