# PIPCONF - The PIP configuration manager
![Python](https://img.shields.io/badge/Python-3.8_%7C_3.9_%7C_3.10_%7C_3.11_%7C_3.12-green)
[![Tests](https://github.com/jjpaulo2/pipconf/actions/workflows/tests.yaml/badge.svg?branch=main)](https://github.com/jjpaulo2/pipconf/actions/workflows/tests.yaml)
[![Publish](https://github.com/jjpaulo2/pipconf/actions/workflows/publish.yaml/badge.svg)](https://github.com/jjpaulo2/pipconf/actions/workflows/publish.yaml)
[![PyPI - Version](https://img.shields.io/pypi/v/pipconf)](https://pypi.org/project/pipconf/)
[![Sponsor](https://img.shields.io/badge/Sponsor-Pipconf-deeppink)](https://github.com/sponsors/jjpaulo2)
![](screenshot.png)
If you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was made for you.
- [Introduction](#introduction)
- [Installation](#instalation)
- [Usage](#usage)
- [List all available configurations](#list-all-available-configurations)
- [Create a new configuration](#create-a-new-configuration)
- [Get current configuration](#get-current-configuration)
- [Show the configuration file content](#show-the-configuration-file-content)
- [Set configuration file](#set-configuration-file)
- [Set local file as the current config](#set-local-file-as-the-current-config)
### 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.
```shell
$ 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.
```toml
<!-- my-config.conf -->
[global]
index-url = https://pypi.org/simple
# extra-index-url =
# trusted-host =
# timeout = 15
# retries = 5
...
```
```toml
<!-- 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](https://pypi.org/project/pipconf/). Then, you can install it using pip.
```shell
$ pip install pipconf
```
## Usage
```shell
$ 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
```shell
$ 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
```shell
$ pipconf new my-config
```
```
Config file my-config.conf created!
```
You can also pass a `--open` flag to create and open the file.
```shell
$ pipconf new my-config --open
```
### Get current configuration
```shell
$ pipconf current
```
```
Current configuration is /home/user/.pip/my-conf.conf!
```
### Show the configuration file content
```shell
$ 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.
```shell
$ pipconf show
```
### Set configuration file
```shell
$ 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.
```shell
$ pipconf local
```
```
Configuration is now set to /home/user/workspace/project/pip.conf!
```
---
Under [BSD-2-Clause License](./LICENSE), by [@jjpaulo2](https://github.com/jjpaulo2).
Raw data
{
"_id": null,
"home_page": "https://github.com/jjpaulo2/pipconf",
"name": "pipconf",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "configurations, configs, settings, pip, pip.conf",
"author": "Jo\u00e3o Paulo Carvalho",
"author_email": "jjpaulo2@protonmail.com",
"download_url": "https://files.pythonhosted.org/packages/ae/bc/dbc68c9f5f1606dc4ca97eb0ef4f202fa556cee254de3877b4cac0a59f93/pipconf-2.0.1.tar.gz",
"platform": null,
"description": "# PIPCONF - The PIP configuration manager\n\n![Python](https://img.shields.io/badge/Python-3.8_%7C_3.9_%7C_3.10_%7C_3.11_%7C_3.12-green)\n[![Tests](https://github.com/jjpaulo2/pipconf/actions/workflows/tests.yaml/badge.svg?branch=main)](https://github.com/jjpaulo2/pipconf/actions/workflows/tests.yaml)\n[![Publish](https://github.com/jjpaulo2/pipconf/actions/workflows/publish.yaml/badge.svg)](https://github.com/jjpaulo2/pipconf/actions/workflows/publish.yaml)\n[![PyPI - Version](https://img.shields.io/pypi/v/pipconf)](https://pypi.org/project/pipconf/)\n[![Sponsor](https://img.shields.io/badge/Sponsor-Pipconf-deeppink)](https://github.com/sponsors/jjpaulo2)\n\n![](screenshot.png)\n\nIf you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was made for you.\n\n- [Introduction](#introduction)\n- [Installation](#instalation)\n- [Usage](#usage)\n - [List all available configurations](#list-all-available-configurations)\n - [Create a new configuration](#create-a-new-configuration)\n - [Get current configuration](#get-current-configuration)\n - [Show the configuration file content](#show-the-configuration-file-content)\n - [Set configuration file](#set-configuration-file)\n - [Set local file as the current config](#set-local-file-as-the-current-config)\n\n\n\n### Introduction\n\nThe `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`. \n\nFor the first steps, create a new configuration.\n\n```shell\n$ pipconf new my-config.conf --open\n```\n\nThe file will come with a configuration template. All you need to do is just replace with your necessities.\n\n```toml\n<!-- my-config.conf -->\n\n[global]\nindex-url = https://pypi.org/simple\n# extra-index-url = \n# trusted-host = \n# timeout = 15\n# retries = 5\n...\n```\n\n```toml\n<!-- company-config.conf -->\n\n[global]\nindex-url = http://mycompany.com/artifactory/api/pypi/pypi/simple\nextra-index-url = http://mycompany.com/artifactory/api/pypi/pypi-local/simple/\ntrusted-host = mycompany.com\n```\n\n## Instalation\n\nThe package is available at [pypi.org](https://pypi.org/project/pipconf/). Then, you can install it using pip.\n\n```shell\n$ pip install pipconf\n```\n\n## Usage\n\n```shell\n$ pipconf --help\n```\nThe expected output should be something like the following content.\n\n```\n Usage: pipconf [OPTIONS] COMMAND [ARGS]... \n \n ______ ___________ _____ _____ _ _ ______ \n | ___ \\_ _| ___ \\/ __ \\ _ | \\ | || ___| \n | |_/ / | | | |_/ /| / \\/ | | | \\| || | \n | __/ | | | __/ | | | | | | . ` || _| \n | | _| |_| | | \\__/\\ \\_/ / |\\ || | \n \\_| \\___/\\_| \\____/\\___/\\_| \\_/\\_| v2.0.0 \n \n Under BSD-2-Clause License, by @jjpaulo2 \n Contribute at https://github.com/jjpaulo2/pipconf \n \n\u256d\u2500 Display informations \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 current Shows the currently active config file \u2502\n\u2502 list Lists all available configs \u2502\n\u2502 show Shows a config file content \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Change configurations \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 local Select a config file in current workdir \u2502\n\u2502 new Creates a new config file \u2502\n\u2502 set Select a configuration \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n\n### List all available configurations\n\n```shell\n$ pipconf list\n```\n```\nAvailable configurations at /home/user/.pip:\n\n\u25cf company.conf (/home/user/.pip/company.conf)\n\u25cb my-config.conf (/home/user/.pip/my-config.conf)\n\u25cb project.conf (/home/user/.pip/project-config.conf)\n```\n\n### Create a new configuration\n\n```shell\n$ pipconf new my-config\n```\n```\nConfig file my-config.conf created!\n```\n\nYou can also pass a `--open` flag to create and open the file.\n\n```shell\n$ pipconf new my-config --open\n```\n\n### Get current configuration\n\n```shell\n$ pipconf current\n```\n```\nCurrent configuration is /home/user/.pip/my-conf.conf!\n```\n\n### Show the configuration file content\n\n```shell\n$ pipconf show my-conf\n```\n```\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 /home/user/.pip/test.conf \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 [global] \u2502\n\u2502 index-url = https://pypi.org/simple \u2502\n\u2502 ... \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n\nIf you don't pass any parameter, the command will show the content of the current configation file.\n\n```shell\n$ pipconf show\n```\n\n### Set configuration file\n\n```shell\n$ pipconf set my-config\n```\n```\nConfiguration is now set to my-config.conf!\n```\n\n### Set local file as the current config\n\nIf in the current workdir exists a file named `pip.conf`, you can set it as the current configuration.\n\n```shell\n$ pipconf local\n```\n```\nConfiguration is now set to /home/user/workspace/project/pip.conf!\n```\n\n---\n\nUnder [BSD-2-Clause License](./LICENSE), by [@jjpaulo2](https://github.com/jjpaulo2).\n\n",
"bugtrack_url": null,
"license": "BSD-2-Clause",
"summary": "Python's PIP configuration manager",
"version": "2.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/jjpaulo2/pipconf/issues",
"Documentation": "https://jjpaulo2.github.io/pipconf/",
"Homepage": "https://github.com/jjpaulo2/pipconf",
"Repository": "https://github.com/jjpaulo2/pipconf"
},
"split_keywords": [
"configurations",
" configs",
" settings",
" pip",
" pip.conf"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b4d78390a72260f63cee7d61ec2ce1283d8365038be08b782bc45fa5812574ae",
"md5": "810091b4d50734106baf1c369d158be8",
"sha256": "f16326816cbc601f8b8d89ab8d04fb4e84f80eb6958a0c2623097292e669f6aa"
},
"downloads": -1,
"filename": "pipconf-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "810091b4d50734106baf1c369d158be8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 7618,
"upload_time": "2024-08-10T04:28:00",
"upload_time_iso_8601": "2024-08-10T04:28:00.886389Z",
"url": "https://files.pythonhosted.org/packages/b4/d7/8390a72260f63cee7d61ec2ce1283d8365038be08b782bc45fa5812574ae/pipconf-2.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "aebcdbc68c9f5f1606dc4ca97eb0ef4f202fa556cee254de3877b4cac0a59f93",
"md5": "189860bad5492efb21dca4fc1b54d823",
"sha256": "868aebb6959f4719ba1418f8412d48a47ebf3ae00ad10aa5841cc09440b40454"
},
"downloads": -1,
"filename": "pipconf-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "189860bad5492efb21dca4fc1b54d823",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 6164,
"upload_time": "2024-08-10T04:28:02",
"upload_time_iso_8601": "2024-08-10T04:28:02.415997Z",
"url": "https://files.pythonhosted.org/packages/ae/bc/dbc68c9f5f1606dc4ca97eb0ef4f202fa556cee254de3877b4cac0a59f93/pipconf-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-10 04:28:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jjpaulo2",
"github_project": "pipconf",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pipconf"
}