SoftLayer


NameSoftLayer JSON
Version 6.2.5 PyPI version JSON
download
home_pagehttps://github.com/SoftLayer/softlayer-python
SummaryA library for SoftLayer's API
upload_time2024-08-16 20:33:32
maintainerNone
docs_urlNone
authorSoftLayer, Inc., an IBM Company
requires_python>=3.7
licenseMIT
keywords softlayer cloud slcli ibmcloud
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SoftLayer API Python Client
===========================
.. image:: https://github.com/softlayer/softlayer-python/workflows/Tests/badge.svg
    :target: https://github.com/softlayer/softlayer-python/actions?query=workflow%3ATests
.. image:: https://github.com/softlayer/softlayer-python/workflows/documentation/badge.svg
    :target: https://github.com/softlayer/softlayer-python/actions?query=workflow%3Adocumentation
.. image:: https://badge.fury.io/py/SoftLayer.svg
    :target: http://badge.fury.io/py/SoftLayer
.. image:: https://coveralls.io/repos/github/softlayer/softlayer-python/badge.svg?branch=master
    :target: https://coveralls.io/github/softlayer/softlayer-python?branch=master
.. image:: https://snapcraft.io//slcli/badge.svg
    :target: https://snapcraft.io/slcli


This library provides a simple Python client to interact with `SoftLayer's
XML-RPC API <https://softlayer.github.io/reference/softlayerapi>`_.

A command-line interface is also included and can be used to manage various
SoftLayer products and services.


Documentation
-------------
Documentation for the Python client is available at `Read the Docs <https://softlayer-python.readthedocs.io/en/latest/index.html>`_ .

Additional API documentation can be found on the SoftLayer Development Network:

* `SoftLayer API reference
  <https://sldn.softlayer.com/reference/softlayerapi>`_
* `Object mask information and examples
  <https://sldn.softlayer.com/article/object-masks>`_
* `Code Examples
  <https://sldn.softlayer.com/python/>`_

Installation
------------
Install via pip:

.. code-block:: bash

	$ pip install softlayer


Or you can install from source. Download source and run:

.. code-block:: bash

	$ python setup.py install

Another (safer) method of installation is to use the published snap. Snaps are available for any Linux OS running snapd, the service that runs and manage snaps. Snaps are "auto-updating" packages and will not disrupt the current versions of libraries and software packages on your Linux-based system. To learn more, please visit: https://snapcraft.io/ 

To install the slcli snap:

.. code-block:: bash

	$ sudo snap install slcli 
	
	(or to get the latest release)
	
	$ sudo snap install slcli --edge
	
	


The most up-to-date version of this library can be found on the SoftLayer
GitHub public repositories at http://github.com/softlayer. For questions regarding the use of this library please post to Stack Overflow at https://stackoverflow.com/ and  your posts with “SoftLayer” so our team can easily find your post. To report a bug with this library please create an Issue on github.

InsecurePlatformWarning Notice
------------------------------
This library relies on the `requests <http://docs.python-requests.org/>`_ library to make HTTP requests. On Python versions below Python 2.7.9, requests has started emitting a security warning (InsecurePlatformWarning) due to insecurities with creating SSL connections. To resolve this, upgrade to Python 2.7.9+ or follow the instructions here: http://stackoverflow.com/a/29099439.

Basic Usage
-----------

- `The Complete Command Directory <https://softlayer-python.readthedocs.io/en/latest/cli_directory/>`_

Advanced Usage
--------------

You can automatically set some parameters via environment variables with by using the SLCLI prefix. For example

.. code-block:: bash

  $ export SLCLI_VERBOSE=3
  $ export SLCLI_FORMAT=json
  $ slcli vs list

is equivalent to 

.. code-block:: bash

  $ slcli -vvv --format=json vs list


Getting Help
------------
Bugs and feature requests about this library should have a `GitHub issue <https://github.com/softlayer/softlayer-python/issues>`_ opened about them. 

Issues with the Softlayer API itself should be addressed by opening a ticket.


Examples
--------

A curated list of examples on how to use this library can be found at `SLDN <https://softlayer.github.io/python/>`_

Development
-----------
To get started working with this project please read the `CONTRIBUTING <https://github.com/softlayer/softlayer-python/blob/master/CONTRIBUTING.md>`_ document.

You can quickly test local changes by running the './slcli' file, which will load the local softlayer-python code instead of the system's softlayer-python codebase.

Debugging
---------
To get the exact API call that this library makes, you can do the following.

For the CLI, just use the -vvv option. If you are using the REST endpoint, this will print out a curl command that you can use, if using XML, this will print the minimal python code to make the request without the softlayer library.

.. code-block:: bash

  $ slcli -vvv vs list


If you are using the library directly in python, you can do something like this.

.. code-block:: python

  import SoftLayer
  import logging

  class invoices():

      def __init__(self):
          self.client = SoftLayer.Client()
          debugger = SoftLayer.DebugTransport(self.client.transport)
          self.client.transport = debugger

      def main(self):
          mask = "mask[id]"
          account = self.client.call('Account', 'getObject', mask=mask);
          print("AccountID: %s" % account['id'])

      def debug(self):
          for call in self.client.transport.get_last_calls():
              print(self.client.transport.print_reproduceable(call))

  if __name__ == "__main__":
      main = example()
      main.main()
      main.debug()



System Requirements
-------------------
* Python 3.8, 3.9, or 3.10.
* A valid SoftLayer API username and key.
* A connection to SoftLayer's private network is required to use
  our private network API endpoints.

Python 3.6 Support
------------------
As of version 6.0.0 SoftLayer-Python will no longer support python3.6, which is `End of Life as of 2022 <https://endoflife.date/python>`_.
If you cannot install python 3.8+ for some reason, you will need to use a version of softlayer-python <= 6.0.0

Python 2.7 Support
------------------
As of version 5.8.0 SoftLayer-Python will no longer support python2.7, which is `End Of Life as of 2020 <https://www.python.org/dev/peps/pep-0373/>`_ .
If you cannot install python 3.6+ for some reason, you will need to use a version of softlayer-python <= 5.7.2



Python Packages
---------------
* prettytable >= 2.5.0
* click >= 8.0.4
* requests >= 2.32.2
* prompt_toolkit >= 2
* pygments >= 2.0.0
* urllib3 >= 1.24
* rich == 12.3.0

*NOTE* If `ptable` (not prettytable) is installed, this will cause issues rendering tables.

Copyright
---------
This software is Copyright (c) 2016-2021 SoftLayer Technologies, Inc.

See the bundled LICENSE file for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SoftLayer/softlayer-python",
    "name": "SoftLayer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "softlayer, cloud, slcli, ibmcloud",
    "author": "SoftLayer, Inc., an IBM Company",
    "author_email": "SLDNDeveloperRelations@wwpdl.vnet.ibm.com",
    "download_url": "https://files.pythonhosted.org/packages/e4/47/fd4fd2aa94b25b29574fb451a41f7612e38ce355c000252525720400ec21/softlayer-6.2.5.tar.gz",
    "platform": null,
    "description": "SoftLayer API Python Client\n===========================\n.. image:: https://github.com/softlayer/softlayer-python/workflows/Tests/badge.svg\n    :target: https://github.com/softlayer/softlayer-python/actions?query=workflow%3ATests\n.. image:: https://github.com/softlayer/softlayer-python/workflows/documentation/badge.svg\n    :target: https://github.com/softlayer/softlayer-python/actions?query=workflow%3Adocumentation\n.. image:: https://badge.fury.io/py/SoftLayer.svg\n    :target: http://badge.fury.io/py/SoftLayer\n.. image:: https://coveralls.io/repos/github/softlayer/softlayer-python/badge.svg?branch=master\n    :target: https://coveralls.io/github/softlayer/softlayer-python?branch=master\n.. image:: https://snapcraft.io//slcli/badge.svg\n    :target: https://snapcraft.io/slcli\n\n\nThis library provides a simple Python client to interact with `SoftLayer's\nXML-RPC API <https://softlayer.github.io/reference/softlayerapi>`_.\n\nA command-line interface is also included and can be used to manage various\nSoftLayer products and services.\n\n\nDocumentation\n-------------\nDocumentation for the Python client is available at `Read the Docs <https://softlayer-python.readthedocs.io/en/latest/index.html>`_ .\n\nAdditional API documentation can be found on the SoftLayer Development Network:\n\n* `SoftLayer API reference\n  <https://sldn.softlayer.com/reference/softlayerapi>`_\n* `Object mask information and examples\n  <https://sldn.softlayer.com/article/object-masks>`_\n* `Code Examples\n  <https://sldn.softlayer.com/python/>`_\n\nInstallation\n------------\nInstall via pip:\n\n.. code-block:: bash\n\n\t$ pip install softlayer\n\n\nOr you can install from source. Download source and run:\n\n.. code-block:: bash\n\n\t$ python setup.py install\n\nAnother (safer) method of installation is to use the published snap. Snaps are available for any Linux OS running snapd, the service that runs and manage snaps. Snaps are \"auto-updating\" packages and will not disrupt the current versions of libraries and software packages on your Linux-based system. To learn more, please visit: https://snapcraft.io/ \n\nTo install the slcli snap:\n\n.. code-block:: bash\n\n\t$ sudo snap install slcli \n\t\n\t(or to get the latest release)\n\t\n\t$ sudo snap install slcli --edge\n\t\n\t\n\n\nThe most up-to-date version of this library can be found on the SoftLayer\nGitHub public repositories at http://github.com/softlayer. For questions regarding the use of this library please post to Stack Overflow at https://stackoverflow.com/ and  your posts with \u201cSoftLayer\u201d so our team can easily find your post. To report a bug with this library please create an Issue on github.\n\nInsecurePlatformWarning Notice\n------------------------------\nThis library relies on the `requests <http://docs.python-requests.org/>`_ library to make HTTP requests. On Python versions below Python 2.7.9, requests has started emitting a security warning (InsecurePlatformWarning) due to insecurities with creating SSL connections. To resolve this, upgrade to Python 2.7.9+ or follow the instructions here: http://stackoverflow.com/a/29099439.\n\nBasic Usage\n-----------\n\n- `The Complete Command Directory <https://softlayer-python.readthedocs.io/en/latest/cli_directory/>`_\n\nAdvanced Usage\n--------------\n\nYou can automatically set some parameters via environment variables with by using the SLCLI prefix. For example\n\n.. code-block:: bash\n\n  $ export SLCLI_VERBOSE=3\n  $ export SLCLI_FORMAT=json\n  $ slcli vs list\n\nis equivalent to \n\n.. code-block:: bash\n\n  $ slcli -vvv --format=json vs list\n\n\nGetting Help\n------------\nBugs and feature requests about this library should have a `GitHub issue <https://github.com/softlayer/softlayer-python/issues>`_ opened about them. \n\nIssues with the Softlayer API itself should be addressed by opening a ticket.\n\n\nExamples\n--------\n\nA curated list of examples on how to use this library can be found at `SLDN <https://softlayer.github.io/python/>`_\n\nDevelopment\n-----------\nTo get started working with this project please read the `CONTRIBUTING <https://github.com/softlayer/softlayer-python/blob/master/CONTRIBUTING.md>`_ document.\n\nYou can quickly test local changes by running the './slcli' file, which will load the local softlayer-python code instead of the system's softlayer-python codebase.\n\nDebugging\n---------\nTo get the exact API call that this library makes, you can do the following.\n\nFor the CLI, just use the -vvv option. If you are using the REST endpoint, this will print out a curl command that you can use, if using XML, this will print the minimal python code to make the request without the softlayer library.\n\n.. code-block:: bash\n\n  $ slcli -vvv vs list\n\n\nIf you are using the library directly in python, you can do something like this.\n\n.. code-block:: python\n\n  import SoftLayer\n  import logging\n\n  class invoices():\n\n      def __init__(self):\n          self.client = SoftLayer.Client()\n          debugger = SoftLayer.DebugTransport(self.client.transport)\n          self.client.transport = debugger\n\n      def main(self):\n          mask = \"mask[id]\"\n          account = self.client.call('Account', 'getObject', mask=mask);\n          print(\"AccountID: %s\" % account['id'])\n\n      def debug(self):\n          for call in self.client.transport.get_last_calls():\n              print(self.client.transport.print_reproduceable(call))\n\n  if __name__ == \"__main__\":\n      main = example()\n      main.main()\n      main.debug()\n\n\n\nSystem Requirements\n-------------------\n* Python 3.8, 3.9, or 3.10.\n* A valid SoftLayer API username and key.\n* A connection to SoftLayer's private network is required to use\n  our private network API endpoints.\n\nPython 3.6 Support\n------------------\nAs of version 6.0.0 SoftLayer-Python will no longer support python3.6, which is `End of Life as of 2022 <https://endoflife.date/python>`_.\nIf you cannot install python 3.8+ for some reason, you will need to use a version of softlayer-python <= 6.0.0\n\nPython 2.7 Support\n------------------\nAs of version 5.8.0 SoftLayer-Python will no longer support python2.7, which is `End Of Life as of 2020 <https://www.python.org/dev/peps/pep-0373/>`_ .\nIf you cannot install python 3.6+ for some reason, you will need to use a version of softlayer-python <= 5.7.2\n\n\n\nPython Packages\n---------------\n* prettytable >= 2.5.0\n* click >= 8.0.4\n* requests >= 2.32.2\n* prompt_toolkit >= 2\n* pygments >= 2.0.0\n* urllib3 >= 1.24\n* rich == 12.3.0\n\n*NOTE* If `ptable` (not prettytable) is installed, this will cause issues rendering tables.\n\nCopyright\n---------\nThis software is Copyright (c) 2016-2021 SoftLayer Technologies, Inc.\n\nSee the bundled LICENSE file for more information.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A library for SoftLayer's API",
    "version": "6.2.5",
    "project_urls": {
        "Homepage": "https://github.com/SoftLayer/softlayer-python"
    },
    "split_keywords": [
        "softlayer",
        " cloud",
        " slcli",
        " ibmcloud"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0342e98cb09821a010ce842546d4ed30927053cab3a9a3721d55791bd09a1654",
                "md5": "9a68993ddf4140f7baec01920a005f43",
                "sha256": "7d1ae241d7488ba80d5ef0ca1ed6d8f1782a2b08f0bc44aa4288de20524df412"
            },
            "downloads": -1,
            "filename": "SoftLayer-6.2.5-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9a68993ddf4140f7baec01920a005f43",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 754902,
            "upload_time": "2024-08-16T20:33:29",
            "upload_time_iso_8601": "2024-08-16T20:33:29.770867Z",
            "url": "https://files.pythonhosted.org/packages/03/42/e98cb09821a010ce842546d4ed30927053cab3a9a3721d55791bd09a1654/SoftLayer-6.2.5-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e447fd4fd2aa94b25b29574fb451a41f7612e38ce355c000252525720400ec21",
                "md5": "8e48718c2f86d3936d60e7eebfe33be3",
                "sha256": "7dd92d93c05b354125f1eb26f7475d7f72fb05dbbc5a3df8a16c8d2f063c126b"
            },
            "downloads": -1,
            "filename": "softlayer-6.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "8e48718c2f86d3936d60e7eebfe33be3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 499406,
            "upload_time": "2024-08-16T20:33:32",
            "upload_time_iso_8601": "2024-08-16T20:33:32.014982Z",
            "url": "https://files.pythonhosted.org/packages/e4/47/fd4fd2aa94b25b29574fb451a41f7612e38ce355c000252525720400ec21/softlayer-6.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-16 20:33:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SoftLayer",
    "github_project": "softlayer-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "softlayer"
}
        
Elapsed time: 0.76531s