Skip to main content

A cool utility library

Project description

notify

This uses ntfy.sh Read their docs on ntfy.sh To receive notifcations you must download the ntfy.sh app and select a 'route' id

Parameters

route

Route id

msg = ""

msg content

title="<>"

title

private = False

Only sends the notifcation once when enabled, if the phone is not connected to the internet it will not receive it

priority = 3

priority, only affects the app based on the settings chosen. Can be any integer from 1-5

action = None

Used to create buttons linking to a url action = [("Google", "google.com"),("Example","example.com")] # [(label,url)]

delay=None

Creates a delay

markdown_enabled = True

Enables/Disables markdown

pretty print

This replaces the print function when imported. The new syntax is: print("Hello",end = " ",color=RED, move_cursor = START_OF_LINE)

plot

Just throw some values into it and it will plot them :) plot([1,2,4,8])

Database

First initialize a new database

columns = [("name",str),("id",int),("score", float)]

data = Database("filename.db", columns)

Now data can be used as a list of dictionaries :)

data.append(("NAME1", 1, 1.1))

data[0]["id"] #-> 1

Retry

Decorator for use in debugging or web-requests

@retry(retries = 3, delay = 1, exponential_delay = True)
def myfunc():
    pass

Timer

start_timer() - Stars/resets timer

get_timer() - Gets timer value as a datetime object

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

utilscool-1.0.0.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

utilscool-1.0.0-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

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