Skip to main content

SoftLayer API Python Client

https://github.com/softlayer/softlayer-python/workflows/Tests/badge.svg https://github.com/softlayer/softlayer-python/workflows/documentation/badge.svg https://badge.fury.io/py/SoftLayer.svg https://coveralls.io/repos/github/softlayer/softlayer-python/badge.svg?branch=master https://snapcraft.io//slcli/badge.svg https://https://github.com/softlayer/softlayer-python/workflows/Snap%20Builds/badge.svg

This library provides a simple Python client to interact with SoftLayer’s XML-RPC API.

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 .

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

Installation

Install via pip:

$ pip install softlayer

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

$ 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:

$ 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 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

Advanced Usage

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

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

is equivalent to

$ slcli -vvv --format=json vs list

Getting Help

Bugs and feature requests about this library should have a GitHub issue 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

Development

To get started working with this project please read the CONTRIBUTING 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.

$ slcli -vvv vs list

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

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. 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 . 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

  • 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.

Metadata

Release files for SoftLayer 6.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SoftLayer 6.2.9
File Size Uploaded
softlayer-6.2.9.tar.gz 481.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SoftLayer 6.2.9
File Interpreter ABI Platform
softlayer-6.2.9-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 1.2 MB

Release files / softlayer-6.2.9.tar.gz

Download URL softlayer-6.2.9.tar.gz
Size 481.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e47537caa1e2b40062500c95b906e079a9f490bb3b5bfc841501eea4fa5a7148
BLAKE2b-256 checksum
How to use checksums
1e8883d1cb5768d1bb72b19664b99c025c7acd8a035504c2a1328af850db6a16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / softlayer-6.2.9-py2.py3-none-any.whl

Download URL softlayer-6.2.9-py2.py3-none-any.whl
Size 724.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ec3d39e57ac877af7b5f9df3ad31dafa7c040ffd6921b11037fe4eb23427d35a
BLAKE2b-256 checksum
How to use checksums
0367db1be195157d82f5ae60b1168baa0a50e41b03978678232837379b8f670a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

6.2.9 This release

2 release files

6.2.8

2 release files

6.2.7

2 release files

6.2.6

3 release files

6.2.5

2 release files

6.2.4

2 release files

6.2.3

2 release files

6.2.2

2 release files

6.2.1

2 release files

6.2.0

2 release files

6.1.11

2 release files

6.1.10

2 release files

6.1.9

2 release files

6.1.8

2 release files

6.1.7

2 release files

6.1.6

2 release files

6.1.5

2 release files

6.1.4

2 release files

6.1.3

2 release files

6.1.2

2 release files

6.1.1

2 release files

6.1.0

2 release files

6.0.2

2 release files

6.0.1

2 release files

6.0.0

2 release files

5.9.9

2 release files

5.9.8

2 release files

5.9.7

2 release files

5.9.6

2 release files

5.9.5

2 release files

5.9.4

2 release files

5.9.3

2 release files

5.9.2

2 release files

5.9.1

2 release files

5.9.0

2 release files

5.8.9

2 release files

5.8.8

2 release files

5.8.7

2 release files

5.8.5

2 release files

5.8.4

2 release files

5.8.3

2 release files

5.8.2

2 release files

5.8.1

2 release files

5.8.0

2 release files

5.7.2

2 release files

5.7.1

2 release files

5.7.0

2 release files

5.6.4

2 release files

5.6.3

2 release files

5.6.1

5.6.0

2 release files

5.5.3

2 release files

5.5.2

2 release files

5.5.1

2 release files

5.5.0

2 release files

5.4.4

2 release files

5.4.3

2 release files

5.4.2

2 release files

5.4.1

2 release files

5.4.0

2 release files

5.3.2

2 release files

5.3.1

2 release files

5.3.0

2 release files

5.2.15

2 release files

5.2.14

2 release files

5.2.10

2 release files

5.2.9

2 release files

5.2.8

2 release files

5.2.7

2 release files

5.2.6

2 release files

5.2.5

2 release files

5.2.4

2 release files

5.2.3

2 release files

5.2.1

2 release files

5.2.0

2 release files

5.1.0

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.2

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.3.1

1 release file

2.3.0

1 release file

2.2.0

1 release file

2.1.0

1 release file

2.0.0

1 release file

1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page