Skip to main content

Library and command-line application to interact with datasets in the Aachen Higher-Order Repository of Networks.

Project description

ahorn-loader

Library and command-line application to interact with datasets in AHORN.

Python License Codecov

Usage

ahorn-loader is both a command-line application and a Python package to interact with the AHORN repository for higher-order datasets.

Command-Line Usage

To install and use ahorn-loader from the command line, you can run the following command:

uvx ahorn-loader [command] [args]

Commands include:

  • ls: List available datasets in AHORN.
  • download: Download a dataset from AHORN.
  • validate: Validate a specific dataset file (e.g., before adding it to AHORN).

To get a full help of available commands and options, run ahorn-loader --help.

Python Package Usage

To use ahorn-loader as a Python package, you can install it via pip (or some other package manager of your choice):

pip install ahorn-loader

Then, you can use it in your Python scripts:

import ahorn_loader

# Download the latest revision of a dataset:
ahorn_loader.download_dataset("dataset_name", "target_path")

# Download a specific revision of a dataset:
ahorn_loader.download_dataset("dataset_name", "target_path", revision=3)

# Download and read a dataset:
# The dataset will be stored in your system's cache. For a more permanent storage
# location, use `ahorn_loader.download_dataset` instead.
with ahorn_loader.read_dataset("dataset_name") as dataset:
    for line in dataset:
        ...

# Validate a specific dataset (e.g., before adding it to AHORN):
ahorn_loader.validate_dataset("path_to_dataset_file")

ahorn-loader also provides an asynchronous API, which you can use for non-blocking contexts. Asynchronous functions are suffixed with _async and available for all operations.

import asyncio
import ahorn_loader


async def main() -> None:
    await ahorn_loader.download_dataset_async("dataset_name", "target_path")

    async with ahorn_loader.read_dataset_async("dataset_name") as dataset:
        for line in dataset:
            ...


asyncio.run(main())

Funding

Funded by the European Union (ERC, HIGH-HOPeS, 101039827). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.

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

ahorn_loader-0.8.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ahorn_loader-0.8.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file ahorn_loader-0.8.0.tar.gz.

File metadata

  • Download URL: ahorn_loader-0.8.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ahorn_loader-0.8.0.tar.gz
Algorithm Hash digest
SHA256 f2d28d081d75e7b70aad85a9ccb7f1ffe39adf855fe0cc2a5448005b45d66c28
MD5 fa39638ce617294cdd09c0ebfe760269
BLAKE2b-256 87215539402eeef1a6af25bcc6e731a0655bcdf5be897006f87be4a87a656b54

See more details on using hashes here.

Provenance

The following attestation bundles were made for ahorn_loader-0.8.0.tar.gz:

Publisher: publish.yml on netsci-rwth/ahorn-loader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ahorn_loader-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: ahorn_loader-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ahorn_loader-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11ae4c1ce8c0f5d60ff2abea98028b51c6e6b6f9bc7a5e176304a24706453158
MD5 0ec6cbe6d34b0979e7d1680e10802fc6
BLAKE2b-256 d3c58543a0070af10c3a68c27ba877bb8b6ca23adc1aa8ddb1e372eca84c8f6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ahorn_loader-0.8.0-py3-none-any.whl:

Publisher: publish.yml on netsci-rwth/ahorn-loader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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