Skip to main content

Manage the connection and communications to a PSquared server.

Project description

psquared_client project

The psquared_client project contains both the psquared_client package that provides a python interface to a PSqaured server, and the pp-cli command line interface that uses that package to all copmmand line access to the server.

pp-cli executable

More details about the pp-cli executable can be found using its help option

pp-cli -h

but here are some examples of retrieving information. (Note: unless you are using the default local PSquared server you will need to the the environmental variable PP_APPLICATION to point the server you want to use.)

  • To list the currently active configurations

    pp-cli
    
  • To list the known versions of a given configuration

    pp-cli -i <configuration>
    
  • To display the current state of one or more items for a configuration/version.

    pp-cli -i -V <version> <configuration> item ...
    
  • To display the history of one or more items for a configuration/version.

    pp-cli -H -V <version> <configuration> item ...
    
  • As an alternate, the list of items to be acted upon can be supplied in a file with one item per line. Thus the following displays the current state of a set of items listed in a file for a configuration/version.

    pp-cli -i -f <file> -V <version> <configuration>
    

Here are some examples of commands that affect the state of PSquared. (Note: you may need an authorized certificate to execute these types of commands.)

  • To submit one or more items for processing with a configuration/version.

    pp-cli -i -s -V <version> <configuration> item ...
    
  • To resolve the failure of one or more items for a configuration/version.

    pp-cli -i --resolve -V <version> <configuration> item ...
    

    The other transitions, submit, cancel, reset, 'abandonandrecover` have similar options.

psquared_client package

The psquared_client package provides the PSquared class that can be used to access a PSqaured server and a Display module that can display the responses of a PSquared server in a readable format.

PSquared class

The PSquared class provides various documents in reponse to a request to the PSquared server. The documents are in the form of a standard python ElementTree. Currently the following methods are supported.

  • get_application - returns the application document at the URL
  • get_configuration - returns the configuration document the named configuration
  • get_report - returns the requested report document
  • execute_submissions - submits a list of items for processing
  • execute_transitions - execute a transition for a list of items

Display module

The Display modules provides various methods for displaying the reponses that result from a request to the PSquared server. Currently the following methods are supported.

  • configurations - displays all the configurations contained in an application document
  • versions - displays all the versions of a named configuration
  • entry - displays the state of a given item
  • info - displays the states of a set of items contained in a report
  • histories - displays the history of one or more items contained in history document

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

psquared_client-3.0.1.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

psquared_client-3.0.1-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file psquared_client-3.0.1.tar.gz.

File metadata

  • Download URL: psquared_client-3.0.1.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for psquared_client-3.0.1.tar.gz
Algorithm Hash digest
SHA256 60ec5e1c5f8b6294b8c557b0cb42740591ad73373b97d9301b642d074a24b18a
MD5 0a14978a495a9d31c67914cedd94de28
BLAKE2b-256 c33252f55e20e53950dc94528db8826a33c0b455ccbe8c1c7ffa9691389af2b1

See more details on using hashes here.

File details

Details for the file psquared_client-3.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for psquared_client-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee1f85bbaec3631a998f2e418326d12c22735a78418c7032711d4f738e81df73
MD5 bb2cc97d99474debd2d9b9fc44451f4c
BLAKE2b-256 d968455f005dd5a05ce94c9b49cae2a1d7f66937e3de9d079b31b6a4f8ccff3c

See more details on using hashes here.

Supported by

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