aurl
A package for maintaining a download mirror / cache and splicing URLs into file templates.
This package provides two commands, get:
Usage: get [OPTIONS] URLS...
Download a list of URLs.
Arguments:
URLS... urls to download [required]
and subst:
Usage: subst [OPTIONS] TEMPLATES...
Fetch and substitute URLs into a template.
Arguments:
TEMPLATES... File(s) to substitute. [required]
Options:
--results / --no-results Don't substitute, but list required results.
[default: no-results]
Template Format
Templates can include URLs inside ${{ }} splices.
The [[tests/template.rc.tpl]] file demonstrates:
This is a test template
step1 = ${{ git://code.ornl.gov/DataTrails/1000water }}
root = ${{ file:///usr/bin/last }}
github = ${{ git://github.com/frobnitzem/aiowire }}
Python API
Examining the source of subst reveals a TemplateFile and Mirror classes.
The TemplateFile class parses and prints templates.
Mirror provides the async functions fetch and fetch_all:
tf = TemplateFile(fname)
urls = set(tf.uris)
M = Mirror( Path() )
lookup = arun(M.fetch_all(urls))
tf.write(out, lookup)
The Mirror class also has encode, and decode, which translate
URLs to/from fille paths inside the mirror's root path.
File server
This package includes a simple file server.
To use it, follow certified's docs to launch aurl.serve:app.
certified init --host dtn.my.org --domain my.org 'My DTN Service'
certified serve aurl.serve:app https://0.0.0.0:4433
Your client can now access this file server using
# client configuration
pip install certified
certified init 'My client'
certified get-ident # ~> (send to certified introduce on server side to get intro.json)
certified add-intro intro.json
certified add-service https://dtn.my.org:4433 intro.json
# GET using certified's message util (serial)
message https://dtn.my.org:4433/file1.h5
# GET using aurl's get tool (parallel)
get https://dtn.my.org:4433/file1.h5 https://dtn.my.org:4433/file2.zarr
Metadata
Release files for aurl-aurl 2.5.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 | Provenance | Actions |
|---|---|---|---|---|
| aurl_aurl-2.5.0.tar.gz | 14.1 kB | Without provenance | Details for aurl_aurl-2.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aurl_aurl-2.5.0-py3-none-any.whl | Python 3 | none | any | Details for aurl_aurl-2.5.0-py3-none-any.whl |
Total release size: 32.7 kB
Release files / aurl_aurl-2.5.0.tar.gz
| Download URL | aurl_aurl-2.5.0.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
642a4c68f3013ca0ceec5d6d14f5d79aa4789bf546db9aef210b2eb1d1bdec64
|
|
BLAKE2b-256 checksum How to use checksums |
2e4bc9cba09891823dac0239c3e846ade3d8ce3e56082a0be10f4c7d5aa0085e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.12 Linux/6.8.0-60-generic
|
Release files / aurl_aurl-2.5.0-py3-none-any.whl
| Download URL | aurl_aurl-2.5.0-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e89ed7c03b3bc07e77fd972bc82c714804281cccbffd60cb7e7162003c052dc4
|
|
BLAKE2b-256 checksum How to use checksums |
1c499ad529f844b49792dde0b756c366969a00fc6011d4c7a5f74adb2905351e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.12 Linux/6.8.0-60-generic
|
Security for aurl-aurl 2.5.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.