A simple and easy to use Python's PIP configuration manager, similar to the Arch Linux's Java manager.

Overview

PIPCONF - The PIP configuration manager

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 $HOME/.pip folder.

# Create the folder, and enter it
$ mkdir $HOME/.pip
$ cd $HOME/.pip

# Create 2 files inside .pip folder
$ touch personal-config.conf company-config.conf

Inside the files, you can put the configurations like index-url, timeout, extra-index-url, trusted-host, etc. You can confer here all the options.

<!-- personal-config.conf -->

[global]
index-url = https://pypi.org/simple/
trusted-host = pypi.org
<!-- 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

If you prefet to install from code, try this. This project uses only pure Python. So, you don't need to install any project dependencies. Just run the setuptools installer.

$ python setup.py install

Usage

$ pipconf --help

The expected output should be something like the following content.

usage: pipconf [-h] [--current] [--list] [--set FILENAME] [--local]

______ ___________  _____ _____ _   _ ______
| ___ \_   _| ___ \/  __ \  _  | \ | ||  ___|
| |_/ / | | | |_/ /| /  \/ | | |  \| || |_
|  __/  | | |  __/ | |   | | | | . ` ||  _|
| |    _| |_| |    | \__/\ \_/ / |\  || |
\_|    \___/\_|     \____/\___/\_| \_/\_|  v0.1.0

Under BSD-2-Clause License, by @jjpaulo2
Contribute at https://github.com/jjpaulo2/pipconf

optional arguments:
-h, --help      show this help message and exit

display informations:
--current       show the current pip configuration file
--list          list all user configurations avaliable at $HOME/.pip

change configuration:
--set FILENAME  set the global configuration for pip from a file in $HOME/.pip
--local         set the pip configuration for the current directory file

Querying the current configuration file

$ pipconf --current

This command will show the current file used. If you are not using anyone, it will show it too.

The current pip configuration file is /home/jjpaulo2/.pip/personal-config.conf

Querying the avaliable configuration files in $HOME/.pip

$ pipconf --list

This command will show the avaliable configuration files in $HOME/.pip folder. If someone of then is being used, you will see a * simbol at it left.

* personal-config (/home/jjpaulo2/.pip/personal-config.conf)
  company-config (/home/jjpaulo2/.pip/company-config.conf)

Setting a file from $HOME/.pip as current configuration file

$ pipconf --set company-config

This will update the current file used, and will output the following message.

Current pip configuration successfully updated.
The active config file is /home/jjpaulo2/.pip/company-config.conf

Setting a pip.conf file from the current working directory

$ ls
pip.conf ...

If the current directory you are in, have a pip.conf file, then you can just active it.

pipconf --local

The output should be something like the following content.

Geting configuration file from current directory.
The active config file is /home/jjpaulo2/dev/myproject/pip.conf
You might also like...
An assistant to guess your pip dependencies from your code, without using a requirements file.

Pip Sala Bim is an assistant to guess your pip dependencies from your code, without using a requirements file. Pip Sala Bim will tell you which packag

InverterApi - This project has been designed to take monitoring data from Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta

InverterApi - This project has been designed to take monitoring data from Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta

Py4J enables Python programs to dynamically access arbitrary Java objects

Py4J Py4J enables Python programs running in a Python interpreter to dynamically access Java objects in a Java Virtual Machine. Methods are called as

Todos os exercícios do Curso de Python, do canal Curso em Vídeo, resolvidos em Python, Javascript, Java, C++, C# e mais...
Todos os exercícios do Curso de Python, do canal Curso em Vídeo, resolvidos em Python, Javascript, Java, C++, C# e mais...

Exercícios - CeV Oferecido por Linguagens utilizadas atualmente O que vai encontrar aqui? 👀 Esse repositório é dedicado a armazenar todos os enunciad

Tools for analyzing Java JVM gc log files

gc_log This package consists of two separate utilities useful for : gc_log_visualizer.py regionsize.py GC Log Visualizer This was updated to run under

Check broken access control exists in the Java web application
Check broken access control exists in the Java web application

javaEeAccessControlCheck Check broken access control exists in the Java web application. 检查 Java Web 应用程序中是否存在访问控制绕过问题。 使用 python3 javaEeAccessControl

🎉 🎉 PyComp - Java Code compiler written in python.

🎉 🎉 PyComp Java Code compiler written in python. This is yet another compiler meant for babcock students project which was created using pure python

PyGo custom language, New but similar language programming

New but similar language programming. Now we are capable to program in a very similar language to Python but at the same time get the efficiency of Go.

Jogo em redes similar ao clássico pedra papel e tesoura

Batalha Tática Tecnologias de Redes de Computadores-A-N-JOGOS DIGITAIS Professor Fabio Henrique Cabrini Alunos: Eric Henrique de Oliveira Silva - RA 1

Comments
  • Comando para criar nova configuração

    Comando para criar nova configuração

    Podemos adicionar um novo comando à ferramenta, como por exemplo, pipconf new <config-name> para que seja criado um novo arquivo de configurações, e abrindo ele em algum editor de texto padrão para edição.

    opened by jjpaulo2 0
  • Criar arquivo pip.conf automaticamente na primeira execução

    Criar arquivo pip.conf automaticamente na primeira execução

    Hoje, é necessário primeiro configurar manualmente a pasta $HOME/.pip e povoar ela com ao menos um arquivo para tornar possível iniciar a utilizar a ferramenta.

    Seria ideal que caso a pasta $HOME/.pip não exista ou não haja nenhuma arquivo de configuração nela, isso seja gerado automaticamente na primeira vez em que a ferramenta é executada.

    opened by jjpaulo2 0
Releases(1.0.0)
Owner
João Paulo Carvalho
Back End Engineer at Serasa eCred. Python lover. Game development enthusiast.
João Paulo Carvalho
PIP Manager written in python Tkinter

PIP Manager About PIP Manager is designed to make Python Package handling easier by just a click of a button!! Available Features Installing packages

Will Payne 9 Dec 9, 2022
Providing a working, flexible, easier and faster installer than the one officially provided by Arch Linux

Purpose The purpose is to bring more people to Arch Linux by providing a working, flexible, easier and faster installer than the one officially provid

André Luís 0 Nov 9, 2022
A very small (15 lines of code) and beautiful fetch script (exclusively for Arch Linux).

minifetch A very small (15 lines of code) and beautiful fetch script (exclusively for Arch Linux). There are many fetch scripts out there but I wanted

null 16 Jul 11, 2022
Myrepo - A tool to create your own Arch Linux repository

myrepo A (experimental) tool to create your own Arch Linux repository Example We

Anton Hvornum 5 Feb 19, 2022
ArinjoyTheDev 1 Jul 17, 2022
MiniJVM is simple java virtual machine written by python language, it can load class file from file system and run it.

MiniJVM MiniJVM是一款使用python编写的简易JVM,能够从本地加载class文件并且执行绝大多数指令。 支持的功能 1.从本地磁盘加载class并解析 2.支持绝大多数指令集的执行 3.支持虚拟机内存分区以及对象的创建 4.支持方法的调用和参数传递 5.支持静态代码块的初始化 不支

keguoyu 60 Apr 1, 2022
Generate Openbox Menus from a easy to write configuration file.

openbox-menu-generator Generate Openbox Menus from a easy to write configuration file. Example Configuration: ('#' indicate comments but not implement

null 3 Jul 14, 2022
This library is an ongoing effort towards bringing the data exchanging ability between Java/Scala and Python

PyJava This library is an ongoing effort towards bringing the data exchanging ability between Java/Scala and Python

Byzer 6 Oct 17, 2022
PIP VA TASHQI KUTUBXONALAR

39-dars PIP VA TASHQI KUTUBXONALAR KIRISH Avvalgi darsimizda Python bilan birga o'rnatluvchi, standart kutubxona va undagi ba'zi foydali modullar bila

Sayfiddin 3 Nov 25, 2021
Manually Install Python 2.7 pip without any problem !

Python2.7_install_pip Manually Install Python 2.7 pip without any problem ! Download installPip.py to your system and Run the code using this Command

Ali Jafari 1 Dec 9, 2021