Skip to main content

A toolkit to manager the fastest mirror of various tools, such as pip, npm, composer and etc.

Project description

umm: yoUr Mirror Manager

A toolkit to manager the fastest mirror of various tools, such as pip, npm, composer and etc.

Table of Contents

Features

We are going to support to manage the mirror of following tools:

  • pip
  • npm
  • composer
  • homebrew
  • linuxbrew
  • golang
  • docker
  • ubuntu
  • centos
  • julia
  • etc.

Installation

pip install umm

Upgrade

pip install -U umm

Usage

Show umm help

umm

or

umm --ehlp

Output

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

  A toolkit to manager the fastest mirror of various tools, such as pip,
  npm, composer and etc.

Options:
  --help  Show this message and exit.

Commands:
  npm  Manage npm mirrors.
  pip  Manage pip mirrors.
  v    Show umm version.

Manage pip

Show umm pip help

umm pip

or

umm pip --ehlp

Output

Usage: umm pip [OPTIONS] COMMAND [ARGS]...

  Manage pip mirrors.

Options:
  --help  Show this message and exit.

Commands:
  ls   List all available mirrors
  now  Show current mirror.
  use  Use the given mirror.

List all available mirrors of pip

umm pip ls

Output

o               https://pypi.python.org/simple/
tuna            https://pypi.tuna.tsinghua.edu.cn/simple
douban          http://pypi.douban.com/simple/
aliyun          https://mirrors.aliyun.com/pypi/simple/
ustc            https://mirrors.ustc.edu.cn/pypi/web/simple

Use the given mirror for pip

For example, use the tuna mirror.

umm pip use tuna

Show current mirror of pip

umm pip now

Output

tuna            https://pypi.tuna.tsinghua.edu.cn/simple

Manage npm

Show umm npm help

umm npm

or

umm npm --ehlp

Output

Usage: umm npm [OPTIONS] COMMAND [ARGS]...

  Manage npm mirrors.

Options:
  --help  Show this message and exit.

Commands:
  ls   List all available mirrors.
  now  Show current using mirror.
  use  Use the given mirror.

List all available mirrors of npm

umm npm ls

Output

  [npm] name      url
------------------------------------------------------------
* o               https://registry.npmjs.org/
  cnpm            http://r.cnpmjs.org/
  taobao          https://registry.npm.taobao.org/
  nj              https://registry.nodejitsu.com/
  npmMirror       https://skimdb.npmjs.com/registry/
  edunpm          http://registry.enpmjs.org/

Use the given mirror for npm

For example, use the tabao mirror.

umm npm use taobao

Show current mirror of npm

umm npm now

Output

taobao          https://registry.npm.taobao.org/

How to test

install locally

Once your developed a while and want to test the umm, your have two ways to test:

  1. install this package in your local via:
pip install --editable .
  1. or, directly run the python file via:
python -m umm

run the test

Make sure you have installed pytest

cd umm/
export PYTHONPATH=src
pytest

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

umm-0.6.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

umm-0.6.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file umm-0.6.1.tar.gz.

File metadata

  • Download URL: umm-0.6.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for umm-0.6.1.tar.gz
Algorithm Hash digest
SHA256 ed5c75d776d202e765956d65f27f179c458829e3ceb6a0bc589f8af3a5d0f942
MD5 a87e77219096ab7543a0930979a6beb4
BLAKE2b-256 6760d90848bbe1d6df029e487bd6d64b520cbb86d710be9efb9404d0caeaf3c5

See more details on using hashes here.

File details

Details for the file umm-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: umm-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for umm-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee72a37b23396f0e0e1522b0ea39e90cc22e91255cd5afa8d0fc327abc0d73ad
MD5 06349540a61e1f73ce7e42c0b07ad5d1
BLAKE2b-256 a2abbb07a861f675489ef19b0dd1c0e9080eb233398cab4cce7fb5639a420cd7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page