{"id":19989716,"url":"https://github.com/jiri-otoupal/pycrosskit","last_synced_at":"2025-05-04T09:33:29.585Z","repository":{"id":37942084,"uuid":"342870301","full_name":"jiri-otoupal/pycrosskit","owner":"jiri-otoupal","description":"Python Cross Platform Toolkit for Windows and Linux Environment Variables, Shortcuts and Start Menu Shortcuts","archived":false,"fork":false,"pushed_at":"2024-10-03T09:15:13.000Z","size":243,"stargazers_count":19,"open_issues_count":5,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-03T09:23:51.919Z","etag":null,"topics":["cross-platform","environment-variables","linux","shortcuts","shortcuts-on-desktops","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jiri-otoupal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null},"funding":{"github":"jiri-otoupal"}},"created_at":"2021-02-27T14:02:51.000Z","updated_at":"2024-10-03T09:15:16.000Z","dependencies_parsed_at":"2023-10-14T17:32:04.775Z","dependency_job_id":null,"html_url":"https://github.com/jiri-otoupal/pycrosskit","commit_stats":{"total_commits":199,"total_committers":11,"mean_commits":18.09090909090909,"dds":0.6934673366834171,"last_synced_commit":"bbbab6f9223c8f7f549013332299a1e91829da24"},"previous_names":["jiri-otoupal/py-cross-kit"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiri-otoupal%2Fpycrosskit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiri-otoupal%2Fpycrosskit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiri-otoupal%2Fpycrosskit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiri-otoupal%2Fpycrosskit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiri-otoupal","download_url":"https://codeload.github.com/jiri-otoupal/pycrosskit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224391393,"owners_count":17303609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-platform","environment-variables","linux","shortcuts","shortcuts-on-desktops","windows"],"created_at":"2024-11-13T04:49:47.787Z","updated_at":"2024-11-13T04:49:48.677Z","avatar_url":"https://github.com/jiri-otoupal.png","language":"Python","funding_links":["https://github.com/sponsors/jiri-otoupal","https://www.buymeacoffee.com/jiriotoupal"],"categories":[],"sub_categories":[],"readme":"# 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\u003chr\u003e\nDid I made your life less painfull ? \n\u003cbr\u003e\n\u003cbr\u003e\nSupport my coffee addiction ;)\n\u003cbr\u003e\n\u003ca href=\"https://www.buymeacoffee.com/jiriotoupal\" target=\"_blank\"\u003e\u003cimg 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;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiri-otoupal%2Fpycrosskit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiri-otoupal%2Fpycrosskit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiri-otoupal%2Fpycrosskit/lists"}