python sdk for Glance API
The python wrapper for the Glance API.
See stare/settings/base.py for all environment variables that can be set. All environment variables for this package are prefixed with
STARE. As of now, there are:
STARE_USERNAME: CERN account username
STARE_PASSWORD: CERN account password
STARE_AUTH_URL: authentication server
STARE_SITE_URL: API server
STARE_CASSETTE_LIBRARY_DIR: for tests, where to store recorded requests/responses
stare --help for the various options provided.
import stare glance = stare.Glance() # get publication information of a publication pub_info = glance.publication('HDBS-2018-33') # get publications for a given activity/reference code (see table below) pubs = glance.publications(activity_id=26, reference_code='HIGG')
Activity IDs are currently in a different API project (under SCAB Nominations) which SUSY conveners have access to. For now, this is a partial list to make it easier.
|38||CDM||Common Dark Matter|
|39||TGSK||3rd generation squarks|
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
verify='/path/to/CERN_chain.pem' and SSL verification should work.
 DER vs PEM?
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size stare-0.1.2-py2.py3-none-any.whl (17.0 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size stare-0.1.2.tar.gz (30.2 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for stare-0.1.2-py2.py3-none-any.whl