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)

Develop

Clone the repository, then:

# install dependencies and package in editable mode
python -m pip install -U -r requirements.txt
# install development dependencies
python -m pip install -U -e .[dev]


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

Uploaded Source

Built Distributions

pycrosskit-1.6.4-py3.9.egg (29.0 kB view details)

Uploaded Source

pycrosskit-1.6.4-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

pycrosskit-1.6.4-py2.py3-none-any.whl (14.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: pycrosskit-1.6.4.tar.gz
  • Upload date:
  • Size: 11.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.6.4.tar.gz
Algorithm Hash digest
SHA256 317a6312e2517639554de4a406c2821d97ccb831934ec938580f2c5c3c8e57e3
MD5 f6806545de620523b28c24102033b66a
BLAKE2b-256 9e5737b37b0c6399aa43174167e8eb5748befcf79d78611065f9bf756e05197b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.6.4-py3.9.egg
  • Upload date:
  • Size: 29.0 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.6.4-py3.9.egg
Algorithm Hash digest
SHA256 eaed6b395e109cefcf31d651f995b7830b8fb03c2840e38132c0302648fb6d6c
MD5 fe446bd0cdff96ffc030c77fac1a9cac
BLAKE2b-256 f72bb0e3247e067360da14e6f69329d8f1a9ae26bc43cae8b6f4a321ff23c161

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.6.4-py3-none-any.whl
  • Upload date:
  • Size: 14.3 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.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e50f435fc63acc06f7d6281c729047eaceee9293888ed833c56923576f94ec1e
MD5 85e30149e7284fdea04bfae1f142e944
BLAKE2b-256 eee4843c108a43b417f7c994a77304346a2aec41c233b9f1c8f7c0f82e122581

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.6.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.3 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.6.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 496ab14f31cf0ffca1953c7cade206dd5f4472d2d3cdaf88ffe31e02f58ce36c
MD5 2551e551ef226c54eeed4c1a00d4ea13
BLAKE2b-256 b5338294168b01292c3c2959260abfc819f2bdd95afeb18f0cc0ff82fa17f6d7

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