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.3.tar.gz (11.4 kB view details)

Uploaded Source

Built Distributions

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

Uploaded Source

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

Uploaded Python 3

pycrosskit-1.0.6.3-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.3.tar.gz.

File metadata

  • Download URL: pycrosskit-1.0.6.3.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.3.tar.gz
Algorithm Hash digest
SHA256 8cf39ec029492cef012401ca56c391d76655324d3d44698c67c07f964b1ce792
MD5 904711baada9ca9df14737e90a50432e
BLAKE2b-256 fd4d9c1ef0d32b60ac2cf3b66c0adf41c3d2cabcc121fa7a32360da57c2ddf3a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.3-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.3-py3.9.egg
Algorithm Hash digest
SHA256 3dd4eb042135180976f060ff853a5256e0727cea708bfdc761bf6f51cc90b353
MD5 fe142600a942ebbcdd450483f6eeb280
BLAKE2b-256 57473275f9dedfafa33c67a9847859b357befeba0fdd667de8d03e8f5c0d8d16

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 24a08d38982b8f0ef17075238ce9291032d2791ddf90e5e0063e65b885acc084
MD5 3fb643f05fa93c9c205a1bb11f91de31
BLAKE2b-256 12ed92d7061045a1dbc3625660bd08136d5e804a2afc83cfa37219062811c0e2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.3-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.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 576f7ef978abebf8fc649eedb31818012bc0d262d93035a083f5a72004094378
MD5 420f899de2c4c6144d462fc247a4cc3a
BLAKE2b-256 24cbe985cea44ab622967ed1c2ac87685200b35cdd5b55a4a20e05d69ee4578e

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