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.80.0, protobuf>=6.31.1


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.3.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.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for dwilson_request_auth_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f093a9812cb8cf9808c57ca025521d42b72ee5dad76c33436869eee6e55df6f4
MD5 518d6ccab664fab43193640bd27578d3
BLAKE2b-256 9e54c920623908311fb6b6045c99537a1d5165aab48eb95871272cbb0d5928cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwilson_request_auth_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f03f0a3bd067b88af1803ee572ab66453adde22ca92816c1c401360ae705cf0f
MD5 fe0a634e063effdb2fe63de647e263f9
BLAKE2b-256 fcbb9a7ccf1a3b97d0314cda26c49709d13a80df0982a8b706816eceeaf778ef

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