Skip to main content

mycelium-client

This is the official reference implementation of the Mycelium client software, written in Python. It comes with a library for Python applications, as well as a CLI for end-users.

Usage

As a CLI

In order to use the Mycelium client as a CLI, you need to install the mycelium-client[cli] variant:

pip3 install mycelium-client[cli]

Once that's done, you can get help information with mycelium-client --help:

$ mycelium-client --help
Usage: mycelium-client [OPTIONS] [COMMAND] [ARGS]...

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  fetch
  show

As a Python library

The Mycelium client includes experimental support for use as a Python library without installing the CLI dependencies (this is what's supplied with the normal mycelium-client package):

import mycelium_client as mycelium
mycelium.fetch_hash(asset_hash="abcdef123...", oak="http://example.com:8000/", use_tqdm=False, quiet=True, timeout=15) # Fetch a hash.

mycelium.show_entries_md(filter_hash="", oak="http://example.com:8000/") # Generate human-readable Markdown describing the current entries advertised by an Oak. Leave filter_hash blank to disable hash filtering; set to a hash to filter for it.

mycelium.fetch_mycelium_file(content="CONTENTS-GO-HERE", quiet=True, use_tqdm=False, timeout=15) # Fetch using a Mycelium reference file. See example.mycelium for an example.

Make sure to use version pinning whenever you're writing code that depends on mycelium-client, as it has breaking changes frequently and is still very much not ready for production.

Mycelium reference files

The Mycelium client comes with built-in support for Mycelium reference files (MRFs for short). MRFs are brief files that give the client a list of suggested filenames, their hashes, the Oaks where they can be located, and a human-readable comment (optional). They're roughly equivalent to torrent files in BitTorrent.

Here's the example MRF file found at example.mycelium:

728ccb8dbeacf20d675bf3470481ef6432eb5d34f1da2aefe9e2dbf23abb6a7e:output1.png
00e991bfda1960f0f7b381a2b32f87c29f6204bd9791c76317b84be40ad9015f:output2.png
---
https://oak-f9d2f0e9.fastapicloud.dev/
---
This is an example Mycelium reference file (.mycelium). The first set of lines is a series of hashes followed by a colon and then their suggested file names.

The second set of lines provides suggested Oak servers that may have relevant listings, and the third set of lines is a human-readable comment.

Metadata

Release files for mycelium-client 0.4.1

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

Source distribution (sdist)

Source distribution for mycelium-client 0.4.1
File Size Uploaded
mycelium_client-0.4.1.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mycelium-client 0.4.1
File Interpreter ABI Platform
mycelium_client-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / mycelium_client-0.4.1.tar.gz

Download URL mycelium_client-0.4.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c43b8f930f57bd4967af6056891e178c921b83c23e4eb96360eb71865571d62c
BLAKE2b-256 checksum
How to use checksums
3c5f94da896c49a36843735a82f5ce1dc39fbf1c99f3318cd74f7814bdd2b0e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.14.4 HTTPX/0.28.1

Release files / mycelium_client-0.4.1-py3-none-any.whl

Download URL mycelium_client-0.4.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
692f89f1beb711179fc4f794c43c84c3b7a569c63fa438d891fd84e38ae058e2
BLAKE2b-256 checksum
How to use checksums
d67138c4b042581554cec0bbbee11a494e845c1e1657339f63e063a359976ca3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.14.4 HTTPX/0.28.1

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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