Skip to main content

nwmetalinks

Introduction

This packages consists of the following modules:

  • nwmetalinks is a library that creates MetaLink v4 strings from user-provided URLs and their corresponding filenames.

Getting Started

I'll use Debian as operating system, but the concept is similar for Windows or Mac.

Procedure:

  1. Install pip and venv:
sudo apt install python3-pip python3.12-venv
  1. Create a virtual environment:
python3 -m venv /tmp/nwmetalinks
source /tmp/nwmetalinks/bin/activate
  1. Download and install the package:
pip install nwmetalinks
  1. Enter in the interactive Python environment:
python3
Python 3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
  1. Try out if the library works:
from nwmetalinks import MetaLinkFactory

metalink_factory : MetaLinkFactory = MetaLinkFactory()
  1. Exit from the interactive Python environment:
exit()
  1. Deactivate and delete the virtual environment:
deactivate
rm -rf /tmp/nwmetalinks
  1. Done!

The Typical Use Case

In order to use the library, the first thing we need to do is to create a list of download URLs and a list containing their corresponding filenames, and then pass them to the CreateMetaLink4 method of a MetaLinkFactory object, as shown in the following example:

from nwmetalinks import MetaLinkFactory

package_name : str = "nwmetalinks"
tuples : list[tuple[str, str]] = [
    ("https://numbworks.github.io/nwmetalinks.zip", "nwmetalinks.zip"),
    ("https://numbworks.github.io/nwmetalinks.tar.gz", "NW.nwmetalinks.tar.gz")
]

metalink : str = MetaLinkFactory().create_metalink4("nwmetalinks", tuples)

with open("nwmetalinks.metalink", "w", encoding="utf-8") as f:
    f.write(metalink)

Here is a minimal example of a MetaLink v4 file:

<?xml version="1.0" encoding="UTF-8"?>
<metalink xmlns="urn:ietf:params:xml:ns:metalink" version="4.0">
  <identity>My Package Name</identity>

  <file name="example.bin">
    <url>https://example.com/example.bin</url>
  </file>
</metalink>

Even if it's a XML file under the hood, a MetaLink file is expected to have the .metalink extension (instead of .xml).

JDownloader has full support for the MetaLink v4 format, but it's worth mentioning that by default, once the user imports a MetaLink file, JDownloader will ping all the files inside it, to check for their online status.

When importing a MetaLink file with hundreds or thousands of links inside, could flood the website and bring the provider to blacklist your IP address.

Before importing a MetaLink file, it could be a good practice to disable the Do Link Check feature:

  1. Open JDownloader 2.
  2. Go to Settings -> Advanced Settings.
  3. Locate the setting: LinkCollector: Do Link Check
  4. Untick (disable) this option.
  5. Done!

Total Downloads (PyPi)

PyPI Downloads

Metadata

Release files for nwmetalinks 1.0.0

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

Source distribution (sdist)

Source distribution for nwmetalinks 1.0.0
File Size Uploaded Provenance Actions
nwmetalinks-1.0.0.tar.gz 4.5 kB Without provenance Details for nwmetalinks-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nwmetalinks 1.0.0
File Interpreter ABI Platform Actions
nwmetalinks-1.0.0-py3-none-any.whl Python 3 none any Details for nwmetalinks-1.0.0-py3-none-any.whl

Total release size: 9.3 kB

Security for nwmetalinks 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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