Skip to main content

a python client library for easy leaseweb api access

Project description

[![Actions Status](](

Python module to talk to LeaseWeb’s API.

For more information refer to the documentation available at []


Install the module using pip

pip install lswapi


The lswapi.get_leaseweb_api function creates an instance of the LeaseWeb Api object with the X-Lsw-Auth key. You can provide the api key as an argument to get_leaseweb_api

$ python >>> import lswapi >>> client = lswapi.get_leaseweb_api(api_key=”xxxx-xxx-xxxxxx”) >>> response = client.get(“/bareMetals/v2/servers”) >>> servers = response.json()

or as an environment variable LSW_API_KEY

$ LSW_API_KEY=xxxx-xxxx-xxxxx python >>> import lswapi >>> client = lswapi.get_leaseweb_api() >>> response = client.get(“/bareMetals/v2/servers”) >>> servers = response.json()


  1. Fork it

  2. Create your feature branch (git checkout -b my-new-feature)

  3. Commit your changes (git commit -am ‘Add some feature’)

  4. Make sure that tests pass (make test)

  5. Push to the branch (git push origin my-new-feature)

  6. Create new Pull Request

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lswapi-0.4.3.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

lswapi-0.4.3-py2.py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page