# Python Cross Platform Toolkit for Windows and Linux variables, shortcuts and start menu shortcuts
Simple Cross Platform creation of shortcuts and Persistent Environment Variables
[![image](https://img.shields.io/pypi/v/pycrosskit.svg)](https://pypi.org/project/pycrosskit/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycrosskit)](https://pypi.org/project/pycrosskit/)
[![Build Status](https://travis-ci.com/jiri-otoupal/pycrosskit.svg?branch=master)](https://travis-ci.com/github/jiri-otoupal/pycrosskit)
[![Downloads](https://pepy.tech/badge/pycrosskit)](https://pepy.tech/project/pycrosskit)
## Installing
Install and update using [pip](https://pip.pypa.io/en/stable/quickstart/):
```bash
pip install pycrosskit
or
pip3 install pycrosskit
```
## Supported Platforms:
* Linux
* Windows
## Shortcuts usage:
```python
from pycrosskit.shortcuts import Shortcut
# Will Create shortcut
# * at Desktop if desktop is True
# * at Start Menu if start_menu is True
Shortcut(shortcut_name="My Spaghetti Shortcut", exec_path="/usr/bin/order_spaghetti", description="Such Yummy Spaghetti",
icon_path="/home/.../spaghetti.png", desktop=True, start_menu=True)
# Will Delete shortcut
# * at Desktop if desktop is True
# * at Start Menu if start_menu is True
Shortcut.delete(shortcut_name="My Spaghetti Shortcut", desktop=True, start_menu=True)
```
## Environment Variables usage:
Accessing and write to environment variables is automatically handled based on your system Lin/Win SysEnv class is
implemented as a singleton metaclass so don't be afraid about multiple instances
**Support of Mac env variables on request**
```python
from pycrosskit.envariables import SysEnv
### ** Linux **
# Will Set Persistent Value for Variable in Systems bashrc file or custom one that you can pass
SysEnv().set(key="spaghetti", value="boloneys", shell_file="~/.zsh")
# Will Get Persistent Value for Variable in System
# * reg_path works only for windows as register path
# * registry works only for windows, if is False variable is obtained from User Environment Variables
SysEnv().get(key="spaghetti", shell_file="~/.zsh", shell="zsh")
# Will unset variable from your environment or registry
SysEnv().unset(key="spaghetti", shell_file="~/.zsh")
# For not having to override argument shell_file or shell
# This saves specs for every access, default arguments are ignored
SysEnv.save_shell_specs(shell="zsh", shell_file="~/.zsh")
### ** Windows **
# Will Set Persistent Value for Variable in System
# * subkey works only for windows like file in folder
# * reg_path works only for windows as register path (is ignored if registry=False)
# * registry works only for windows, if is False variable is saved to User Environment Variables
SysEnv().set(key="spaghetti", value="bologna", subkey="italian_food", reg_path="HKEY-...\\CustomPath",
registry=True)
# Will Get Persistent Value for Variable in System
# * reg_path works only for windows as register path
# * registry works only for windows, if is False variable is obtained from User Environment Variables
SysEnv().get(key="spaghetti", reg_path="HKEY-...\\CustomPath", registry=True)
# Will unset variable from your environment or registry
SysEnv().unset(key="spaghetti", registry=True)
```
## Develop
Clone the repository, then:
```sh
# install dependencies and package in editable mode
python -m pip install -U -r requirements.txt
# install development dependencies
python -m pip install -U -e .[dev]
# install git hooks
pre-commit install
```
----
<hr>
Did I made your life less painfull ?
<br>
<br>
Support my coffee addiction ;)
<br>
<a href="https://www.buymeacoffee.com/jiriotoupal" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy me a Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
Raw data
{
"_id": null,
"home_page": "https://github.com/jiri-otoupal/py-cross-kit",
"name": "pycrosskit",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.7",
"maintainer_email": null,
"keywords": "Python Cross Platform Toolkit",
"author": "Jiri Otoupal",
"author_email": "jiri-otoupal@ips-database.eu",
"download_url": "https://files.pythonhosted.org/packages/53/ad/f8ac5c22fb9aecf614dcc30ec2a69f1922de0acea932810c08134c11956f/pycrosskit-1.7.5.tar.gz",
"platform": null,
"description": "# Python Cross Platform Toolkit for Windows and Linux variables, shortcuts and start menu shortcuts\n\nSimple Cross Platform creation of shortcuts and Persistent Environment Variables\n\n[![image](https://img.shields.io/pypi/v/pycrosskit.svg)](https://pypi.org/project/pycrosskit/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycrosskit)](https://pypi.org/project/pycrosskit/)\n\n[![Build Status](https://travis-ci.com/jiri-otoupal/pycrosskit.svg?branch=master)](https://travis-ci.com/github/jiri-otoupal/pycrosskit)\n[![Downloads](https://pepy.tech/badge/pycrosskit)](https://pepy.tech/project/pycrosskit)\n\n## Installing\n\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/):\n\n```bash\npip install pycrosskit\n\nor\n\npip3 install pycrosskit\n```\n\n## Supported Platforms:\n\n* Linux\n* Windows\n\n## Shortcuts usage:\n\n```python\nfrom pycrosskit.shortcuts import Shortcut\n\n# Will Create shortcut \n# * at Desktop if desktop is True \n# * at Start Menu if start_menu is True\n\nShortcut(shortcut_name=\"My Spaghetti Shortcut\", exec_path=\"/usr/bin/order_spaghetti\", description=\"Such Yummy Spaghetti\",\n icon_path=\"/home/.../spaghetti.png\", desktop=True, start_menu=True)\n\n# Will Delete shortcut\n# * at Desktop if desktop is True \n# * at Start Menu if start_menu is True\nShortcut.delete(shortcut_name=\"My Spaghetti Shortcut\", desktop=True, start_menu=True)\n\n```\n\n## Environment Variables usage:\n\nAccessing and write to environment variables is automatically handled based on your system Lin/Win SysEnv class is\nimplemented as a singleton metaclass so don't be afraid about multiple instances\n\n**Support of Mac env variables on request**\n\n```python\nfrom pycrosskit.envariables import SysEnv\n\n### ** Linux ** \n\n# Will Set Persistent Value for Variable in Systems bashrc file or custom one that you can pass\nSysEnv().set(key=\"spaghetti\", value=\"boloneys\", shell_file=\"~/.zsh\")\n\n# Will Get Persistent Value for Variable in System\n# * reg_path works only for windows as register path\n# * registry works only for windows, if is False variable is obtained from User Environment Variables\nSysEnv().get(key=\"spaghetti\", shell_file=\"~/.zsh\", shell=\"zsh\")\n\n# Will unset variable from your environment or registry\nSysEnv().unset(key=\"spaghetti\", shell_file=\"~/.zsh\")\n\n# For not having to override argument shell_file or shell\n# This saves specs for every access, default arguments are ignored\nSysEnv.save_shell_specs(shell=\"zsh\", shell_file=\"~/.zsh\")\n\n### ** Windows **\n\n# Will Set Persistent Value for Variable in System\n# * subkey works only for windows like file in folder\n# * reg_path works only for windows as register path (is ignored if registry=False) \n# * registry works only for windows, if is False variable is saved to User Environment Variables\nSysEnv().set(key=\"spaghetti\", value=\"bologna\", subkey=\"italian_food\", reg_path=\"HKEY-...\\\\CustomPath\",\n registry=True)\n\n# Will Get Persistent Value for Variable in System\n# * reg_path works only for windows as register path\n# * registry works only for windows, if is False variable is obtained from User Environment Variables\nSysEnv().get(key=\"spaghetti\", reg_path=\"HKEY-...\\\\CustomPath\", registry=True)\n\n# Will unset variable from your environment or registry\nSysEnv().unset(key=\"spaghetti\", registry=True)\n```\n\n## Develop\n\nClone the repository, then:\n\n```sh\n# install dependencies and package in editable mode\npython -m pip install -U -r requirements.txt\n# install development dependencies\npython -m pip install -U -e .[dev]\n# install git hooks\npre-commit install\n```\n\n----\n\n<hr>\nDid I made your life less painfull ? \n<br>\n<br>\nSupport my coffee addiction ;)\n<br>\n<a href=\"https://www.buymeacoffee.com/jiriotoupal\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy me a Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Cross Platform Toolkit for Windows and Linux in order to make variables and shortcuts easy",
"version": "1.7.5",
"project_urls": {
"Homepage": "https://github.com/jiri-otoupal/py-cross-kit"
},
"split_keywords": [
"python",
"cross",
"platform",
"toolkit"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "921920bef01328063bc9d9a642623aa895077eccef6f91698c199102ab7eb006",
"md5": "53e99f9251e428838fdd8674e298bf39",
"sha256": "3a0b57085b6261224c89d232b6cfe5f47fef6ed9c7b3d9042c816636fadf7ab5"
},
"downloads": -1,
"filename": "pycrosskit-1.7.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "53e99f9251e428838fdd8674e298bf39",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.7",
"size": 15587,
"upload_time": "2024-10-03T09:15:46",
"upload_time_iso_8601": "2024-10-03T09:15:46.739273Z",
"url": "https://files.pythonhosted.org/packages/92/19/20bef01328063bc9d9a642623aa895077eccef6f91698c199102ab7eb006/pycrosskit-1.7.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "53adf8ac5c22fb9aecf614dcc30ec2a69f1922de0acea932810c08134c11956f",
"md5": "b7c358335245c388918719026981a90e",
"sha256": "1d27fa7d150cdf07d41ffcf4a2b4bce2e641967f9a7d3ae4593b4c2e3e312578"
},
"downloads": -1,
"filename": "pycrosskit-1.7.5.tar.gz",
"has_sig": false,
"md5_digest": "b7c358335245c388918719026981a90e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.7",
"size": 12573,
"upload_time": "2024-10-03T09:15:47",
"upload_time_iso_8601": "2024-10-03T09:15:47.791483Z",
"url": "https://files.pythonhosted.org/packages/53/ad/f8ac5c22fb9aecf614dcc30ec2a69f1922de0acea932810c08134c11956f/pycrosskit-1.7.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 09:15:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jiri-otoupal",
"github_project": "py-cross-kit",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pycrosskit"
}