Skip to main content

Randomly adds affirming print statements to functions.

Project description

Affirmations

A module that gives you a little bump of encouragement.

Requirements

  • A positive attitude
  • A can-do spirit

Installation

pip install Affirmations

Usage

Decorate any function to get a random affirmation printed to stdout every time that function is run

from Affirmations import affirm

@affirm() # prints an affirmation to stdout 100% of the time this function is run
def hello_world():
    print("hello")

@affirm(0.2) # prints an affirmation to stdout 20% of the time this function is run
def hello_world2():
    print("hello")

hello_world()
hello
You are awesome!

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

Affirmations-0.0.10.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

Affirmations-0.0.10-py3-none-any.whl (4.3 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