Skip to main content

Python command line wrapper around MediaConch policy checks.

Project description

ammcpc --- Archivematica (AM) MediaConch (MC) Policy Checker (PC)

PyPI version GitHub CI codecov

This command-line application and python module is a simple wrapper around the MediaConch tool which takes a file and a MediaConch policy file as input and prints to stdout a JSON object indicating, in a way that Archivematica likes, whether the file passes the policy check.

Installation

Install with pip:

    pip install ammcpc

Install from source:

    python setup.py install

Usage

Command-line usage:

    ammcpc <PATH_TO_FILE> <PATH_TO_POLICY>

Python usage with a policy file path:

    >>> from ammcpc import MediaConchPolicyCheckerCommand
    >>> policy_checker = MediaConchPolicyCheckerCommand(
            policy_file_path='/path/to/my-policy.xml')
    >>> exitcode = policy_checker.check('/path/to/file.mkv')

Python usage with a policy as a string:

    >>> policy_checker = MediaConchPolicyCheckerCommand(
            policy='<?xml><policy> ... </policy>',
            policy_file_name='my-policy.xml')
    >>> exitcode = policy_checker.check('/path/to/file.mkv')

Requirements

System dependencies:

  • MediaConch version 16.12

Testing

To run the tests, make sure tox is installed, then:

    tox

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

ammcpc-0.3.0.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

ammcpc-0.3.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file ammcpc-0.3.0.tar.gz.

File metadata

  • Download URL: ammcpc-0.3.0.tar.gz
  • Upload date:
  • Size: 44.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for ammcpc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0ce56b4a52d926b257b6c8c285056179c331a1ac517ec70618cca7ba54e21f9b
MD5 931bd683dc7ca7d70253273d5e2b9f46
BLAKE2b-256 becb1e320141ee6e33fae510aaf18d43e46928b259564fdf0bc428c19aef5b7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ammcpc-0.3.0.tar.gz:

Publisher: release.yml on artefactual-labs/ammcpc

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

File details

Details for the file ammcpc-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ammcpc-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for ammcpc-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4939ae98772f07f114f51f78492425dd06bd0f88739476af578d2ce4ffdd8fce
MD5 838a3b1c25246d7309aa81c563a63c6e
BLAKE2b-256 52c21c9982013a5ac9b42259de416db0c8c344a00f0600dcde588d56b7c2b0cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ammcpc-0.3.0-py3-none-any.whl:

Publisher: release.yml on artefactual-labs/ammcpc

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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page