Skip to main content

Cross Platform Toolkit for Windows and Linux in order to make variables and shortcuts easy

Project description

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 Build Status Downloads

Installing

Install and update using pip:

pip install pycrosskit

or

pip3 install pycrosskit

Supported Platforms:

  • Linux
  • Windows

Shortcuts usage:

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

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)

Did I made your life less painfull ?

Support my coffee addiction ;)
Buy me a Coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycrosskit-1.0.6.2.tar.gz (11.4 kB view details)

Uploaded Source

Built Distributions

pycrosskit-1.0.6.2-py3.9.egg (28.7 kB view details)

Uploaded Source

pycrosskit-1.0.6.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

pycrosskit-1.0.6.2-py2.py3-none-any.whl (14.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pycrosskit-1.0.6.2.tar.gz.

File metadata

  • Download URL: pycrosskit-1.0.6.2.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2rc1

File hashes

Hashes for pycrosskit-1.0.6.2.tar.gz
Algorithm Hash digest
SHA256 47050958bcabfebc912f7929da9fccbfb08e2f7e94f2b2a731e1d6007ec1c722
MD5 f1bba5491cb3aa985a8fb64c2f6929e0
BLAKE2b-256 3285cdd0adea83f9cf269ce99c2ed33931df79ed270c8d206697b0468776cd12

See more details on using hashes here.

Provenance

File details

Details for the file pycrosskit-1.0.6.2-py3.9.egg.

File metadata

  • Download URL: pycrosskit-1.0.6.2-py3.9.egg
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2rc1

File hashes

Hashes for pycrosskit-1.0.6.2-py3.9.egg
Algorithm Hash digest
SHA256 720c56181ee374b70d8af96b67ca78530d5602db5c17ad9558c5c82dc99db942
MD5 8afbedc14d183ab75d5d09281d8c2cec
BLAKE2b-256 d35b1e5b1a4d249ad90c4a61b54d92dde7879b5ca99daecf951c3d25cb7dfe08

See more details on using hashes here.

Provenance

File details

Details for the file pycrosskit-1.0.6.2-py3-none-any.whl.

File metadata

  • Download URL: pycrosskit-1.0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2rc1

File hashes

Hashes for pycrosskit-1.0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dba457d622678f39abcdbd6bc4b1ceb63f666a668489a76a038ab1dddfc1b23c
MD5 6dd17c46965e4f8fe10bcaa0f85f7454
BLAKE2b-256 7438bc55697fda8dff07f7a029f4ad7b6818ea018de2d7fc745b46bee795301e

See more details on using hashes here.

Provenance

File details

Details for the file pycrosskit-1.0.6.2-py2.py3-none-any.whl.

File metadata

  • Download URL: pycrosskit-1.0.6.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2rc1

File hashes

Hashes for pycrosskit-1.0.6.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d1f18336a8ea2ac5534d801cfe8f0057d3340a05d9d26cf6c1f856e9813590bb
MD5 751d3b4af7cfad25484260e0e3ea4309
BLAKE2b-256 f68d4e8ebc972ebac6d7a0bb0fb8c56f6cdf830abba1faaa6ee3a949f79e6a45

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page