dhp


Namedhp JSON
Version 0.0.15 PyPI version JSON
download
home_pagehttps://bitbucket.org/dundeemt/dhp
SummaryA collection of handy modules, almost guaranteed to get you into trouble.
upload_time2016-06-06 12:19:56
maintainer
docs_urlNone
authorJeff Hinrichs
requires_python
licenseBSD
keywords phrasebook hungarian
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Dirty Hungarian Phrasebook
==========================
``dhp`` is a library of snippets almost guaranteed to get you into trouble.

I obtained it from a vendor, on the corner, outside of PyCon.

Actually, this is a growing repository of routines that I find helpful from time to time. I think you might too.


Example Phrasebook Contents
---------------------------
See the `Full Documentation <http://dhp.rtfd.org/>`_ for a complete listing.

**dhp.doq**

  * **DOQ** Data Object Query mapper.  Query simple data sources with an ORM like style.

  ::

    from dhp.doq import DOQ

    doq = DOQ(data_objects=data_source)
    for rec in doq.filter(occupation='Publisher'):
      print(rec)


**dhp.structures**

  * **DictDot** - subclasses Python's built-in dict object and offers attribute access to the dictionary.

  ::

    from dhp.structures import DictDot

    my_dict = {'hovercraft': 'eels', 'speed': 42}
    dicdot = DictDot(my_dict)
    assert dicdot.hovercraft == 'eels'
    assert dicdot.speed == 42


**dhp.test**

  * **tempfile_containing** - generate a temporary file that contains indicated contents and returns the filename for use.  When finished the tempfile is removed.

::

    from dhp.test import tempfile_containing

    contents = 'I will not buy this record, it is scratched.'
    with tempfile_containing(contents) as fname:
        do_something(fname)

**dhp.xml**

 * **xml_to_dict** - parse any ugly xml to a python dictionary.

::

    from dhp.xml import xml_to_dict

    xml = '<vehicle type="Hovercraft"><filled/><cargo>eels</cargo></vehicle>'
    xml_to_dict(xml)

    {'vehicle': {'@type':'Hovercraft',
                 'cargo':'eels',
                 'filled': None}
    }


Supports
--------
Tested on Python 2.7, 3.2, 3.3, 3.4

.. image:: https://drone.io/bitbucket.org/dundeemt/dhp/status.png
    :target: https://drone.io/bitbucket.org/dundeemt/dhp/latest
    :alt: Build Status

.. image:: https://readthedocs.org/projects/dhp/badge/?version=v0.0.15
    :target: http://dhp.readthedocs.org/en/v0.0.15/?badge=v0.0.15
    :alt: Documentation Status

Requirements
------------
None.

Installation
------------
Make sure to get the latest version.

  pip install dhp

Documentation
--------------
`Full Docs <http://dhp.rtfd.org/>`_
            

Raw data

            {
    "_id": null,
    "home_page": "https://bitbucket.org/dundeemt/dhp",
    "name": "dhp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "phrasebook hungarian",
    "author": "Jeff Hinrichs",
    "author_email": "jeffh@dundeemt.com",
    "download_url": "https://files.pythonhosted.org/packages/66/e0/d1e2114b4914d7de3a1692d17c603ad0f1ab31635610a5d40d70d15fe27e/dhp-0.0.15.tar.gz",
    "platform": "any",
    "description": "Dirty Hungarian Phrasebook\n==========================\n``dhp`` is a library of snippets almost guaranteed to get you into trouble.\n\nI obtained it from a vendor, on the corner, outside of PyCon.\n\nActually, this is a growing repository of routines that I find helpful from time to time. I think you might too.\n\n\nExample Phrasebook Contents\n---------------------------\nSee the `Full Documentation <http://dhp.rtfd.org/>`_ for a complete listing.\n\n**dhp.doq**\n\n  * **DOQ** Data Object Query mapper.  Query simple data sources with an ORM like style.\n\n  ::\n\n    from dhp.doq import DOQ\n\n    doq = DOQ(data_objects=data_source)\n    for rec in doq.filter(occupation='Publisher'):\n      print(rec)\n\n\n**dhp.structures**\n\n  * **DictDot** - subclasses Python's built-in dict object and offers attribute access to the dictionary.\n\n  ::\n\n    from dhp.structures import DictDot\n\n    my_dict = {'hovercraft': 'eels', 'speed': 42}\n    dicdot = DictDot(my_dict)\n    assert dicdot.hovercraft == 'eels'\n    assert dicdot.speed == 42\n\n\n**dhp.test**\n\n  * **tempfile_containing** - generate a temporary file that contains indicated contents and returns the filename for use.  When finished the tempfile is removed.\n\n::\n\n    from dhp.test import tempfile_containing\n\n    contents = 'I will not buy this record, it is scratched.'\n    with tempfile_containing(contents) as fname:\n        do_something(fname)\n\n**dhp.xml**\n\n * **xml_to_dict** - parse any ugly xml to a python dictionary.\n\n::\n\n    from dhp.xml import xml_to_dict\n\n    xml = '<vehicle type=\"Hovercraft\"><filled/><cargo>eels</cargo></vehicle>'\n    xml_to_dict(xml)\n\n    {'vehicle': {'@type':'Hovercraft',\n                 'cargo':'eels',\n                 'filled': None}\n    }\n\n\nSupports\n--------\nTested on Python 2.7, 3.2, 3.3, 3.4\n\n.. image:: https://drone.io/bitbucket.org/dundeemt/dhp/status.png\n    :target: https://drone.io/bitbucket.org/dundeemt/dhp/latest\n    :alt: Build Status\n\n.. image:: https://readthedocs.org/projects/dhp/badge/?version=v0.0.15\n    :target: http://dhp.readthedocs.org/en/v0.0.15/?badge=v0.0.15\n    :alt: Documentation Status\n\nRequirements\n------------\nNone.\n\nInstallation\n------------\nMake sure to get the latest version.\n\n  pip install dhp\n\nDocumentation\n--------------\n`Full Docs <http://dhp.rtfd.org/>`_",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "A collection of handy modules, almost guaranteed to get you into trouble.",
    "version": "0.0.15",
    "project_urls": {
        "Homepage": "https://bitbucket.org/dundeemt/dhp"
    },
    "split_keywords": [
        "phrasebook",
        "hungarian"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66e0d1e2114b4914d7de3a1692d17c603ad0f1ab31635610a5d40d70d15fe27e",
                "md5": "1aee07598ca543fee738426f174f747b",
                "sha256": "d0904932a6b0a0fe8268f543799ecd8186af10a045299b90da07913e39351a31"
            },
            "downloads": -1,
            "filename": "dhp-0.0.15.tar.gz",
            "has_sig": false,
            "md5_digest": "1aee07598ca543fee738426f174f747b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17332,
            "upload_time": "2016-06-06T12:19:56",
            "upload_time_iso_8601": "2016-06-06T12:19:56.637838Z",
            "url": "https://files.pythonhosted.org/packages/66/e0/d1e2114b4914d7de3a1692d17c603ad0f1ab31635610a5d40d70d15fe27e/dhp-0.0.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2016-06-06 12:19:56",
    "github": false,
    "gitlab": false,
    "bitbucket": true,
    "codeberg": false,
    "bitbucket_user": "dundeemt",
    "bitbucket_project": "dhp",
    "lcname": "dhp"
}
        
Elapsed time: 0.11863s