Skip to main content

add a little neon to your python

Project description

Welcome to neonpy


neonpy is an entirely experimental library consisting largely of decorators I think will be useful to me. I may be very wrong. neonpy comes with no warranty.

Basic philosophy

  1. Per function logging
  2. Distinguish between mutable and immutable
  3. Fix code quickly


@normalize_fields(bar=lambda x: x.lower())
@normalize_fields(foo=lambda x: x.lower(), quux=lambda x: x.upper())
def myfunction(foo, bar="PET", quux="motor"):
    x = 5
    print(foo, bar, quux)

myfunction("my", "PIGEON", "Pie")
myfunction("MY", "CAT")
myfunction("my", "CAT")
myfunction("MY", "dog")


WARNING: Do not use this if you are using objects that are hashable but not immutable

def fib(a):
    if a < 2:
        return 1
    return fib(a-1) + fib(a-2)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for neonpy, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size neonpy-0.0.1-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size neonpy-0.0.1.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page