python sdk for Glance API
Project description
stare
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file stare-0.0.9.tar.gz
.
File metadata
- Download URL: stare-0.0.9.tar.gz
- Upload date:
- Size: 287.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ae3a8521cec91b51695e4f2f459332aff0141721658ca0764a31a56c17edc3d |
|
MD5 | d4d8b182bde958a11fd394cc5981d5ac |
|
BLAKE2b-256 | 03a26e66454124d6d6c3ed28b0e01bca2d805337c0e1589c7d4a68666d3a36d3 |
File details
Details for the file stare-0.0.9-py2.py3-none-any.whl
.
File metadata
- Download URL: stare-0.0.9-py2.py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0b701da2868e12d4b3a0604169d90dde1eaf3adc3ee53bc68052549d35d27e |
|
MD5 | 580090235d02f9aaa1eaee7753acd566 |
|
BLAKE2b-256 | 078d25c0d57a73c691687842dc2d83b7026a75b396b0c3f3cdff8883551b8450 |