pycrosskit


Namepycrosskit JSON
Version 1.7.4 PyPI version JSON
download
home_pagehttps://github.com/jiri-otoupal/py-cross-kit
SummaryCross Platform Toolkit for Windows and Linux in order to make variables and shortcuts easy
upload_time2023-06-16 07:35:46
maintainer
docs_urlNone
authorJiri Otoupal
requires_python>=3.7,<4
licenseApache 2.0
keywords python cross platform toolkit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # 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": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4",
    "maintainer_email": "",
    "keywords": "Python Cross Platform Toolkit",
    "author": "Jiri Otoupal",
    "author_email": "jiri-otoupal@ips-database.eu",
    "download_url": "https://files.pythonhosted.org/packages/49/69/8465be565d80514d2131e7de6b1f5d8d5a98cfe5c29662cb4e6a6cb95254/pycrosskit-1.7.4.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.4",
    "project_urls": {
        "Homepage": "https://github.com/jiri-otoupal/py-cross-kit"
    },
    "split_keywords": [
        "python",
        "cross",
        "platform",
        "toolkit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5151f435fa4cecf72fe00b6a11e2985d567f70290fb9c7d7cc892fbe948a9d3d",
                "md5": "2a6c6f94a7a8143f987ee5a49c3a296a",
                "sha256": "dd8abb198c396d8ecf8eb191a3d02951e11f3602b167951050e937c63339e8db"
            },
            "downloads": -1,
            "filename": "pycrosskit-1.7.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2a6c6f94a7a8143f987ee5a49c3a296a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4",
            "size": 15589,
            "upload_time": "2023-06-16T07:35:44",
            "upload_time_iso_8601": "2023-06-16T07:35:44.497424Z",
            "url": "https://files.pythonhosted.org/packages/51/51/f435fa4cecf72fe00b6a11e2985d567f70290fb9c7d7cc892fbe948a9d3d/pycrosskit-1.7.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49698465be565d80514d2131e7de6b1f5d8d5a98cfe5c29662cb4e6a6cb95254",
                "md5": "03e325d6c76910694d2e92a528324ab8",
                "sha256": "0d427576f796c70acfc4eaba7ac6c8002cadd0987f73989e7f8f81b940ad83cd"
            },
            "downloads": -1,
            "filename": "pycrosskit-1.7.4.tar.gz",
            "has_sig": false,
            "md5_digest": "03e325d6c76910694d2e92a528324ab8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4",
            "size": 12448,
            "upload_time": "2023-06-16T07:35:46",
            "upload_time_iso_8601": "2023-06-16T07:35:46.341045Z",
            "url": "https://files.pythonhosted.org/packages/49/69/8465be565d80514d2131e7de6b1f5d8d5a98cfe5c29662cb4e6a6cb95254/pycrosskit-1.7.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-16 07:35:46",
    "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"
}
        
Elapsed time: 0.07839s