Python command line wrapper around MediaConch policy checks.
Project description
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.
Install with Pip:
$ pip install ammcpc
Install from source:
$ python setup.py install
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')
System dependencies:
MediaConch version 16.12
To run the tests, make sure tox is installed, then:
$ tox
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ammcpc-0.2.0.tar.gz
.
File metadata
- Download URL: ammcpc-0.2.0.tar.gz
- Upload date:
- Size: 43.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e1bd0038641e9fb3665017828c56c2b48a68cced3890041d48f033c7b24a2d3 |
|
MD5 | c5d3363da3ae0ebe0938f8a6d97d9fa7 |
|
BLAKE2b-256 | 829ee376b6de46284399cd6ae97e0f24e85f95423292520510431db2ae8405a7 |
File details
Details for the file ammcpc-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: ammcpc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 470dc410865e7b38fe0dc0f0f8e310a70503f08aae44e1cf3c930321e57c8e35 |
|
MD5 | a01c011d5407bd154faf9ed3d5f1de33 |
|
BLAKE2b-256 | 35c73c4567b1f4e0ac3118edb69e2ef5203b56eaea490c1333d5e6fc1d5277b8 |