pyLibrary


NamepyLibrary JSON
Version 3.264.22338 PyPI version JSON
download
home_pagehttps://github.com/klahnakoski/pyLibrary
SummaryLibrary of Wonderful Things
upload_time2022-12-04 14:39:28
maintainer
docs_urlNone
authorKyle Lahnakoski
requires_python
licenseMPL 2.0
keywords
VCS
bugtrack_url
requirements requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyLibrary

A library of wonderful Python things!

## Motivation

This library is born from my version of the `utils` library every project has.
Only, instead of being utilities that are specific to the task, these utilities
are for multiple projects: They assume logs should be structured,
all data should be JSONizable, and OO is preferred, and more.

### Python is a Little Crufty ###

Python is awesome now, but it was originally a procedural language invented
before pure functional semantics, before OO, and even before the
discovery of vowels.  As a consequence there are many procedures that alter
their own parameters, or have disemvoweled names.  This library puts a facade
over these relics of the past and uses convention to name methods.

## Installing pyLibrary

Python packages are easy to install, assuming you have Python (see below).

    pip install pyLibrary

## Installing for Development

  * Download from Github:

        git clone https://github.com/klahnakoski/pyLibrary.git

  * Install requirements:

        python setup.py develop


Windows 7 Install Instructions for Python
-----------------------------------------

Updated November 2014, for Python 2.7.8

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
    * Varsion 2.7.8 or higher (includes pip, so install is easier)
  * Install Python at ```c:\Python27``` (The space in the "Program Files" may screw up installs of native libs)
  * Add to you path: ```c:\Python27;c:\Python27\scripts;```
  * Download ```https://bootstrap.pypa.io/get-pip.py```

        CALL python get-pip.py
        CALL pip 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](http://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows)):

        SET HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath = "C:\Python27"

###Using virtualenv

```virtualenv``` allows you to have multiple python projects on the same
machine, even if they use different versions of the same libraries.
```virtualenv``` does this by making a copy of the main python directory and
using it to hold the specific versions required.

* New environment: ```virtualenv <name_of_dir>```
* Activate environment: ```<name_of_dir>\scripts\activate```
* Exit environment: ```deactivate```

If you have more than one project on your dev box I suggest you do all your
work inside a virtual environment.

### PyPy and Virtual Environments

```virtualenv``` can be used with PyPy, but it is a bit more involved.  The
paths must be explict, and some copying is required.

#### New environment:
The first call to virtualenv will make the directory, to which you copy the
PyPy core libraries, and the second call finishes the install.

    c:\PyPy27\bin\virtualenv <name_of_dir>
    copy c:\PyPy27\bin\lib_pypy <name_of_dir>
    copy c:\PyPy27\bin\lib_python <name_of_dir>
    c:\PyPy27\bin\virtualenv <name_of_dir>

#### Activate environment:
With CPython ```virtualenv``` places it's executables in ```Scripts```.  The
PyPy version uses ```bin```

    <name_of_dir>\bin\activate

#### Using PIP in PyPy:

PyPy does not share any libraries with CPython.  You must install the PyPy libraries using 

	C:\pypy\bin\pip.exe

The `pip` found in your `%PATH%` probably points to `C:\python27\Scripts\pip.exe`.

#### Using PIP in PyPy virtualenv:

Do **NOT** use the ```<name_of_dir>\Scripts``` directory: It installs to your
main PyPy installation.  Pip install is done using the `bin` directory:

    <name_of_dir>\bin\pip.exe

#### Exit environment:
Deactivation is like normal

    deactivate

### CPython Binaries and Virtual Environments

If you plan to use any binary packages, ```virtualenv``` will not work
directly.  Instead, install the binary (32 bit only!!) to the main python
installation.  Then copy any newly installed files/directories from
```C:\Python27\Lib\site-packages``` to ```<name_of_dir>\Lib\site-packages```.

### Binaries and PyPy

This strategy for installing binaries into Virtual Environments is almost
identical to installing binaries into your PyPy environment: Install Numpy
and Scipy to your CPython installation using a windows installer (which has
pre-compiled binaries), and then copy the ```C:\Python27\Lib\site-packages\<package>```
to ```c:\PyPy\site-packages\```; note lack of ```Lib``` subdirectory.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/klahnakoski/pyLibrary",
    "name": "pyLibrary",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Kyle Lahnakoski",
    "author_email": "kyle@lahnakoski.com",
    "download_url": "https://files.pythonhosted.org/packages/e9/40/b244996031d930d01add4f8185c5eda179cb78ea098e0eed18c9023bb36b/pyLibrary-3.264.22338.tar.gz",
    "platform": null,
    "description": "# pyLibrary\r\n\r\nA library of wonderful Python things!\r\n\r\n## Motivation\r\n\r\nThis library is born from my version of the `utils` library every project has.\r\nOnly, instead of being utilities that are specific to the task, these utilities\r\nare for multiple projects: They assume logs should be structured,\r\nall data should be JSONizable, and OO is preferred, and more.\r\n\r\n### Python is a Little Crufty ###\r\n\r\nPython is awesome now, but it was originally a procedural language invented\r\nbefore pure functional semantics, before OO, and even before the\r\ndiscovery of vowels.  As a consequence there are many procedures that alter\r\ntheir own parameters, or have disemvoweled names.  This library puts a facade\r\nover these relics of the past and uses convention to name methods.\r\n\r\n## Installing pyLibrary\r\n\r\nPython packages are easy to install, assuming you have Python (see below).\r\n\r\n    pip install pyLibrary\r\n\r\n## Installing for Development\r\n\r\n  * Download from Github:\r\n\r\n        git clone https://github.com/klahnakoski/pyLibrary.git\r\n\r\n  * Install requirements:\r\n\r\n        python setup.py develop\r\n\r\n\r\nWindows 7 Install Instructions for Python\r\n-----------------------------------------\r\n\r\nUpdated November 2014, for Python 2.7.8\r\n\r\nPython was really made for Linux, and installation will be easier there.\r\nTechnically, Python works on Windows too, but there are a few gotchas you can\r\navoid by following these instructions.\r\n\r\n  * Download Python 2.7\r\n    * 32bit ONLY!!! Many native libs are 32 bit\r\n    * Varsion 2.7.8 or higher (includes pip, so install is easier)\r\n  * Install Python at ```c:\\Python27``` (The space in the \"Program Files\" may screw up installs of native libs)\r\n  * Add to you path: ```c:\\Python27;c:\\Python27\\scripts;```\r\n  * Download ```https://bootstrap.pypa.io/get-pip.py```\r\n\r\n        CALL python get-pip.py\r\n        CALL pip install virtualenv\r\n\r\n  * Many \"Python Powered\" native installs require a pointer to the python installation, but they have no idea where to\r\n  look in 64bit windows.  You must alter the registry ([http://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows](http://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows)):\r\n\r\n        SET HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Python\\PythonCore\\2.7\\InstallPath = \"C:\\Python27\"\r\n\r\n###Using virtualenv\r\n\r\n```virtualenv``` allows you to have multiple python projects on the same\r\nmachine, even if they use different versions of the same libraries.\r\n```virtualenv``` does this by making a copy of the main python directory and\r\nusing it to hold the specific versions required.\r\n\r\n* New environment: ```virtualenv <name_of_dir>```\r\n* Activate environment: ```<name_of_dir>\\scripts\\activate```\r\n* Exit environment: ```deactivate```\r\n\r\nIf you have more than one project on your dev box I suggest you do all your\r\nwork inside a virtual environment.\r\n\r\n### PyPy and Virtual Environments\r\n\r\n```virtualenv``` can be used with PyPy, but it is a bit more involved.  The\r\npaths must be explict, and some copying is required.\r\n\r\n#### New environment:\r\nThe first call to virtualenv will make the directory, to which you copy the\r\nPyPy core libraries, and the second call finishes the install.\r\n\r\n    c:\\PyPy27\\bin\\virtualenv <name_of_dir>\r\n    copy c:\\PyPy27\\bin\\lib_pypy <name_of_dir>\r\n    copy c:\\PyPy27\\bin\\lib_python <name_of_dir>\r\n    c:\\PyPy27\\bin\\virtualenv <name_of_dir>\r\n\r\n#### Activate environment:\r\nWith CPython ```virtualenv``` places it's executables in ```Scripts```.  The\r\nPyPy version uses ```bin```\r\n\r\n    <name_of_dir>\\bin\\activate\r\n\r\n#### Using PIP in PyPy:\r\n\r\nPyPy does not share any libraries with CPython.  You must install the PyPy libraries using \r\n\r\n\tC:\\pypy\\bin\\pip.exe\r\n\r\nThe `pip` found in your `%PATH%` probably points to `C:\\python27\\Scripts\\pip.exe`.\r\n\r\n#### Using PIP in PyPy virtualenv:\r\n\r\nDo **NOT** use the ```<name_of_dir>\\Scripts``` directory: It installs to your\r\nmain PyPy installation.  Pip install is done using the `bin` directory:\r\n\r\n    <name_of_dir>\\bin\\pip.exe\r\n\r\n#### Exit environment:\r\nDeactivation is like normal\r\n\r\n    deactivate\r\n\r\n### CPython Binaries and Virtual Environments\r\n\r\nIf you plan to use any binary packages, ```virtualenv``` will not work\r\ndirectly.  Instead, install the binary (32 bit only!!) to the main python\r\ninstallation.  Then copy any newly installed files/directories from\r\n```C:\\Python27\\Lib\\site-packages``` to ```<name_of_dir>\\Lib\\site-packages```.\r\n\r\n### Binaries and PyPy\r\n\r\nThis strategy for installing binaries into Virtual Environments is almost\r\nidentical to installing binaries into your PyPy environment: Install Numpy\r\nand Scipy to your CPython installation using a windows installer (which has\r\npre-compiled binaries), and then copy the ```C:\\Python27\\Lib\\site-packages\\<package>```\r\nto ```c:\\PyPy\\site-packages\\```; note lack of ```Lib``` subdirectory.\r\n\r\n",
    "bugtrack_url": null,
    "license": "MPL 2.0",
    "summary": "Library of Wonderful Things",
    "version": "3.264.22338",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "c9d674094f65484ff3302d77dc0877ec",
                "sha256": "ef93f33da017ec402053b91bc5095ad50c53e4a83075fa55cabcbbcdb5046714"
            },
            "downloads": -1,
            "filename": "pyLibrary-3.264.22338.tar.gz",
            "has_sig": false,
            "md5_digest": "c9d674094f65484ff3302d77dc0877ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 31039,
            "upload_time": "2022-12-04T14:39:28",
            "upload_time_iso_8601": "2022-12-04T14:39:28.290240Z",
            "url": "https://files.pythonhosted.org/packages/e9/40/b244996031d930d01add4f8185c5eda179cb78ea098e0eed18c9023bb36b/pyLibrary-3.264.22338.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-04 14:39:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "klahnakoski",
    "github_project": "pyLibrary",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        }
    ],
    "lcname": "pylibrary"
}
        
Elapsed time: 0.02081s