linode-api


Namelinode-api JSON
Version 4.1.9b1 PyPI version JSON
download
home_pagehttps://github.com/linode/python-linode-api
SummaryThe official python SDK for Linode API v4
upload_time2018-04-05 11:20:40
maintainer
docs_urlNone
authorLinode
requires_python
licenseBSD 3-Clause License
keywords linode cloud hosting infrastructure
VCS
bugtrack_url
requirements httplib2 enum34
Travis-CI
coveralls test coverage No coveralls.
            python-linode-api
=================

The official python library for the `Linode API`_ in python.

**This library is currently in beta.**

.. _Linode API: https://developers.linode.com/v4/introduction

.. image:: https://travis-ci.org/linode/python-linode-api.svg?branch=master
    :target: https://travis-ci.org/linode/python-linode-api

.. image:: https://badge.fury.io/py/linode-api.svg
    :target: https://badge.fury.io/py/linode-api

Installation
------------
::

    pip install linode-api

Building from Source
--------------------

To build and install this package:

- Clone this repository
- ``./setup.py install``

This package uses the ``linode`` namespace.  This could conflict with libraries
intended for previous versions of the Linode API.  Please be cautious when
installing packages for both version of the API on the same machine.

Usage
-----

Check out the `Getting Started guide`_ to start using this library, or read
`the docs`_ for extensive documentation.

.. _Getting Started guide: http://python-linode-api.readthedocs.io/en/latest/guides/getting_started.html
.. _the docs: http://python-linode-api.readthedocs.io/en/latest/index.html

Examples
--------

See the `Install on a Linode`_ example project for a simple use case demonstrating
many of the features of this library.

.. _Install on a Linode: https://github.com/linode/python-api/tree/master/examples/install-on-linode

Contributing
============

Tests
-----

Tests live in the ``tests`` directory.  To run tests, use setup.py:

.. code-block:: shell

   python setup.py test

The test suite uses fixtures stored as JSON in ``test/fixtures``.  These files
contain sanitized JSON responses from the API - the file name is the URL called
to produce the response, replacing any slashes with underscores.

Test classes should extend ``test.base.ClientBaseCase``.  This provides them
with ``self.client``, a ``LinodeClient`` object that is set up to work with
tests.  Importantly, any GET request made by this object will be mocked to
retrieve data from the test fixtures.  This includes lazy-loaded objects using
this client (and by extension related models).

When testing against requests other than GET requests, ``self.mock_post`` (and
equivalent methods for other HTTP verbs) can be used in a ``with`` block to
mock out the intended request type - include the URL whose response should be
used returned from the fixtures.  For example:

.. code-block:: python

   with self.mock_post('/linode/instances/123'):
     linode = self.client.linode.create_instance('g5-standard-1', 'us-east')
     self.assertEqual(linode.id, 123) # passes

Documentation
-------------

This library is documented with Sphinx_.  Docs live in the ``docs`` directory.
The easiest way to build the docs is to run ``sphinx-autobuild`` in that
folder.

Classes and functions inside the library should be annotated with sphinx-compliant
docstrings which will be used to automatically generate documentation for the
library.  When contributing, be sure to update documentation or include new
docstrings where applicable to keep the library's documentation up to date
and useful.

**Missing or inaccurate documentation is a bug**.  If you notice that the
documentation for this library is out of date or unclear, please
`open an issue`_ to make us aware of the problem.

.. _Sphinx: http://www.sphinx-doc.org/en/master/index.html
.. _open an issue: https://github.com/linode/python-linode-api/issues/new



            

Raw data

            {
    "maintainer": "", 
    "docs_url": null, 
    "requires_python": "", 
    "maintainer_email": "", 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "linode cloud hosting infrastructure", 
    "upload_time": "2018-04-05 11:20:40", 
    "requirements": [
        {
            "name": "httplib2", 
            "specs": []
        }, 
        {
            "name": "enum34", 
            "specs": []
        }
    ], 
    "author": "Linode", 
    "home_page": "https://github.com/linode/python-linode-api", 
    "github_user": "linode", 
    "download_url": "https://pypi.python.org/packages/92/20/130641a81ede247f8c56347b84a34e7d5fb858f950d3c2c7c23fc1b83fbb/linode-api-4.1.9b1.tar.gz", 
    "platform": "", 
    "version": "4.1.9b1", 
    "cheesecake_documentation_id": null, 
    "description": "python-linode-api\n=================\n\nThe official python library for the `Linode API`_ in python.\n\n**This library is currently in beta.**\n\n.. _Linode API: https://developers.linode.com/v4/introduction\n\n.. image:: https://travis-ci.org/linode/python-linode-api.svg?branch=master\n    :target: https://travis-ci.org/linode/python-linode-api\n\n.. image:: https://badge.fury.io/py/linode-api.svg\n    :target: https://badge.fury.io/py/linode-api\n\nInstallation\n------------\n::\n\n    pip install linode-api\n\nBuilding from Source\n--------------------\n\nTo build and install this package:\n\n- Clone this repository\n- ``./setup.py install``\n\nThis package uses the ``linode`` namespace.  This could conflict with libraries\nintended for previous versions of the Linode API.  Please be cautious when\ninstalling packages for both version of the API on the same machine.\n\nUsage\n-----\n\nCheck out the `Getting Started guide`_ to start using this library, or read\n`the docs`_ for extensive documentation.\n\n.. _Getting Started guide: http://python-linode-api.readthedocs.io/en/latest/guides/getting_started.html\n.. _the docs: http://python-linode-api.readthedocs.io/en/latest/index.html\n\nExamples\n--------\n\nSee the `Install on a Linode`_ example project for a simple use case demonstrating\nmany of the features of this library.\n\n.. _Install on a Linode: https://github.com/linode/python-api/tree/master/examples/install-on-linode\n\nContributing\n============\n\nTests\n-----\n\nTests live in the ``tests`` directory.  To run tests, use setup.py:\n\n.. code-block:: shell\n\n   python setup.py test\n\nThe test suite uses fixtures stored as JSON in ``test/fixtures``.  These files\ncontain sanitized JSON responses from the API - the file name is the URL called\nto produce the response, replacing any slashes with underscores.\n\nTest classes should extend ``test.base.ClientBaseCase``.  This provides them\nwith ``self.client``, a ``LinodeClient`` object that is set up to work with\ntests.  Importantly, any GET request made by this object will be mocked to\nretrieve data from the test fixtures.  This includes lazy-loaded objects using\nthis client (and by extension related models).\n\nWhen testing against requests other than GET requests, ``self.mock_post`` (and\nequivalent methods for other HTTP verbs) can be used in a ``with`` block to\nmock out the intended request type - include the URL whose response should be\nused returned from the fixtures.  For example:\n\n.. code-block:: python\n\n   with self.mock_post('/linode/instances/123'):\n     linode = self.client.linode.create_instance('g5-standard-1', 'us-east')\n     self.assertEqual(linode.id, 123) # passes\n\nDocumentation\n-------------\n\nThis library is documented with Sphinx_.  Docs live in the ``docs`` directory.\nThe easiest way to build the docs is to run ``sphinx-autobuild`` in that\nfolder.\n\nClasses and functions inside the library should be annotated with sphinx-compliant\ndocstrings which will be used to automatically generate documentation for the\nlibrary.  When contributing, be sure to update documentation or include new\ndocstrings where applicable to keep the library's documentation up to date\nand useful.\n\n**Missing or inaccurate documentation is a bug**.  If you notice that the\ndocumentation for this library is out of date or unclear, please\n`open an issue`_ to make us aware of the problem.\n\n.. _Sphinx: http://www.sphinx-doc.org/en/master/index.html\n.. _open an issue: https://github.com/linode/python-linode-api/issues/new\n\n\n", 
    "lcname": "linode-api", 
    "bugtrack_url": "", 
    "github": true, 
    "coveralls": false, 
    "name": "linode-api", 
    "license": "BSD 3-Clause License", 
    "travis_ci": true, 
    "github_project": "python-linode-api", 
    "summary": "The official python SDK for Linode API v4", 
    "split_keywords": [
        "linode", 
        "cloud", 
        "hosting", 
        "infrastructure"
    ], 
    "author_email": "developers@linode.com", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2018-04-05T11:20:40", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/92/20/130641a81ede247f8c56347b84a34e7d5fb858f950d3c2c7c23fc1b83fbb/linode-api-4.1.9b1.tar.gz", 
            "md5_digest": "8ab9ccd5a55af982208eb9e55296a65a", 
            "downloads": 0, 
            "filename": "linode-api-4.1.9b1.tar.gz", 
            "packagetype": "sdist", 
            "path": "92/20/130641a81ede247f8c56347b84a34e7d5fb858f950d3c2c7c23fc1b83fbb/linode-api-4.1.9b1.tar.gz", 
            "digests": {
                "sha256": "fa0829798d2d169f72e5af00b9db67b61f2ab7e4165e11992863b3cc49343340", 
                "md5": "8ab9ccd5a55af982208eb9e55296a65a"
            }, 
            "sha256_digest": "fa0829798d2d169f72e5af00b9db67b61f2ab7e4165e11992863b3cc49343340", 
            "size": 45044
        }, 
        {
            "has_sig": false, 
            "upload_time": "2018-04-05T11:20:39", 
            "comment_text": "", 
            "python_version": "py2.py3", 
            "url": "https://pypi.python.org/packages/70/ca/a0fc9a491e0339cadd1ac47a51e7d8ec53ebebdc8e406a66963d4af6786c/linode_api-4.1.9b1-py2.py3-none-any.whl", 
            "md5_digest": "e463fac0c2642160e78c74515c138490", 
            "downloads": 0, 
            "filename": "linode_api-4.1.9b1-py2.py3-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "70/ca/a0fc9a491e0339cadd1ac47a51e7d8ec53ebebdc8e406a66963d4af6786c/linode_api-4.1.9b1-py2.py3-none-any.whl", 
            "digests": {
                "sha256": "4ba4109b7f2ab46ebf15cf4fcc5235d493bf5f37cfc92e1e9a0c9aeb4d8d1fa0", 
                "md5": "e463fac0c2642160e78c74515c138490"
            }, 
            "sha256_digest": "4ba4109b7f2ab46ebf15cf4fcc5235d493bf5f37cfc92e1e9a0c9aeb4d8d1fa0", 
            "size": 69357
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}