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 | False)

# 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 | False)

# Will unset variable from your environment or registry
SysEnv().unset(key="spaghetti", registry=True | False)

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

Uploaded Source

Built Distributions

pycrosskit-1.0.6.1.1-py3.9.egg (28.4 kB view details)

Uploaded Source

pycrosskit-1.0.6.1.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

pycrosskit-1.0.6.1.1-py2.py3-none-any.whl (14.1 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 f554fe41f92466d84ec77b9a983f6ecb95ab83d828b190bf41a84b84a37907c1
MD5 afc363f2aac55c66438288782483adc1
BLAKE2b-256 b09eb1a9d4feab90267fac5bc4ecd491c95cee425386036636b38477ce6b3b7c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.1.1-py3.9.egg
  • Upload date:
  • Size: 28.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.1.1-py3.9.egg
Algorithm Hash digest
SHA256 a234a4c0ba61d7f6d1dba05b0da2c3f867d0471fd796672d457c382acc2c058a
MD5 5d5258e4a6bbfd2d6492838ebb2de69d
BLAKE2b-256 af88f535cbf4b26da085ec22aead3ac5aeafe654bd665b15c2f955ac57d15fd3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.1 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f5fcce7d97b4c76de0b8eb51ccbc2e10013a384134cf643dad9b52173c7fcdf
MD5 a5b4adda49a704bd237c1ff98d5e0711
BLAKE2b-256 67d43942c815c5e014b5b014e2697c69bf35cf5a5c1e16ca6ad024baa028e0ca

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.1 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.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7204e510742c86ed97198006eab35a0989a21a2487ae58293deb3ef66d1e86b9
MD5 b5dc41bf6784f50d28365e6d7ab72121
BLAKE2b-256 81065aa3e162fb44b33c9b9d193434e8041af93745d4c498b9afa02202f68dca

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