Skip to main content

Library of Wonderful Things

Project description

A library of general functions

  • cnv.py - Convert between types, methods are in the form of <from_type> "2" <to_type> so I am better able to remember them

  • db.py - Simplify the MySQL client API, specifically to parametrize SQL easier

  • elasticsearch.py - Interact with Elasticsearch

  • emailer.py - Simple email

  • files.py - Default utf8, and because I can not remember the builtin file functions

  • jsons.py - Handle converting more types to JSON, switches based on cPython or PyPy for fastest implementation

  • logs.py - Exception chaining, threaded and structured logging

  • maths.py - Extra math functions, with proper mapping of missing values

  • multiset.py - who doesn’t need a multiset?

  • multithread.py - optimized for symmetric multi-threading (not real threads, for course)

  • multiprocess.py - optimized for symmetric multi-processing (incomplete)

  • queries/Q.py - Named methods for very common set/list comprehensions

  • queries/windows.py - Window functions for list comprehensions

  • randoms.py - Because random should be easy to remember

  • startup.py - because application parameters should all be in one place and NOT HIDING IN ENVIRONMENT VARIABLES!!

  • stats.py - Statistical functions with missing value handling

  • strings.py - String functions: Mostly giving familiar names to Python equivalent.

  • struct.py - Basis for proper missing-value (Null) handling on list comprehensions

  • threads.py - Because, somehow, the standard lib go it wrong

  • timer.py - The way timers are meant to be (using the with clause)

Windows 7 Install Instructions

Python was really made for Linux, and installation will be easier there. Technically, Python works on Windows too, but there are a few gotchas you can avoid by following these instructions.

  • Download Python 2.7 (32bit ONLY!!! Many native libs are 32 bit)

  • Install Python at c:27 (The space in the “Program Files” may screw up installs of native libs)

  • Add to you path: c:\Python27;c:\Python27\scripts;

  • Download http://python-distribute.org/distribute_setup.py

    CALL python distribute_setup.py
    CALL easy_install pip
    CALL easy_install virtualenv
  • Many “Python Powered” native installs require a pointer to the python installation, but they have no idea where to look in 64bit windows. You must alter the registry (http://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows):

    SET HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath = "C:\Python27"
  • Download from Github:

    git clone https://github.com/klahnakoski/pyLibrary.git
  • Download requirements:

    pip install -r requirements.txt

Optional

pyLibrary does not use these, but maybe you will find them useful:

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

pyLibrary-0.1.13316.zip (56.6 kB view hashes)

Uploaded Source

Built Distributions

pyLibrary-0.1.13316.win32-py2.7.exe (244.5 kB view hashes)

Uploaded Source

pyLibrary-0.1.13316-py2.7.egg (103.7 kB view hashes)

Uploaded Source

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