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.1.0.tar.gz (66.4 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.1.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdmv_http_client-2.1.0.tar.gz
  • Upload date:
  • Size: 66.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for pdmv_http_client-2.1.0.tar.gz
Algorithm Hash digest
SHA256 7281f984f294e80606daf32372dcd9d8c3026b8472bd1ed31f9a0af05e02ce56
MD5 24e168c8c97de1c625e54b783a30b021
BLAKE2b-256 9798688eca78ece52d64170b613834eaf8e0e00c7cb6ca34b36fe8258095e606

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pdmv_http_client-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07ede1a6bd86c347fe702b68a29e834cefca265964d88b1a27d0daefcc7b485a
MD5 e9672b4e2ea1d411edf84a4fcefaa513
BLAKE2b-256 fd2b7a26e1dfe1fa7060e105511675c1c33c097680c509101e06d09ea33e6ef8

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