Name | swenv JSON |
Version |
1.0.2
JSON |
| download |
home_page | None |
Summary | Switch system and application settings based on the detected network environment. |
upload_time | 2025-08-03 00:21:29 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9.2 |
license | None |
keywords |
environment
env
linux
workstation
station
switch
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Swenv
======
Switch system and application settings based on the detected network environment.
## Quick start
Prerequisites: Python (version >= 3.9.2)
- [Download for Windows](https://www.python.org/downloads/)
- Install on Linux Debian / Ubuntu: `sudo apt install python3`
To install using the [published PyPI package](https://pypi.org/project/swenv/), run:
pip install swenv
swenv configure
To install from the [source repositority](https://gitlab.com/ipamo/swenv.git), run:
git clone https://gitlab.com/ipamo/swenv.git
cd swenv
python -m swenv configure
The application can then be executed directly. Example:
swenv
To view available options, run:
swenv --help
## Configuration
Configuration directory is located at `APPDATA\Roaming\swenv` in your Windows home (or in `~/.local/share/swenv` if you use Linux).
An environment is configured using a JSON file in the configuration directory. Example for an environment named `mycompany` (configuration file `APPDATA\Roaming\swenv\mycompany.json` on Windows or `~/.local/share/swenv/mycompany.json` on Linux):
```json
{
"dns_servers": [
"10.0.0.1",
"10.0.0.2",
],
"proxy_host": "proxy.mycompany.local",
"proxy_port": 3128,
"proxy_cafile": "ca-certificates/mycompany-ca-proxy.crt",
"no_proxy": "10.*,192.168.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*,172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*,172.28.*,172.29.*,172.30.*,172.31.*,127.*,130.93.17.229,localhost,mycompany.local",
"apt_repositories": {
"root": "http://nexus.mycompany.local/repository",
"http://deb.debian.org/debian": {
"bookworm": "debian-bookworm",
"bookworm-updates": "debian-bookworm-updates",
"bookworm-backports": "debian-bookworm-backports"
},
"http://security.debian.org/debian-security": {
"bookworm-security": "debian-bookworm-security"
},
"https://download.docker.com/linux/debian": {
"bookworm": "debian-bookworm-docker"
},
"https://deb.nodesource.com/node_20.x": {
"nodistro": "nodesource-20.x"
},
"https://packagecloud.io/timescale/timescaledb/debian": {
"bookworm": "timescaledb-bookworm"
},
"https://packages.microsoft.com/debian/12/prod": {
"bookworm": "debian-bookworm-microsoft"
}
},
"git_repositories": [
"https://gitlab.mycompany.local"
],
"pip_repository": "https://nexus.mycompany.local/repository/pypi-group",
"npm_repository": "https://nexus.mycompany.local/repository/npm-group"
}
```
A default fallback environment called `direct` using no proxy or git/npm/apt repository is always available (it does not require a configuration file).
## Contributing
Pull requests are welcome.
See [contributing guidelines](https://gitlab.com/ipamo/swenv/-/blob/main/CONTRIBUTING.md).
## Legal
This project is licensed under the terms of the [MIT license](https://gitlab.com/ipamo/swenv/-/blob/main/LICENSE.txt).
Logo designed by [Freepik - Flaticon](https://www.flaticon.com/free-icon/global-network_4207232) (free with required attribution).
Raw data
{
"_id": null,
"home_page": null,
"name": "swenv",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9.2",
"maintainer_email": null,
"keywords": "environment, env, linux, workstation, station, switch",
"author": null,
"author_email": "S\u00e9bastien Hocquet <seb@ipamo.net>",
"download_url": null,
"platform": null,
"description": "Swenv\n======\n\nSwitch system and application settings based on the detected network environment.\n\n\n## Quick start\n\nPrerequisites: Python (version >= 3.9.2)\n- [Download for Windows](https://www.python.org/downloads/)\n- Install on Linux Debian / Ubuntu: `sudo apt install python3`\n\nTo install using the [published PyPI package](https://pypi.org/project/swenv/), run:\n\n pip install swenv\n swenv configure\n\nTo install from the [source repositority](https://gitlab.com/ipamo/swenv.git), run:\n\n git clone https://gitlab.com/ipamo/swenv.git\n cd swenv\n python -m swenv configure\n\nThe application can then be executed directly. Example:\n\n swenv\n\nTo view available options, run:\n\n swenv --help\n\n\n## Configuration\n\nConfiguration directory is located at `APPDATA\\Roaming\\swenv` in your Windows home (or in `~/.local/share/swenv` if you use Linux).\n\nAn environment is configured using a JSON file in the configuration directory. Example for an environment named `mycompany` (configuration file `APPDATA\\Roaming\\swenv\\mycompany.json` on Windows or `~/.local/share/swenv/mycompany.json` on Linux):\n\n```json\n{\n \"dns_servers\": [\n \"10.0.0.1\",\n \"10.0.0.2\",\n ],\n\n \"proxy_host\": \"proxy.mycompany.local\",\n \"proxy_port\": 3128,\n \"proxy_cafile\": \"ca-certificates/mycompany-ca-proxy.crt\",\n \"no_proxy\": \"10.*,192.168.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*,172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*,172.28.*,172.29.*,172.30.*,172.31.*,127.*,130.93.17.229,localhost,mycompany.local\",\n\n \"apt_repositories\": {\n \"root\": \"http://nexus.mycompany.local/repository\",\n \"http://deb.debian.org/debian\": {\n \"bookworm\": \"debian-bookworm\",\n \"bookworm-updates\": \"debian-bookworm-updates\",\n \"bookworm-backports\": \"debian-bookworm-backports\"\n },\n \"http://security.debian.org/debian-security\": {\n \"bookworm-security\": \"debian-bookworm-security\"\n },\n \"https://download.docker.com/linux/debian\": {\n \"bookworm\": \"debian-bookworm-docker\"\n },\n \"https://deb.nodesource.com/node_20.x\": {\n \"nodistro\": \"nodesource-20.x\"\n },\n \"https://packagecloud.io/timescale/timescaledb/debian\": {\n \"bookworm\": \"timescaledb-bookworm\"\n },\n \"https://packages.microsoft.com/debian/12/prod\": {\n \"bookworm\": \"debian-bookworm-microsoft\"\n }\n },\n \"git_repositories\": [\n \"https://gitlab.mycompany.local\"\n ],\n \"pip_repository\": \"https://nexus.mycompany.local/repository/pypi-group\",\n \"npm_repository\": \"https://nexus.mycompany.local/repository/npm-group\"\n}\n```\n\nA default fallback environment called `direct` using no proxy or git/npm/apt repository is always available (it does not require a configuration file).\n\n\n## Contributing\n\nPull requests are welcome.\n\nSee [contributing guidelines](https://gitlab.com/ipamo/swenv/-/blob/main/CONTRIBUTING.md).\n\n\n## Legal\n\nThis project is licensed under the terms of the [MIT license](https://gitlab.com/ipamo/swenv/-/blob/main/LICENSE.txt).\n\nLogo designed by [Freepik - Flaticon](https://www.flaticon.com/free-icon/global-network_4207232) (free with required attribution).\n",
"bugtrack_url": null,
"license": null,
"summary": "Switch system and application settings based on the detected network environment.",
"version": "1.0.2",
"project_urls": {
"Bug Tracker": "https://gitlab.com/ipamo/swenv",
"Homepage": "https://gitlab.com/ipamo/swenv"
},
"split_keywords": [
"environment",
" env",
" linux",
" workstation",
" station",
" switch"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d4c6be27678396aaefa71b937e1c5340222438c7258fb942c38058c305635da3",
"md5": "ca8e74480a53af6157d2a33de55a9be5",
"sha256": "f0c0a9d7267a0c8b49fee83eb4ca23ea5c4f3ef06b002237a51e1f87c36b50e8"
},
"downloads": -1,
"filename": "swenv-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ca8e74480a53af6157d2a33de55a9be5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9.2",
"size": 35418,
"upload_time": "2025-08-03T00:21:29",
"upload_time_iso_8601": "2025-08-03T00:21:29.196528Z",
"url": "https://files.pythonhosted.org/packages/d4/c6/be27678396aaefa71b937e1c5340222438c7258fb942c38058c305635da3/swenv-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-03 00:21:29",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "ipamo",
"gitlab_project": "swenv",
"lcname": "swenv"
}