Skip to main content

python sdk for Glance API

Project description

stare

GitHub Actions Status

The python wrapper for the Glance API.

CLI Usage

Use stare --help for the various options provided.

Python Usage

import stare
client = stare.Glance()

# list of analyses as dict
analyses = client.analyses['analyses']
# list of papers as dict
papers = client.papers['papers']

SSL

In order to get SSL handshakes working (certificate verification), one needs to make sure we add/trust the CERN Certification Authorities (CA) for both the Root and the Grid CAs. Specifically, we rely on the Root CA to sign/issue the Grid CA. The Grid CA is what's relied on for the SSL chain. To make this happen, we'll need both PEM for each CA combined into a single CERN_chain.pem file which is bundled up with this package.

Going to the CERN CA Files website and downloading the CERN Root Certification Authority 2 (DER file) and CERN Grid Certification Authority (PEM file). We can then convert the DER to PEM as follows (for the Root CA):

openssl x509 -in CERN_ROOT_CA_2.crt -inform der -outform pem -out CERN_ROOT_CA_2.pem

and then combine the two

cat CERN_GRID_CA_2.pem CERN_ROOT_CA_2.pem > CERN_chain.pem

This can be passed into any python requests::Session via verify='/path/to/CERN_chain.pem' and SSL verification should work.

[1] DER vs PEM?

Reference

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

stare-0.0.11.tar.gz (287.0 kB view details)

Uploaded Source

Built Distribution

stare-0.0.11-py2.py3-none-any.whl (18.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file stare-0.0.11.tar.gz.

File metadata

  • Download URL: stare-0.0.11.tar.gz
  • Upload date:
  • Size: 287.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for stare-0.0.11.tar.gz
Algorithm Hash digest
SHA256 d1fb16eb64483ef99a008eb620c3428440f881f0b7d6703a865d7166b8a3d12b
MD5 4b6ec8f26987c9b3219bbb7c3528ec31
BLAKE2b-256 4830b7879c8fa26c8d9b33977abb52ba56b95ebcb9ab5620819cdaad1081bb84

See more details on using hashes here.

File details

Details for the file stare-0.0.11-py2.py3-none-any.whl.

File metadata

  • Download URL: stare-0.0.11-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for stare-0.0.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d1e07e973b65e37d05fc46591f0ce427f843e2364eb27800546756f115a541c9
MD5 1abcb0dd8c902cc78772932a67a44b6d
BLAKE2b-256 7c8cd76aeb5740c3adcd25c97ef268ffb931c42a91964a741bb471fd28840658

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