Skip to main content

A HTTP client wrapper to handle authenticated requests to CERN internal applications

Project description

PdmV HTTP Client

This project provides an HTTP client based on requests to handle authenticated requests to CERN internal applications. Furthermore, it includes some clients to ease the interaction with the APIs of PdmV applications. This version is a refactor of the old McM Scripts project, and it is published at PyPI to be public available.

How to use this package

Prerequisite

Create an isolated virtual environment using a Python version >= 3.9 like, for instance:

python3.9 -m venv venv && source ./venv/bin/activate

Development version

If you want to set up a development environment to contribute to this project:

Install uv and the required dependencies.

pip install uv

Set the current venv to use with uv:

export UV_PROJECT_ENVIRONMENT="${VIRTUAL_ENV}"

Install the packages via: uv sync

Run the test suite via: uv run pytest -s -vv

[!IMPORTANT] Make sure your execution environment has a valid Kerberos ticket to consume CERN services!

Build package

If you just want to use this package in your own project, install it via:

pip install pdmv-http-client

Make sure to remove the sys.path.append(...) statement, if you have them in your script, to avoid overloading old versions from CERN AFS.

Examples

At the examples/ folder, you will find some scripts explaining how to use the clients and the HTTP client.

Priority change

  • If you want to use priority-changing scripts or do anything else related to cmsweb, you'll have to use voms-proxy:
    • voms-proxy-init -voms cms
    • export X509_USER_PROXY=$(voms-proxy-info --path)

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

pdmv_http_client-2.2.1.tar.gz (71.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdmv_http_client-2.2.1-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file pdmv_http_client-2.2.1.tar.gz.

File metadata

  • Download URL: pdmv_http_client-2.2.1.tar.gz
  • Upload date:
  • Size: 71.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pdmv_http_client-2.2.1.tar.gz
Algorithm Hash digest
SHA256 ef3439fc97a6ea07a921509419d8dac673f637bddeadff5143c3d3ff38292240
MD5 b8226ab3a4f640f6fdd2b799a1069661
BLAKE2b-256 6837adb686595758c8b67d2c44da537f4304817c724252d0bf84df2a0b39c444

See more details on using hashes here.

File details

Details for the file pdmv_http_client-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: pdmv_http_client-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pdmv_http_client-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 879b3de7a237cad0ef087a6fac56d17df5295a2a7c6b506ae0b1bc24d58fad63
MD5 8212ead6ab2818e9f83c7d6e7106e210
BLAKE2b-256 ff097e37a00fc5878e130189985ac8c45523980eb9bed7594f2adc3e7bab5a06

See more details on using hashes here.

Supported by

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