Skip to main content

Public Key Name System Framework

Project description

Public Key Name System Framework

Made with Python3 GitHub license PyPI Github status Made with
This is the Public Key Name System Framework designed as a Public Key Exchange for both centralised and peer-to-peer services. It comes pre-built with useful and powerful CLI tools.

Installation

From source

To install from source use the following command, make sure you have setuptools>=50.0.0

python3 seutp.py install

To install from PyPI

pip3 install pkns

Using the PKNS_Table API

The PKNS_Table API is the core for the PKNS Local Services found in the pknscore

from pkns.pknscore import PKNS_Table
new_table = PKNS_Table(PATH_TO_A_TABLE_DIR)

PATH_TO_A_TABLE can be a path to an existing table directory or a new table directory, defaults to ~/.pkns. The API provides all basic table operations.

Using the PKNS_Server API

The PKNS_Server API is the core of PKNS Network Services found in the pknscore. It provides the correct server handling and configuration for a hosted PKNS Services. The PKNS service runs on the default port 6300 . It is capable to handle multiple clients and process multiple requests and can be safely daemonized.

from pkns.pknscore import PKNS_Server
server = PKNS_Server(IP_ADDR, PORT, PATH_TO_A_TABLE_DIR)

IP_ADDR is the IP Address to use for the server, defaults to 0.0.0.0, PORT is the port to be used for the server, defaults to 6300, PATH_TO_A_TABLE can be a path to an existing table directory or a new table directory, defaults to ~/.pkns.

Query Syntax

PKNS Query is used for better integration of centralised servers. The query follows a fixed Syntax

pkns://HOST_SERVER[:PORT][/PEERGROUP][/USER]

CLI Tools

CLI Tools help manage the PKNS Tables and Servers easily, they also include useful functions.

Local Table Manager tabman

Managing Local Tables

$ pkns_cli tabman
Usage: pkns_cli tabman [OPTIONS] COMMAND [ARGS]...

  PKNS Table Manager

Options:
  --help  Show this message and exit.

Commands:
  add-peergroup     Add/Create a Peergroup
  add-user          Add Users to a Peergroup
  del-peergroup     Delete/Leave a Peergroup
  del-user          Remove Users from a Peergroup
  get-peergroup     Get Info of a Peergroup
  get-user          Get Users Info from a Peergroup
  rename-peergroup  Rename a Peergroup
  rename-user       Rename a User from a Peergroup

Server Manager server

Server Utilities

$ pkns_cli server
Usage: pkns_cli server [OPTIONS] COMMAND [ARGS]...

  PKNS Server Manager

Options:
  -i, --host TEXT     IP Address to bind  [default: 0.0.0.0]
  -p, --port INTEGER  Port to bind  [default: 6300]
  --help              Show this message and exit.

Commands:
  restart  Restart PKNS Server
  start    Start the PKNS Server
  status   PKNS Server Status
  stop     Stop the PKNS Server

Other utilities

Ping

Ping a Local or Remote Server

$ pkns_cli ping --help
Usage: pkns_cli ping [OPTIONS] [ADDRESS]

  PKNS Ping

Options:
  -n, --nop INTEGER  Number of Pings to send
  --help             Show this message and exit.

Query

Query Local or Remote Server

$ pkns_cli query --help
Usage: pkns_cli query [OPTIONS] QUERY

  PKNS Query

Options:
  --help  Show this message and exit.

Sync

Sync to Local or Remote Server

$ pkns_cli sync --help
Usage: pkns_cli sync [OPTIONS] [ADDRESS]

  PKNS Sync

Options:
  --help  Show this message and exit.

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

pkns-0.5.11.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

pkns-0.5.11-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file pkns-0.5.11.tar.gz.

File metadata

  • Download URL: pkns-0.5.11.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.2 Linux/5.10.0-kali7-amd64

File hashes

Hashes for pkns-0.5.11.tar.gz
Algorithm Hash digest
SHA256 1d53efec32519671c44a19d62ae39d583df0f7ed767c22b42813b5e670b76ddf
MD5 5445390256af1b7adda8f610a2218576
BLAKE2b-256 4daf6c125bb0264b8958535429a7df6656c39b1b8f987d118d9685c58ea11515

See more details on using hashes here.

File details

Details for the file pkns-0.5.11-py3-none-any.whl.

File metadata

  • Download URL: pkns-0.5.11-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.2 Linux/5.10.0-kali7-amd64

File hashes

Hashes for pkns-0.5.11-py3-none-any.whl
Algorithm Hash digest
SHA256 b325b6504c068a51c275a958639b050ce988d23aa2965a432a8a5405b1d16c5c
MD5 9ff9736fddd8066c559b806447bb6b32
BLAKE2b-256 b80c9805eca2ca0ca01acd10d1455b4b4ca6360d5f9cde7ed9b34b943f53cfd5

See more details on using hashes here.

Supported by

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