Skip to main content

dreamutils

A collection of useful and often repeated python methods


The package contains code / method that were written over and over again, without creating a centralized package for them. It project was created to solve this problem. Surely, some of the methods are exotic(most of the dreamutils.python file i think), but if you need those methods you know where to find them.

Installation💻 • Examples💡 • Licence📝

Installation

  • Use Python >= 3.6

  • Install it

    • via pip
    pip install dreamutils
    
    • or with git
    git clone https://github.com/ByteDream/dreamutils.git
    cd dreamutils
    python setup.py install
    

Examples

Here are examples of some useful packages

XML

A easy to use and powerful xml manipulation class

import dreamutils.types.xml as xml

my_xml = xml.new_xml()
sub_elem_id = my_xml.add(0, 'sub_elem', 'example_text')
# every new created element has an id

my_xml.get_element(sub_elem_id).attrib = {'attrib': 'example'}
# with the id you can obtain the element later...
my_xml.add(sub_elem_id, 'sub_sub_elem')
# ... and use it to add new sub element

# Note: the root element has always the id `0`

print(my_xml.get_string())

Sorting

A collection of sorting algorithms (the most common I think)

from dreamutils.sort import QuickSort

sorted = QuickSort.integer([2, 9, 4, 623, 5])
print(sorted)

Net

A file with nice internet methods

from dreamutils.net import get_ip_infos

infos = get_ip_infos('8.8.8.8')
# if no argument is passed, information about your own ip will be returned
print(infos)

Testing

The tools are (currently) only tested on linux, but they should also work on Windows and MacOS.

So if there are any problems feel free to open a new issue.

Licence

This project is licensed under the GNU Lesser General Public License v3.0 (LGPL-3.0) - see the LICENSE file for more details.

Metadata

Release files for dreamutils 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dreamutils 0.1.1
File Size Uploaded
dreamutils-0.1.1.tar.gz 11.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dreamutils 0.1.1
File Interpreter ABI Platform
dreamutils-0.1.1-py3.8.egg Legacy Egg format - - Details
dreamutils-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 53.8 kB

Release files / dreamutils-0.1.1.tar.gz

Download URL dreamutils-0.1.1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
694a108aa549898c24b5c803704644f0b54cd7185c24dcdc071bdd76ca4ae11a
BLAKE2b-256 checksum
How to use checksums
0f6d272b97df246aaf0e994d0c1ba943159a860300dcf610725c9f7af51ed0d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6

Release files / dreamutils-0.1.1-py3.8.egg

Download URL dreamutils-0.1.1-py3.8.egg
Size 26.7 kB
Tags Egg
SHA-256 checksum
How to use checksums
6f33994ec200b7f0b71d504f1d1e6a70159142beb11ca966d8e9db3187b5995b
BLAKE2b-256 checksum
How to use checksums
0f4170ecba86dc60d2212cf251081536141dc22101de9c9b2f1acc373f37da7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6

Release files / dreamutils-0.1.1-py3-none-any.whl

Download URL dreamutils-0.1.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab1867259f56960a8a9f084d991ae04c131d05799eb9a36f08b45cd47842cdce
BLAKE2b-256 checksum
How to use checksums
c4c290716d6f667a5501027f729df029a575f8aed322ff16a7eddae4d6dd9624
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

3 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page