PetName and Distributed Directory Name resolver
Project description
PetName and Distributed Directory Name resolver
petnames resolves names to machine addresses (or any other value humans find difficult to remember).
Resolution starts from the local database on your device, which can contain references to any Distributed Directory service.
For a name like : servers.work.server1
-
servers is resolved locally to a collection
-
work is found in the local collection, pointing to a remote directory
-
server1 is submitted as a query to that directory
-
The directory returns a PetName record, containing: addr = abcd..eeff
-
Your application can initiate a connection to that address.
The local database contains entries which can point directly to resources (e.g. on P2P networks) or to other directories e.g. a community-run directory, commercial directory, government directory, etc.
BETA SOFTWARE!
This is still a work-in-progress. Currently only the local-directory resolving is implemented, but this is already useful to save having to copy-paste X25519 Ids, Bitcoin addresses, etc.
Try it:
- Install the package with
pip install petnames - Create a file
~/.local/share/petnames/local/server1.txtcontaining lines like these:
suggested_name=Server One
addr = aabbccddeeffaabbccddeeffaabbccdd
- Run
ddig server1which should display the properties you created
Command-line usage:
ddig NAME [PROPERTY]
NAME is a sequence of names joined by periods
PROPERTY is the record property you want to retrieve (default: 'all')
Application integration:
from petnames import get_property
addr1 = get_property(arg1, "b_addr")
if addr1:
connect(addr1)
Further information
See the examples at : https://codeberg.org/skyguy/petnames
Feedback welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file petnames-0.2.20251202.tar.gz.
File metadata
- Download URL: petnames-0.2.20251202.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19e42a588ff6ca4a1aca99aa0c5e67d00326503314d7caf64aee2dccc177c4f1
|
|
| MD5 |
275c97629b1ecc7e03948c3526c11060
|
|
| BLAKE2b-256 |
903ef3153f5a2d2f9b6e86d0a6eca8c3273a53263e502d0020ddf0d65e097f5f
|
File details
Details for the file petnames-0.2.20251202-py3-none-any.whl.
File metadata
- Download URL: petnames-0.2.20251202-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05092a09920bcd956d509906a94852689803cf7e57ab2b5a0689d200005739ca
|
|
| MD5 |
4b789ddfdd71463e90fde3551dba54d8
|
|
| BLAKE2b-256 |
0b1ff94368f404d9cb18768b37be8b9df41f64028bb44cd6e87f65a904376549
|