tinynetrc


Nametinynetrc JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/sloria/tinynetrc
SummaryRead and write .netrc files.
upload_time2018-01-12 16:21:38
maintainer
docs_urlNone
authorSteven Loria
requires_python
licenseMIT
keywords netrc posix
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            *********
tinynetrc
*********

.. image:: https://badge.fury.io/py/tinynetrc.svg
    :target: http://badge.fury.io/py/tinynetrc
    :alt: Latest version

.. image:: https://travis-ci.org/sloria/tinynetrc.svg?branch=master
    :target: https://travis-ci.org/sloria/tinynetrc
    :alt: Travis-CI

Read and write .netrc files in Python.


``tinynetrc`` uses the `netrc <https://docs.python.org/3/library/netrc.html>`_
module from the standard library under the hood and adds a few
improvements:

* Adds write functionality.
* Fixes a std lib `bug <https://bugs.python.org/issue30806>`_ with
  formatting a .netrc file.*
* Parses .netrc into dictionary values rather than tuples.

\*This bug is fixed in newer versions of Python.

Get it now
==========
::

    pip install tinynetrc


``tinynetrc`` supports Python >= 2.7 or >= 3.4.

Usage
=====

.. code-block:: python

    from tinynetrc import Netrc

    netrc = Netrc()  # parse ~/.netrc
    # Get credentials
    netrc['api.heroku.com']['login']
    netrc['api.heroku.com']['password']

    # Modify an existing entry
    netrc['api.heroku.com']['password'] = 'newpassword'
    netrc.save()  # writes to ~/.netrc

    # Add a new entry
    netrc['surge.surge.sh'] = {
        'login': 'sloria1@gmail.com',
        'password': 'secret'
    }
    netrc.save()

    # Removing an new entry
    del netrc['surge.surge.sh']
    netrc.save()

License
=======

MIT licensed. See the bundled `LICENSE <https://github.com/sloria/tinynetrc/blob/master/LICENSE>`_ file for more details.



            

Raw data

            {
    "maintainer": "", 
    "docs_url": null, 
    "requires_python": "", 
    "maintainer_email": "", 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "netrc posix", 
    "upload_time": "2018-01-12 16:21:38", 
    "author": "Steven Loria", 
    "home_page": "https://github.com/sloria/tinynetrc", 
    "github_user": "sloria", 
    "download_url": "https://pypi.python.org/packages/d6/a7/8e5075e381c164b59f9b76e22c5f63c3b015655f85794b4d9059b71784c3/tinynetrc-1.2.0.tar.gz", 
    "platform": "", 
    "version": "1.2.0", 
    "cheesecake_documentation_id": null, 
    "description": "*********\ntinynetrc\n*********\n\n.. image:: https://badge.fury.io/py/tinynetrc.svg\n    :target: http://badge.fury.io/py/tinynetrc\n    :alt: Latest version\n\n.. image:: https://travis-ci.org/sloria/tinynetrc.svg?branch=master\n    :target: https://travis-ci.org/sloria/tinynetrc\n    :alt: Travis-CI\n\nRead and write .netrc files in Python.\n\n\n``tinynetrc`` uses the `netrc <https://docs.python.org/3/library/netrc.html>`_\nmodule from the standard library under the hood and adds a few\nimprovements:\n\n* Adds write functionality.\n* Fixes a std lib `bug <https://bugs.python.org/issue30806>`_ with\n  formatting a .netrc file.*\n* Parses .netrc into dictionary values rather than tuples.\n\n\\*This bug is fixed in newer versions of Python.\n\nGet it now\n==========\n::\n\n    pip install tinynetrc\n\n\n``tinynetrc`` supports Python >= 2.7 or >= 3.4.\n\nUsage\n=====\n\n.. code-block:: python\n\n    from tinynetrc import Netrc\n\n    netrc = Netrc()  # parse ~/.netrc\n    # Get credentials\n    netrc['api.heroku.com']['login']\n    netrc['api.heroku.com']['password']\n\n    # Modify an existing entry\n    netrc['api.heroku.com']['password'] = 'newpassword'\n    netrc.save()  # writes to ~/.netrc\n\n    # Add a new entry\n    netrc['surge.surge.sh'] = {\n        'login': 'sloria1@gmail.com',\n        'password': 'secret'\n    }\n    netrc.save()\n\n    # Removing an new entry\n    del netrc['surge.surge.sh']\n    netrc.save()\n\nLicense\n=======\n\nMIT licensed. See the bundled `LICENSE <https://github.com/sloria/tinynetrc/blob/master/LICENSE>`_ file for more details.\n\n\n", 
    "lcname": "tinynetrc", 
    "bugtrack_url": null, 
    "github": true, 
    "coveralls": false, 
    "name": "tinynetrc", 
    "license": "MIT", 
    "travis_ci": true, 
    "github_project": "tinynetrc", 
    "summary": "Read and write .netrc files.", 
    "split_keywords": [
        "netrc", 
        "posix"
    ], 
    "author_email": "sloria1@gmail.com", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2018-01-12T16:21:37", 
            "comment_text": "", 
            "python_version": "py2.py3", 
            "url": "https://pypi.python.org/packages/e0/42/ece8d5a72f34fb6a5df57b445d99021fd708ecddc93795d9e1e00f001c1c/tinynetrc-1.2.0-py2.py3-none-any.whl", 
            "md5_digest": "21fa16c672c428822378dfd8d548681c", 
            "downloads": 0, 
            "filename": "tinynetrc-1.2.0-py2.py3-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "e0/42/ece8d5a72f34fb6a5df57b445d99021fd708ecddc93795d9e1e00f001c1c/tinynetrc-1.2.0-py2.py3-none-any.whl", 
            "size": 4414
        }, 
        {
            "has_sig": false, 
            "upload_time": "2018-01-12T16:21:38", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/d6/a7/8e5075e381c164b59f9b76e22c5f63c3b015655f85794b4d9059b71784c3/tinynetrc-1.2.0.tar.gz", 
            "md5_digest": "905e68e3f02703477ed4e5efc9fb519e", 
            "downloads": 0, 
            "filename": "tinynetrc-1.2.0.tar.gz", 
            "packagetype": "sdist", 
            "path": "d6/a7/8e5075e381c164b59f9b76e22c5f63c3b015655f85794b4d9059b71784c3/tinynetrc-1.2.0.tar.gz", 
            "size": 3959
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}