Skip to main content

Python's PIP configuration manager

Project description

PIPCONF - The PIP configuration manager

Python Tests Publish PyPI - Version Sponsor

If you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was made for you.

Introduction

The pipconf is based in pip.conf files in $HOME/.pip folder. But you won't create it with this name. So, you need to create your configuration files following the template config-file-name.conf.

For the first steps, create a new configuration.

$ pipconf new my-config.conf --open

The file will come with a configuration template. All you need to do is just replace with your necessities.

<!-- my-config.conf -->

[global]
index-url = https://pypi.org/simple
# extra-index-url = 
# trusted-host = 
# timeout = 15
# retries = 5
...
<!-- company-config.conf -->

[global]
index-url = http://mycompany.com/artifactory/api/pypi/pypi/simple
extra-index-url = http://mycompany.com/artifactory/api/pypi/pypi-local/simple/
trusted-host = mycompany.com

Instalation

The package is available at pypi.org. Then, you can install it using pip.

$ pip install pipconf

Usage

$ pipconf --help

The expected output should be something like the following content.

 Usage: pipconf [OPTIONS] COMMAND [ARGS]...         
                                                    
 ______ ___________  _____ _____ _   _ ______       
 | ___ \_   _| ___ \/  __ \  _  | \ | ||  ___|      
 | |_/ / | | | |_/ /| /  \/ | | |  \| || |          
 |  __/  | | |  __/ | |   | | | | . ` ||  _|        
 | |    _| |_| |    | \__/\ \_/ / |\  || |          
 \_|    \___/\_|     \____/\___/\_| \_/\_| v2.0.0   
                                                    
 Under BSD-2-Clause License, by @jjpaulo2           
 Contribute at https://github.com/jjpaulo2/pipconf  
                                                    
╭─ Display informations ───────────────────────────╮
│ current   Shows the currently active config file │
│ list      Lists all available configs            │
│ show      Shows a config file content            │
╰──────────────────────────────────────────────────╯
╭─ Change configurations ──────────────────────────╮
│ local   Select a config file in current workdir  │
│ new     Creates a new config file                │
│ set     Select a configuration                   │
╰──────────────────────────────────────────────────╯

List all available configurations

$ pipconf list
Available configurations at /home/user/.pip:

● company.conf (/home/user/.pip/company.conf)
○ my-config.conf (/home/user/.pip/my-config.conf)
○ project.conf (/home/user/.pip/project-config.conf)

Create a new configuration

$ pipconf new my-config
Config file my-config.conf created!

You can also pass a --open flag to create and open the file.

$ pipconf new my-config --open

Get current configuration

$ pipconf current
Current configuration is /home/user/.pip/my-conf.conf!

Show the configuration file content

$ pipconf show my-conf
╭─────────── /home/user/.pip/test.conf ────────────╮
│ [global]                                         │
│ index-url = https://pypi.org/simple              │
│ ...                                              │
╰──────────────────────────────────────────────────╯

If you don't pass any parameter, the command will show the content of the current configation file.

$ pipconf show

Set configuration file

$ pipconf set my-config
Configuration is now set to my-config.conf!

Set local file as the current config

If in the current workdir exists a file named pip.conf, you can set it as the current configuration.

$ pipconf local
Configuration is now set to /home/user/workspace/project/pip.conf!

Under BSD-2-Clause License, by @jjpaulo2.

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

pipconf-2.0.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

pipconf-2.0.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file pipconf-2.0.1.tar.gz.

File metadata

  • Download URL: pipconf-2.0.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for pipconf-2.0.1.tar.gz
Algorithm Hash digest
SHA256 868aebb6959f4719ba1418f8412d48a47ebf3ae00ad10aa5841cc09440b40454
MD5 189860bad5492efb21dca4fc1b54d823
BLAKE2b-256 aebcdbc68c9f5f1606dc4ca97eb0ef4f202fa556cee254de3877b4cac0a59f93

See more details on using hashes here.

File details

Details for the file pipconf-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pipconf-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for pipconf-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f16326816cbc601f8b8d89ab8d04fb4e84f80eb6958a0c2623097292e669f6aa
MD5 810091b4d50734106baf1c369d158be8
BLAKE2b-256 b4d78390a72260f63cee7d61ec2ce1283d8365038be08b782bc45fa5812574ae

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