Skip to main content

pyavalon

Tools for doing things in batches in Avalon at TAMU — as a command line utility and as a Python library.

Installing

To install and use as a command line utility, use pipx:

pipx install pyavalon

To use as a library, use pip:

pip install pyavalon

Configuration

Commands talk to either the pre (staging) or prod Avalon instance, selected with --instance/-i (default: pre). Each instance requires an Avalon API key, set via environment variable:

export AVALON_PRE="your-pre-instance-api-key"
export AVALON_PROD="your-prod-instance-api-key"

Commands

Run pyavalon --help or pyavalon COMMAND --help for full details on any command.

print_all_collections

List all collections in the repository.

pyavalon print_all_collections -i pre

create_iiif_collection

Create a IIIF Collection manifest for a given Avalon collection.

pyavalon create_iiif_collection -c "mk61rh127" -o collection.json

get_file_ids_from_a_collection

Create a CSV of master files in a collection, with metadata and a path to the best-available derivative. Optionally download the derivatives via scp.

pyavalon get_file_ids_from_a_collection -c "mk61rh127" -o output.csv

Download files while building the CSV:

pyavalon get_file_ids_from_a_collection -c "mk61rh127" --download -u myusername -f tmp

Only page through a range of results (10 items per page) instead of the whole collection:

pyavalon get_file_ids_from_a_collection -c "mk61rh127" --get_range --start 1 --end 5

get_media_object

Fetch a media object (or other Avalon object type) and pretty-print it, also writing it to media_object.json.

pyavalon get_media_object -m "mk61rh127" -t media_object

upload_supplemental_files

Upload PDFs, transcripts, or captions to existing files based on a CSV manifest.

CSV columns: id,filename,label,type (type is one of pdf, caption, or transcript).

pyavalon upload_supplemental_files -c supplementals.csv

find_files_missing_supplementals

Find all master files in a collection missing a given supplemental file type (caption, transcript, or pdf).

pyavalon find_files_missing_supplementals -c "mk61rh127" -t transcript

get_json_for_whisper_reviewer

Build a JSON manifest (audio/vtt/url per item) for use with a Whisper transcript reviewer site, from a CSV of media object ids.

CSV columns: media_object_id,path_to_json,path_to_vtts.

pyavalon get_json_for_whisper_reviewer -c input.csv -o output.json

create_ami_set

Builds an AMI set from a collection id.

pyavalon create_ami_set -c <collection_id> -i prod -o ami_set.csv

Running Tests

pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyavalon-0.1.14.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

pyavalon-0.1.14-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file pyavalon-0.1.14.tar.gz.

File metadata

  • Download URL: pyavalon-0.1.14.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/23.6.0

File hashes

Hashes for pyavalon-0.1.14.tar.gz
Algorithm Hash digest
SHA256 dadbe4340f4b98f3bd1066e44d8cafa217726b0fa3eb89920afa820671179520
MD5 8f551ffef54450bbe117238240f9be32
BLAKE2b-256 e036bd8822e770ec6965593a78d7556c545e6b36b4fd79c2c63bff93cd2dd11b

See more details on using hashes here.

File details

Details for the file pyavalon-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: pyavalon-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/23.6.0

File hashes

Hashes for pyavalon-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 9e28284c7e848d4da66749f7f682d20f3fd8190f0404e8de117483a11bc4cf03
MD5 519244e6f99cd12c8e0bf57030189c79
BLAKE2b-256 125bde9feb93b6b4076f44aae17b92c89c0d9572f9612d358e48f9ec837ef546

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.14 This release

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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