Skip to main content

A collection of useful tools

Project description

pyuseful

The package contains a collection of tools I find useful. Check out wiki page for more detail and examples.

Install

Requires python 3.9

pip install pyuseful

General info

Consists of several sub-packages:

  • classtools


    • immutable
      • class ImmutableProperties

        Makes class propreties immutable


    • message
      • class MessageThread

        Creates a separate thread which prints messeges in queue


    • postint
      • class PostInit

        Adds a call to __postinit__ method after init is complete


    • require
      • class RequireAttrs

        Adds attribute require which forces you to set listed attributes by the end of init

      • class RequireDictParser

        Parses dict or json file into a class and make attributes from keys. Adds attribute require and require_any which force you to set listed attributes by the end of init

  • decorators


    • require

      • decorator require_condition

        Let's you specify a condition in which a method of a class can be called

      • decorator once

        Function can only be called once or it always returns the same result as the 1st call

      • decorator limit

        Limits a number of times a function can be called

      • decorator try_times

        A function will be called several times if they raise an error


    • thread

      • decorator repeat_timer

      Repeat a function every timer number of seconds. Returns a Queue-like object with results

      • decorator cash_timer

      Calls a function in a separate thread every timer seconds and stores the result


    • timing
      • decorator time_exec

        Messure exec time of a function

  • filetools


    • misc
      • function mod_name_with_ext

        Modify a path without modifying an extention


    • splicer
      • class Splicer

        Let's you specify blocks in files which can be pasted into other files

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

pyuseful-0.0.6.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyuseful-0.0.6-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file pyuseful-0.0.6.tar.gz.

File metadata

  • Download URL: pyuseful-0.0.6.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.9

File hashes

Hashes for pyuseful-0.0.6.tar.gz
Algorithm Hash digest
SHA256 7cd040c3cad1aab939b9146b5a67c2eac7bca907023c40d51ed5dd1666fc1488
MD5 be277a9c5dfb2157bf1b959887226a54
BLAKE2b-256 6f0c2dddcf53e08ce146b46c4cb3b839a225f53b1fffbe246c06304aa047b3c8

See more details on using hashes here.

File details

Details for the file pyuseful-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pyuseful-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.9

File hashes

Hashes for pyuseful-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 cd533367fa1c6347995cc9878350ec3f4d09ce66f161909ed14d26b0ac39d0ff
MD5 3ecb97d0c9284471e05577010ea200b3
BLAKE2b-256 26a96712652675ec03b2a53dac4c338c53c7b0af8f2dcd662a061719d9f13361

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page