Skip to main content

No project description provided

Project description

Media Management Command Line Interface

PyPI Downloads Supported Versions Contributors Tests Codeball

Summary

An intuitive command line interface wrapper around boto3 to search and manage media assets

Installing mmgmt & Supported Versions

mmgmt is available on PyPI:

python -m pip install mmgmt

Media Management Command Line Interface officially supports Python 3.8+.

Supported Features & Usage

For help, run:

mmgmt --help

You can also use:

python -m mmgmt --help

Commands:

Usage: mmgmt [OPTIONS] COMMAND [ARGS]...

  A simple CLI to search and manage media assets in S3 and locally. Setup with
  `mmgmt configure`

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  configure   print project configs & set configs manually
  delete      delete file from cloud storage - TODO -
  download    download object from cloud storage
  get-status  get object head from cloud storage
  hello       test endpoint
  ls          list files in location (local, s3, or global)
  search      search files in local directory and cloud storage
  upload      upload file to cloud storage

Why not use awscli?

You can, and I do, in tandem with mmgmt -- the purpose is to create an additional interface that minimized the lookup/copy/paste process I found myself frequently going through.

Another use case is for rapid prototyping applications that require an S3 interface.

For example:

import pandas as pd
import mmgmt as mmgmt

aws = mmgmt.AwsStorageMgmt(project_name="mmgmt")
obj_list = aws.get_bucket_objs()

res = []
for s3_obj in obj_list:
    res.append(
      [
        str(s3_obj.key),
        str(s3_obj.key.split('/')[0]),
        s3_obj.last_modified,
        s3_obj.storage_class,
        s3_obj.size
      ]
    )

df = pd.DataFrame(res)
df.columns = [
  'key',
  'group',
  'last_modified',
  'storage_class',
  'size'
]

Development

To contribute to this tool, first checkout the code:

git clone https://github.com/will-wright-eng/media-mgmt-cli.git
cd media-mgmt-cli

Then create a new virtual environment:

python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Install pre-commit before submitting a PR:

brew install pre-commit
pre-commit install

References

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

mmgmt-0.5.3.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

mmgmt-0.5.3-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file mmgmt-0.5.3.tar.gz.

File metadata

  • Download URL: mmgmt-0.5.3.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for mmgmt-0.5.3.tar.gz
Algorithm Hash digest
SHA256 7227803f96919229f94cdeb475ae103930ff8402672466ede38ada1dbea1caaf
MD5 9be74acb2fb4f57ade3f2fc9784e000c
BLAKE2b-256 2a4b7e63410f67d28864496461569983bc9f5e531aa1d72f17ee8761f95b9c66

See more details on using hashes here.

File details

Details for the file mmgmt-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: mmgmt-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for mmgmt-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0d296bb3603b883e5289033edc56b1f96e5603602e4d2c2e27d481d59a4ca317
MD5 77d6ba4ccb715b15e57098e9b072b2e0
BLAKE2b-256 bfd3cd611d20ed01db6ff79c0d786567f79b2225525448cf2dba890388bb2f7a

See more details on using hashes here.

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