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

Uploaded Source

Built Distributions

pycrosskit-1.0.6.4.2-py3.9.egg (28.8 kB view details)

Uploaded Source

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

Uploaded Python 3

pycrosskit-1.0.6.4.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.4.2.tar.gz.

File metadata

  • Download URL: pycrosskit-1.0.6.4.2.tar.gz
  • Upload date:
  • Size: 11.5 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.4.2.tar.gz
Algorithm Hash digest
SHA256 7bf2b7b4b10abe67e534ae89a0297dcd2e5bc8563790a6e2e329b627c601c7e3
MD5 4c0beb71adb1550d22097b1342346166
BLAKE2b-256 907c9108b9b4395629cbdcbed5e3ae3d0b5672d636c3ce23795fb4f4edaeda64

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.4.2-py3.9.egg
  • Upload date:
  • Size: 28.8 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.4.2-py3.9.egg
Algorithm Hash digest
SHA256 0f499dc475b0d1901e1b7d68b6acb101103fb6b610ba74a00b02a21dd99cee82
MD5 62b2192f361514dd978ec8be25c1d85b
BLAKE2b-256 cf8214b02b009fc22b312c1e02b7da2a88b700b2e35b1393601e5f4b78205f3c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.4.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.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 90a634aac3afee2e364ace4d31ce0caa2006864b91c573299be1624b1e9f47da
MD5 2e816c0002a416a8b9a4234342151334
BLAKE2b-256 75a727df61cad10f51f46595daaa4b0dc290c60793e6f45db8bce5424115334f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.4.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.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 81607e0ea5119e7c9f52352d26c0ba62e5458fad5b524c57edbb301756ca4bba
MD5 77f20d4b1838797229269bb49854cf94
BLAKE2b-256 3500b32c3a34e5d50a9dfe43537567e6732e0b533b11747aa584f021750c3f68

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