Skip to main content

add a little neon to your python

Project description

Welcome to neonpy

Warning

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

@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")
myfunction("MY", "CAT")
myfunction("my", "CAT")
myfunction("MY", "dog")

@memoize

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

@memoize
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.

Source Distribution

neonpy-0.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

neonpy-0.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neonpy-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6

File hashes

Hashes for neonpy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c59ebf83b60ac1a4a5e5aad87bb4bdb711437c5a24027f5ec7a5b98f2f95d2c5
MD5 7bebf96b0ce782e503a1febc99951155
BLAKE2b-256 dfb9daa365f7c9d0870dc23ba6f9afc5f464830ed925a22156cfa41fed2f57cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neonpy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6

File hashes

Hashes for neonpy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff5ae018ea2010b6f2952e7aa7fccaaa9a93661f0f2db6b37a4ef4141be3beca
MD5 6544819b3d570e0faeff551a0bdbbf83
BLAKE2b-256 3449c70ec188f14ffe5ec3dd47552207cd9c8e89964185ed6f940fce35d63ace

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page