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.2.tar.gz (6.3 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.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for dwilson_request_auth_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c88ed060d9159baa8b788551e975a59f92a81a2b46d621ceaeb495087cae48ce
MD5 eca47aebf40a6e55539950a2004118a9
BLAKE2b-256 d16af5199f77503e2990edfcf202e96a3ad3bc7bf09875a9fa376cdb52ab5179

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwilson_request_auth_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 313a58795d8ce0be0b26665b9c438fd405441a52838e7c6ce8914712437882d4
MD5 9f29e7869f35444840a3abad5dc2c544
BLAKE2b-256 adf1b91393fd10f6418a61acfaab8e732c4491aba4eb86763ab7b56c3b6320ff

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