Skip to main content

Wrapper/SDK for Cisco Glass Apps

Project description

CiscoGlass Python SDK

This is a python library to help simplify the process of building python apps for Cisco Glass.

This provides an interface which abstracts away most of the repetitive code needed.

Here is a sample below:

from ciscoglass import GlassApp
import requests
import time


class SampleRequest(GlassApp):
    def run(self):

        endpoint = self.get_devices("TEST")[0]
        resp = requests.get(f"https://{endpoint.host}/json", auth=(endpoint.username, endpoint.password))
        with self.file("log.txt", 'w') as f:
            f.writelines([
                f"Log Time: {time.strftime('%Y%m%d-%H%M%S')}\n",
                resp.text + '\n'
            ])
            print("Ran successfully, please check the log for more details!")


if __name__ == "__main__":
    SampleRequest().run()

It provides a robust file access method which has functionality such as copy on write if in case you want to modify an input file, without you manually having to copy the files to output location.

Also, there is no need to remember the locations of input/output files, calling the API for device list, etc.

Further, it has a CLI interface to get you started with a default template for an app, including the Dockerfile and a sample JSON spec created for you. You can run the command as such:

python -m ciscoglass --help
python -m ciscoglass create my_first_glass_app

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

ciscoglass-0.1.5.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

ciscoglass-0.1.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file ciscoglass-0.1.5.tar.gz.

File metadata

  • Download URL: ciscoglass-0.1.5.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0

File hashes

Hashes for ciscoglass-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ee0686e285b0cd7d00a6c45bfcf960225355dc5d605495a6d5ecaa54c0cf3c75
MD5 ebbb884b18deb031449670a32c461f66
BLAKE2b-256 ffcf37cf7114525c94d397964de59946c9d2c6dc03f13987e069b00ffe18cff7

See more details on using hashes here.

File details

Details for the file ciscoglass-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: ciscoglass-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0

File hashes

Hashes for ciscoglass-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 89003498b564d17ae1743ef419700632e5ed26aa2d58d62a96ab9d0faa33d946
MD5 b643944408b82aae8c9b84c1f020204d
BLAKE2b-256 f0dc6f716d6c7a32694c8350dbbf9cff13742adb035b23299147701f5a281337

See more details on using hashes here.

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