Skip to main content

Landscape API (Python 3)

https://img.shields.io/pypi/v/landscape_api_py3.svg https://img.shields.io/travis/jurya/landscape_api_py3.svg https://github.com/JuryA/landscape_api_py3/workflows/Build%20tests/badge.svg Documentation Status FOSSA Status

Client for the Landscape API (Python 3)

Features

  • easy installation from PyPI (you can use pipenv, pip, pipex, Chocolatey, …)

  • working on Windows (pipx create landscape-api.exe shim)

  • working with Python>=v3.5 (easily from landscape_api_py3.base import API)

  • for quick use can be installed with pipx install landscape_api_py3

Quick start

Check if you have installed Python v3.5 and above.

To install Landscape API (Python 3), run this command in your terminal:

On Linux:

$ pip install landscape-api-py3
$ python -m landscape-api --uri https://your-uri-to-ls-api/api --key <your API key> --secret <your API secret> --json get-computers --limit 1

On Windows:

C:\> pip install landscape-api-py3
C:\> python -m landscape-api --uri https://your-uri-to-ls-api/api --key <your API key> --secret <your API secret> --json get-computers --limit 1

or you can use pipx (virtual environment will be created automatically):

On Linux:

$ pip install --user pipx
$ pipx ensurepath
$ exec $SHELL # Restart your shell to reload PATH
$ pipx install landscape-api-py3
$ landscape-api --uri https://your-uri-to-ls-api/api --key <your API key> --secret <your API secret> --json get-computers --limit 1

On Windows:

C:\> pip install --user pipx
C:\> pipx ensurepath
C:\> REM Restart console window to reload PATH
C:\> pipx install landscape-api-py3
C:\> landscape-api --uri https://your-uri-to-ls-api/api --key <your API key> --secret <your API secret> --json get-computers --limit 1

Known issues

  • none (issues with dependencies resolved in v0.3.0)

Credits

Based on package landscape-api from Canonical Ltd. This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

License

FOSSA Status

History

v0.7.1 (2021-01-27)

  • fixed documentation

v0.7.0 (2021-01-27)

  • fix #245: CreateScript endpoint raises exception (solution suggested and tested)

  • fix #246: CreateScriptAttachment endpoint raises exception (solution suggested and tested)

  • minor format change

  • add pyproject.toml

v0.6.1 (2020-06-17)

  • fix #19

  • minor updates

v0.5.0 (2020-06-11)

  • added support for Python 3.5, 3.6, 3.7, 3.8 and above

  • fixed minor bugs

  • updated documentation (Installation, Usage, Quick start)

v0.4.2 (2020-06-10)

  • fixed documentation import bug

  • fixed default CA cert bug

v0.4.1 (2020-06-10)

  • fixed bug with imports - now it’s compatible with Canonical landscape-api

v0.3.5 (2020-06-10)

  • minor fixes

v0.3.4 (2020-06-09)

  • replaced pycurl –> requests

v0.2.0alpha (2020-06-08) - First pre-release of landscape-api package

  • 🎉 first ALPHA non-production version release of landscape-api ported to Python v3.8

Known issues (v0.2.0alpha):

  • on Windows download CA certificate file from https://curl.haxx.se/ca/cacert.pem and use –ssl-ca-file or LANDSCAPE_API_SSL_CA_FILE (see Landscape API documentation here)

  • on Linux depends on gnutls and libssl (require pycurl package for installation)

Before installation of the package (v0.2.0alpha):

  • on Ubuntu 16.04 (Xenial Xerus) use sudo apt-get install -y libgnutls-dev

  • on Ubuntu 20.04 (Focal Fossa) use sudo apt-get install -y libgnutls28-dev libcurl4-openssl-dev libssl-dev

  • on Windows 10 simply use pipx install landscape_api_py3

0.1.3 (2020-06-07)

  • first release on PyPI

Metadata

Release files for landscape-api-py3 0.9.0

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

Source distribution (sdist)

Source distribution for landscape-api-py3 0.9.0
File Size Uploaded
landscape_api_py3-0.9.0.tar.gz 42.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for landscape-api-py3 0.9.0
File Interpreter ABI Platform
landscape_api_py3-0.9.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 79.2 kB

Release files / landscape_api_py3-0.9.0.tar.gz

Download URL landscape_api_py3-0.9.0.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
83c3947ecdf4482103e37f58ea99e5e8ff3bb4370f033082bf969deaea38c762
BLAKE2b-256 checksum
How to use checksums
5a0bdd81bad3d9dfba77e48c920230f332033248318ebd27e29383cd480e30da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / landscape_api_py3-0.9.0-py2.py3-none-any.whl

Download URL landscape_api_py3-0.9.0-py2.py3-none-any.whl
Size 36.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e55f7a08d3b5aca4ab0c6694ca74c0605c18fb44df8573e7a8df9e01d02d2033
BLAKE2b-256 checksum
How to use checksums
3d0299fcb4b5ca595520d4a8d2625cbd8e8d6968c63950c3ddc9f424a26b75c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.2.0

2 release files

0.1.3

2 release files

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