Skip to main content

netauth-python

A NetAuth client library for Python.

Installation

pip install netauth

Usage

netauth-python centers around the NetAuth object:

na = netauth.NetAuth("netauth.example.org")

try:
    resp = na.system_status()
    print(resp)
except netauth.error.NetAuthRpcError as e:
    print(f"Request failed: {e}")

na.close()

NetAuth can also be used as a context manager and be initialized from a NetAuth configuration file:

with netauth.NetAuth.with_config(Path("/etc/netauth/config.toml")) as na:
    try:
        resp = na.system_status()
        print(resp)
    except netauth.error.NetAuthRpcError as e:
        print(f"Request failed: {e}")

For interactive or dynamic applications, operations that require authentication can use a callback to retrieve the user's secret:

def secret_cb() -> str:
    return getpass(prompt="Secret: ")

with netauth.NetAuth("netauth.example.org", entity="demo", secret=secret_cb) as na:
    try:
        na.entity_kv_add("demo", "foo", ["bar", "baz"])
    except error.NetAuthRpcError as e:
        print(e)

For more information, see the API documentation.

Metadata

Release files for netauth 0.1.0

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

Source distribution (sdist)

Source distribution for netauth 0.1.0
File Size Uploaded Provenance Actions
netauth-0.1.0.tar.gz 26.2 kB Without provenance Details for netauth-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netauth 0.1.0
File Interpreter ABI Platform Actions
netauth-0.1.0-py3-none-any.whl Python 3 none any Details for netauth-0.1.0-py3-none-any.whl

Total release size: 50.9 kB

Release files / netauth-0.1.0.tar.gz

Download URL netauth-0.1.0.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e5b94e08f9832e643d655fe53dbeb8b5dc7c696a7745df61d42e027426f18e3f
BLAKE2b-256 checksum
How to use checksums
c49d33f6e49de92e701db063fadac6665d9b3cc79fd324a2af0d26b77322800c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / netauth-0.1.0-py3-none-any.whl

Download URL netauth-0.1.0-py3-none-any.whl
Size 24.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ebaba71c3675981f9370eaf70f6a51a92f345c85a162bd80ab97c2d76ea852e
BLAKE2b-256 checksum
How to use checksums
7314bd60f3bb3543b881634974874839e335312bafecd5ed22d8a76f43b51498
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for netauth 0.1.0

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

0.1.0 This release

2 release files No provenance

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