Skip to content

FormulaCarbon/pythings-Python-Module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyThings Python Module

Version Status License Stage IDE

Logo

An awesome Application to expand the functionalities of python

Installations | Imports | Commands | Contribution | Links

🚩Table of Contents

Table of content
  1. About
  2. Installation
  3. Importing
  4. Commands
  5. License
  6. Dev Info
  7. Contribution
  8. Related Links

📝About PyThings

PyThings is a python 3 module that expands the functionality of python. It expands the connectivity of an IDE to the PC, expands the ability of dictionaries, adds an image scraping and opening functionality, add more math functions, and add an ecryption/decryption feature.

Currently Tested Platforms

  • Windows 11

Dependencies

  • setuptools
  • plyer
  • bs4
  • pillow
  • cryptography

⚙️Installation

Unix/MacOS
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pythings==0.4.7
Windows
py -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pythings==0.4.7

🛠️Importing

pythings
import pythings

or (recommended)

pythings as plt
import pythings as pt

🤖Commands

test
pythings.test() # prints a test message to shell

Class: PCTools
import pythings as pt
pctools = pt.PCTools()
pctools.pypiinstall(modname, pysrc, modsrc='pypi') # installs a python module on the users end, without importing.
# modname: name of module. pysrc: use 'web' if user installed from python.org, or 'app' if user downloaded from store. modsrc: 'pypi' for download from pypi, and 'testpypi' for download from testpypi.

pctools.notify(title, desc, appname='pythings',icon=None, time='2', status=None, toast=False) # popup desc notification. 
# See https://www.geeksforgeeks.org/python-desktop-notifier-using-plyer-module/ for documentation.

pctools.slice_mail(address) # slices an email into username and domain. Outputs a dict formatted like {'username":'pythings', 'domain':'example.com'}.
# address: email address to be sliced.

pctools.debug(filename, encodetype='utf_8') # debugs a file with same errors as the regular shell. Basically for debugging a file on the users device.
# filename: file to be debugged (must be a .py). encodetype: specifies encoding of the file (defaults to UTF 8)

Class: Dict
import pythings as pt
dtools = pt.Dict()

dtools.j2dict(obj, remove=None) # converts json to dictionary. dictionary is named the same as variable json is stored in.
# obj: variable of json to be converted. remove: specifies if any characters should be replaced in dict.

dtools.list2dict(key, content) # converts 2 lists into a dictionary. Shortens code.
# key: list with key values. content: list with content values that match key values.

Class: Images
import pythings as pt
imgs = pt.Images()

imgs.getImage(link) # returns all image sources from a webpage as a list
# link: url of webpage to be scraped.

imgs.openImage(link, query) # opens an image in default image viewer
# link: direct link to image. query: name of image.

Class: MathTools
import pythings as pt
mtools = pt.MathTools()

mtools.fib(num, length='one') # returns the nth integer of the fibonnaci sequence.
# num: the nth integer. length: 'one' for the nth integer, 'all' for all fibonnaci numbers up to the nth value.

Class: Security
import pythings as pt
stools = pt.Security()

stools.encrypt(text, filename) # encrypts a string using Fernet from cryptography.fernet. Returns encoded string and saves key to file.
# text: string to be encrypted. filename: file that the encoding key should be saved to (must be a .txt).

stools.decrypt(enctext, enckey) # decodes text that was encoded with the above method. Returns decoded string.
# enctext: string of characters returned by stools.encrypt(). enckey: the key saved to filename by stools.encrypt.

⚖️License

This project is licensed under the MIT LICENSE. See LICENSE for more information.

📚Dev Info (Ignore this if you are not a dev)

File System: Unbuilt
.
└── App/
    ├── setup.py
    ├── Module/
    │   ├── __init__.py
    │   └── pythings.py
    ├── README.md
    └── LICENSE 
File System: Built
.
├── App/
│   ├── setup.py
│   ├── pythings.egg-info/
│   │   ├── top_level.txt
│   │   ├── SOURCES.txt
│   │   ├── requires.txt
│   │   ├── PKG-INFO
│   │   └── dependency_links.txt
│   ├── Module/
│   │   ├── __init__.py
│   │   └── pythings.py
│   ├── README.md
│   └── LICENSE
└── dist/
    ├── pythings-0.4.7.tar.gz
    └── pything-0.4.7-none-any.whl
Build Command
py Documents\Python_projects\pythings\App\setup.py sdist bdist_wheel
Upload Command
py -m twine upload --repository testpypi dist/* -u▉▉▉▉▉ -p▉▉▉▉▉

INFO

  • Current Version: 0.4.7
  • Dev Stage: Beta Testing
  • Made On: IDLE
  • Programming Language: Python 3
  • Natural Language: English (USA)
  • License: MIT

✨Contribution

Contributions are always welcome! Please read here first.   (Go Back to top of the page)

🔗 Related Links