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

Uploaded Source

Built Distributions

pycrosskit-1.0.6-py3.9.egg (28.6 kB view details)

Uploaded Source

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

Uploaded Python 3

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

File metadata

  • Download URL: pycrosskit-1.0.6.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.tar.gz
Algorithm Hash digest
SHA256 ce479705af9c31e6cbb327821ee7a5137546c59a28f0964b6184038f50f8885d
MD5 77615c79fc56f2c53332b79e35e2f6ae
BLAKE2b-256 01061efe203cb3ee28a8d029d35e940d9ca0eb67c27c0e08860a949c5e022f7f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6-py3.9.egg
  • Upload date:
  • Size: 28.6 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-py3.9.egg
Algorithm Hash digest
SHA256 f782f12ec6f79acf319b40883f8c02315a89e1b3fa7dc75b7a016b983fccf78a
MD5 7122a0759a27e043968b63beccc73afa
BLAKE2b-256 2288c9fbdd98c527662fdee6c8d1aef13f6261a727490c28f294330e08c9a888

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6-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-py3-none-any.whl
Algorithm Hash digest
SHA256 a02c46e1b54915daeb1468255d8d361bbf2e8b6974d91a7349d96d8b322b4bcb
MD5 b3eef0cbb9a4c202abcb157d7b0cc4f0
BLAKE2b-256 533c69d1f075f127916f812bfeb90f3a9ec1c95df4f86e2415489e2918d2e277

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pycrosskit-1.0.6-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-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2fa4bb5ef9d5681f89d3e207dd111678ebf3fe713961226d37615b3c3049d958
MD5 58ac129a73a0ccad9673b8c8304db990
BLAKE2b-256 082a679a122d7861a0ae05c35a2b9654becb9f1e0522cf1164a727137befab55

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