No project description provided
Project description
DBS3-Client
The Data Bookkeeping Service 3 (DBS 3) provides an improved event data catalog for Monte Carlo and recorded data of the CMS experiment. It provides the necessary information used for tracking datasets, for example the data processing history, files and runs associated with a given dataset, and much more.
DBS 3 has been completely re-designed and re-implemented in Python on the basis of a CherryPy based environment for developing RESTful (Representational State Transfer) web services, which is commonly used within the data management and workload management (DMWM) group of CMS. DBS 3 is using the Java Script Object Notation (JSON) dataformat for interchanging information and Oracle as database backend.
1. Install Python
In this first part we are going to install Python 3 and pip. We are going to follow the following tutorial in the next sections.
1.1 Installation of Python 3.8.2
We are going to install Python 3.6.5. Note : You can download any version higher that 3.6.0 instead.
mkdir ~/python
cd ~/python
wget https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz
tar zxfv Python-3.8.2.tgz
find ~/python -type d | xargs chmod 0755
cd Python-3.8.2
./configure --prefix=$HOME/python
If you get an "No acceptable C compiler found in $PATH" error while running the last command, it mean that python could not find gcc. Please then run the following command:
- Redhat base:
yum groupinstall "Development Tools"
- Debian base:
apt-get install build-essential
Solution found on stackoverflow. You will then be able to redo the previous command.
1.2 Installation of pip
Pypi (Python Package Index) is a repository of software for the Python programming language. In other word, Pypi is where most libraries are stored and updated. Anyone can download any library on Pypi and upload his own library. To get a library from Pypi we need pip. Two way to install pip. You can find the official tutorial here.
a. ensurepip
Python comes with an ensurepip
module, which can install pip in a Python environment.
- Linux/MacOS:
python -m ensurepip --upgrade
- Windows:
py -m ensurepip --upgrade
b. get-pip
This is a Python script that uses some bootstrapping logic to install pip.
- Download the script, from get-pip.py.
- Open a terminal/command prompt,
cd
to the folder containing theget-pip.py
file and run: -- Linux/MacOS:python get-pip.py
-- Windows:py get-pip.py
c. Changing pip version
If you already have an old version of pip3 or you need to change the version of your pip, You can run the next command (we are getting the 21.2.2 version in the next example):
export PATH=$HOME/python/bin:$PATH
pip3 install pip==21.2.2
1.3 Ensure python and pip are installed
To ensure that python and pip are installed we are going to run the which
command.
The following command:
which python
Should return:
~/python/Python-3.8.2/python
We are going to do the same thing for pip:
which pip
Which should return:
~/.local/bin/pip
We can also check their versions:
python --version
pip --version
Be sure to have a python version higher than 3.6.0 (version 3.8.2 is recommanded) and pip version higher than 21.0.0.
1.4 Download of libcurl
To use libcurl, is highly recommanded to use linux or MacOS. Dbs3-client use pycurl, which requires libcurl. We will see in this section how to get libcurl. Run the following command:
- Redhat base:
sudo yum install libcurl-devel
- Debian base:
sudo apt-get install libcurl-devel
1.5 Download DBS3-Client from pypi
You now have python3 and pip installed. You are finally able to download libraries from pypi. On pypi you will be able to find dbs3-client.
a. Download dbs3-client
As any library on pypi, you can download dbs3-client using the following command:
pip install dbs3-client
If you need a specific version of it, you can precise the version wanted like the following example (getting the 3.17.0 version of dbs3-client):
pip install dbs3-client==3.17.0
b. Dependencies
Dbs3-client have 2 python dependencies.
Dependency's name | Pypi link | version |
---|---|---|
dbs3-pycurl | dbs3-pycurl · PyPI | 3.17.0 |
pycurl | pycurl · PyPI | 7.19.3 |
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
Hashes for dbs3_client-3.17.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09ed91f2a9cdf6299b96f4754822e84da91ea1c41d66e5085fa84bdb06ba2812 |
|
MD5 | 86bccb0ef2c047cf03fec7b726dc6d10 |
|
BLAKE2b-256 | 26aaf1ddbf35dc69f345163701961629582056bf337142d7164374402869c35c |