Skip to main content

Port79: Async Finger Protocol Client Library

Port79 is an async-first, fully type-hinted Python client library for the Finger User Information Protocol (RFC 1288).

Features

  • Async First: Built on top of Python's standard asyncio networking loop.
  • RFC 1288 Support: Full support for standard system queries, user queries, verbose (/W) requests, and remote host forwarding.
  • Type Safe: Fully typed API passing strict static type checking (mypy --strict).
  • FingerURI Representation: Rich URI class to parse, inspect, validate, and manipulate Finger URIs and query targets.
  • Zero Dependencies: Built entirely on Python's standard library.
  • CLI Utility: Includes a port79 command-line interface out of the box.

Installation

port79 requires Python 3.12 or later and can be installed with your package manager of choice.

With pip:

pip install port79

With uv:

uv add port79

Quick Start

1. Make a Simple Request

Use Client with standard async context managers to query a Finger server:

import asyncio
from port79 import Client, Port79Error

async def main():
    async with Client() as client:
        try:
            # Query a user at a target host
            response = await client.request("davep@plan.cat")

            print(f"Target host: {response.target_host}")
            print(f"Query kind: {response.query_kind.name}")
            print(f"Latency: {response.latency:.3f}s")
            print("--- Response Text ---")
            print(response.text)
        except Port79Error as e:
            print(f"Request failed: {e}")

if __name__ == "__main__":
    asyncio.run(main())

2. Working with FingerURI

The FingerURI class parses both URI strings (finger://host/user) and target format strings (user@host, /W user@host, @host):

from port79 import FingerURI

# Parse from email-style target or full URI
uri = FingerURI.from_string("/W davep@plan.cat")

print(uri.host)          # 'plan.cat'
print(uri.username)      # 'davep'
print(uri.is_verbose)    # True
print(uri.raw_query)     # '/W davep\r\n'

# Create modified copies
custom_port_uri = uri.with_port(7979)
system_uri = uri.with_username(None)

3. Verbose and System Queries

You can issue verbose queries or system-wide logged-in user listings:

async with Client() as client:
    # System query (requests logged-in user list)
    system_response = await client.request("plan.cat")
    assert system_response.is_system_query

    # Verbose user query
    verbose_response = await client.request("finger://plan.cat/davep?W")
    assert verbose_response.is_verbose

Command Line Interface (CLI)

port79 includes a command-line client:

# Query a user
uv run port79 davep@plan.cat

# Request verbose output
uv run port79 -w davep@plan.cat

# Query system user list on a custom port
uv run port79 -p 7979 plan.cat

# Display CLI help
uv run port79 --help

Licence

MIT

Download files

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

Source Distribution

port79-1.0.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

port79-1.0.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file port79-1.0.0.tar.gz.

File metadata

  • Download URL: port79-1.0.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for port79-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a2e886e074c2eed5386d99ec8707758849224e3d36eb686b0a10595697f7b689
MD5 48a3741ccafb027a3a4d32270ac52b24
BLAKE2b-256 6347f3aeabf2c1f3cd85ae7ca00ffd71962512ceb46e09c4051d16d0d9aea01f

See more details on using hashes here.

File details

Details for the file port79-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: port79-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for port79-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cea229eee51adf7d976cc7456c6a952ae67d64ace0b5e9738f4f8343770f87e
MD5 9272509c5e7a1e4fa99dcc67b6949feb
BLAKE2b-256 07cec474c3dd5b717dfbc9eb3162389e37601d058b9dc312eb4c3ca91b310588

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

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