Skip to main content

Lazier workflow for Jupyter

Project description

lazier

lazier allows you to move faster when you are exploring how functions change with their input, this module was written because I often felt that there had to be an easier way to work in a interactive enviroment with jupyter notebooks.

Here is a demonstration: Without lazier:

def foo(a,b,c,d):
    print(a)
    print(b)
    print(c)
    print(d)
foo(a=1,b= 2, c=3, d=4)
1
2
3
4
foo(d=2)
---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

<ipython-input-3-9233fe4ac2c5> in <module>()
----> 1 foo(d=2)


TypeError: foo() missing 3 required positional arguments: 'a', 'b', and 'c'

with lazier:

from lazier import lazier
@lazier
def foo(a,b,c,d):
    print(a)
    print(b)
    print(c)
    print(d)
foo(a=1,b= 2, c=3, d=4)
1
2
3
4

Now suppose you want to see how the output of the function changed if d was 7 in the above function call, with lazier it looks like:

foo(d=7)
1
2
3
7

and so on.

foo(a=9)
9
2
3
7

using reset you can forget all past values that it remebers

foo.reset()
foo()
foo() missing 4 required positional arguments: 'a', 'b', 'c', and 'd'
foo(a=1, b=11, c=3)
foo() missing 1 required positional argument: 'd'
foo(d=9)
1
11
3
9

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

lazier-0.0.1.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

lazier-0.0.1-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file lazier-0.0.1.tar.gz.

File metadata

  • Download URL: lazier-0.0.1.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lazier-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a64b7d1f1a0fd2d965175e76d86d694189f693fc397bbf704d1067f68302fc0c
MD5 564b0289c7a9a3baa0379f340ba5dbad
BLAKE2b-256 d216c239120d4d1bdd93d89c515910284d8678ed3b7ead0ba886fb705bc07a88

See more details on using hashes here.

File details

Details for the file lazier-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lazier-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11de483612d7202f4ea65c689e41b3b413bf0ed099bbef64aacac1fbaba819f5
MD5 317c990f9ea886f70d99055fd7d975dc
BLAKE2b-256 d2ac408f788f90fe803eaf45f7cac773431128ac2076838ce78454a2a91dd4e2

See more details on using hashes here.

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