Democritus Netstrings
Democritus functions[1] for working with Netstrings.
[1] Democritus functions are simple, effective, modular, well-tested, and well-documented Python functions.
We use d8s (pronounced "dee-eights") as an abbreviation for democritus (you can read more about this here).
Installation
pip install d8s-netstrings
Usage
You import the library like:
from d8s_netstrings import *
Once imported, you can use any of the functions listed below.
Functions
-
def string_to_netstring_ascii(string: str, *args): """Convert the given string to a netstring (and return it's ascii representation)."""
-
def string_to_netstring_hex(string: str, *args): """Convert the given string to a netstring (and return it's hex representation)."""
-
def netstring_ascii_to_netstring_hex(netstring_ascii: str): """Convert a netstring (represented as ascii) to its hex representation."""
-
def netstring_hex_to_netstring_ascii(netstring_hex: str): """Convert a netstring (represented as hex) to its ascii representation."""
-
def netstring_ascii_to_string(netstring_ascii: str): """Get the string portion of the given netstring (represented as ascii)."""
-
def netstring_hex_to_string(netstring_hex: str): """Get the string portion of the given netstring (represented as hex)."""
Development
👋 If you want to get involved in this project, we have some short, helpful guides below:
If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.
Credits
This package was created with Cookiecutter and Floyd Hightower's Python project template.
Release files for d8s-netstrings 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| d8s_netstrings-0.6.0.tar.gz | 89.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| d8s_netstrings-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 108.4 kB
Release files / d8s_netstrings-0.6.0.tar.gz
| Download URL | d8s_netstrings-0.6.0.tar.gz |
|---|---|
| Size | 89.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb31c8997841f4e63a5247b8dcc689f14d923702b7ff955b6d63839965a2c547
|
|
BLAKE2b-256 checksum How to use checksums |
f143d8985ee672d99dcf319a21a03207c7a774d55859cd26b245d5565fddc9b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logRelease files / d8s_netstrings-0.6.0-py3-none-any.whl
| Download URL | d8s_netstrings-0.6.0-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d43557636aff0bf6c3d9f88ac35c63efec80760fb77dc1e38ad9bb5c20e3cad7
|
|
BLAKE2b-256 checksum How to use checksums |
bca8e560fd9c36bfca11008b5fc90c488182442a2cc2eeb0f829837eaf7b0167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency log