Common use utilities for python done easy.
Project description
mpyez
Common use utilities for python done easy.
What is mpyez
mpyez
is a library made specifically to make the daily mundane tasks as easily doable as possible.
- Want to get a list of all python files in your folder? Use
ListOfFilesFromExtensions
class. - Want to convert a nested list to a 1D list? Use
nested_list_to_list()
. - Want to convert a simple list to nested list? Use
list_to_nested_list()
.
This library is intended to lower complexity of daily recurring tasks.
How to install
Use pip: pip install mpyez
Examples
Let's say, you want to convert a nested list
>>> my_nested_list = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10]]
to a 1D list, with mpyez
you can do it using nested_list_to_list
function in ez_list
module (see, Current
implementations for details).
>>> nested_list_to_list(my_nested_list)
>>> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Modules
Current Implementations
-
os_
ListOfFilesFromExtensions
: To pick files of specific extensions.ListOfFilesFromNames
: To pick files matching a specific name pattern.move_directory_contents
: To move directory contents to a new location.
-
list_
difference_between_lists
: To get the difference between two lists.equal_lists
: To check if two lists are equal.get_object_count
: To get an object count from the list.index
: To get the index of an element in the list.is_contained
: To check if a list is contained within another list.join_lists
: To join multiple lists into a single one.list_to_nested_list
: To convert a list to a nested list.move_element_in_list
: To move a list element to a new position.nested_list_to_list
: To convert a nested list to a flat list.remove_
: To remove a value from a list.replace_at_index
: To replace values at a specific index in the list.replace_with_value
: To replace values with a given value in the list.sort_
: To sort a list.string_list_to_numeric
: To convert string values in a list to numeric.
-
read_files
read_txt_file
: To read an entire text file.get_lines_from_txt_file
: To read specific lines from a text file.
-
dict_
get_key_index
: To get the index of a key in a dictionary.merge_dictionaries
: To merge dictionaries.pretty_print
: To print a dictionary in a readable format.sort_dictionary
: To sort a dictionary.
-
array_
moving_average
: To calculate the moving average for an array.reshape_with_padding
: To reshape an array with padding.transpose1d
: To transpose a 1D array.
-
plotting_
plot_two_column_file
: To plot data from a two-column file.plot_xy
: To plot x vs. y data.plot_with_dual_axes
: To plot with dual axes for two datasets.
Future Implementations
-
read_files
- Implementation of reading other file formats, especially
.csv
. - Whole file reading using generators to reduce memory issues.
- Implementation of reading other file formats, especially
-
dict_
- Additional dictionary manipulation methods such as updating, retrieval, and comparisons.
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
Built Distribution
File details
Details for the file mpyez-0.0.8.tar.gz
.
File metadata
- Download URL: mpyez-0.0.8.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308a0cc07cf9c2470d8c70b08c9d6e09792c6197ce6cf3b16f7deaaaeece419e |
|
MD5 | e93d0b1aabd2682d401162775fbad9a0 |
|
BLAKE2b-256 | c90b91ad187323d69d0c9c72b2c196cd24d0c597f548aa77fd44de817cbf784b |
File details
Details for the file mpyez-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: mpyez-0.0.8-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d74b58c844c7a0214c7882170df3fba0ab2d3d7465ac97dd6ccddb7d777ce826 |
|
MD5 | aabccd2604b879b594b21ea8b0e40490 |
|
BLAKE2b-256 | b90dad5c19cc2dae3eb561e46f847cac8587664c6c6a92886a8d53d388560d10 |