🔰 generalpy
- Python package for general classes and methods
- Install using
pip install generalpy
💠 Api_Call class
- Handles API call in easy way
💠 Attrib class (windows OS only)
- Handles the
attribcommand. - To set/modify/remove the
A/H/I/R/Sattributes for files/folders. - Use
attrib /?in CMD for more info.
💠 CustomLogging class
- Class to handle logging in easy way.
- All logging class features + more.
- Compact & Full formatting are applied wherever applicable.
- Stream logging to Terminal.
- File logging: For all logs, and error logs in different files.
- You can also set different time zone for
%(asctime)s.
💠 DatabaseCollection class
- Handles the data of a collection
collectionNamein some database. - This database will be in memory, but you can extend this functionality by using this class as a base class.
- And you can create a class which handles db locally or on cloud like MongoDB.
- Database structure should be:
DataBase > collection > collection-data. - Structure of collection-data:
dict[str, dict[str, Any]]i.edataID: {dataType: dataValue, ...}, ...
💠 ICACLS class (windows OS only)
- Handles functions related to
icaclscommand. - To set/modify/remove the permissions for files/folders.
- Use
icacls /?in CMD for more info.
💠 IgnoreError(Exception) class
- This exception should be ignored after catching it for the sake of continuity.
- You can ignore it in
try: ... except IgnoreError: passblock, or - By logging/printing to console.
💠 LevelFormatter class
- Custom
logging.Formatterclass. - To set formatting based on logging Levels. Like
logging.INFO,logging.ERRORetc. - You can also set different time zone for
%(asctime)s
💠 Settings class
- Handles all settings related aspect for an app.
- Based on settings file stored in storage.
💠 Signal class
- A signal object that can be used to connect callback.
- Simply connect a callback using
.connect(...)method. - Emit the signal using
.emit(...)method.
💠 TaskList class (windows OS only)
- Handles functions related to
tasklistcommand. - Get running tasks/executables.
- Check if an exe is running or not, or how many of it's instances are running.
💠 ctypes module
This module contains functions and methods related to ctypes
run_ShellExecuteW: RunsShellExecuteWcommand. (windows_only)running_as_admin: Checks if current app is running as admin. (windows_only)set_app_user_model_id: Sets the App User Model ID for the current process. (windows_only)
💠 decorator module
This module contains decorators
combine_single_items: Combine item of sublists (which contain only one item) into a single sublist.conditional: Run decorated function and return it's value, only if provided condition is True.log_it: Logs the functionality and the time taken by decorated function.platform_specific: Run decorated function only if current platform is one of thesupportedPlatformsretry_support: Retry the decorated function gracefully.run_threaded: Run decorated function in a new thread.
💠 files module
This module contains methods to work with files
delete_files_by_condition: Deletes all files in directory and its subdirectories according to some condition.delete_files_by_prefix_suffix: Deletes all files in directory and its subdirectories according to prefix/suffix in their name.get_new_path: Returns new filePath for files (which do not exist) by appending (1/2/3/..).get_random_file_path: Returns a random path of a file (which do not exist) in parentDirectory.get_unsupported_file_path_chars: Returns A list of characters which can't used in file names (windows_only)read_file_chunks: Read file and returns possible data chunk by chunk.sanitised_filename: Sanitize filename by replacing unsupported or non-printable characters. (windows_only)
💠 general module
This module contains general methods
first_capital: Make first letter capital without changing any other thing.format_bytes: Returns human readable formats from bytes.format_dict: Returns human readable formats from dict.generate_repr_str: Returns a suitable string for__repr__method of classes.get_adjusted_color: Adjusts the brightness of a color in hexadecimal format.get_digit_from_text: Returns the digit from the first occurrence of(digit).get_first_non_alphabet: Returns the first non-alphabet character from string.get_installed_fonts: Returns a list of fonts installed. (windows_only)is_python: ReturnsTrueif current running app ispython.punctuate: Adds punctuation after string, if not present.remove_extra_spaces: Removed extra spaces between words.replace_html_tags: Replace html tags from a string.replace_multiple_chars: Replace multiple characters from a string.similarized: Takes a list of strings and returns a list of sublists of similar-strings.sliced_list: Slice a list into a list of sublists, where each sublist contains specific no. of items.- class
Calender_Class: Class Containing functions related to Calendar
Metadata
Release files for generalpy 1.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| generalpy-1.17.0.tar.gz | 25.0 kB | Without provenance | Details for generalpy-1.17.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| generalpy-1.17.0-py3-none-any.whl | Python 3 | none | any | Details for generalpy-1.17.0-py3-none-any.whl |
Total release size: 54.3 kB
Release files / generalpy-1.17.0.tar.gz
| Download URL | generalpy-1.17.0.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7431b0cf1bf7162d0650e7f40451f69299e7a4cc5fd2d22c4f0680511ec1548
|
|
BLAKE2b-256 checksum How to use checksums |
4486ffe08422998ec089dc4b1bbc7112e772cf1fc0b53df70fd59a5165ee7278
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / generalpy-1.17.0-py3-none-any.whl
| Download URL | generalpy-1.17.0-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c43c4d2da23d8b8154603bf0c64dec4d840735df1a6d8222e6544aeb00e50b8
|
|
BLAKE2b-256 checksum How to use checksums |
c1b387c4178f4b2b523c6815f2cec54445b235242d2b934442e49773a65203a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for generalpy 1.17.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.