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.3.0.tar.gz (70.9 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.3.0-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdmv_http_client-2.3.0.tar.gz
  • Upload date:
  • Size: 70.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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.3.0.tar.gz
Algorithm Hash digest
SHA256 6278740e9154c98b562e1b4857d9b555f7aa22e05b47e7fa8860c46d9d70a6fe
MD5 75243c75db9b9e21cea7ed11c27ab90a
BLAKE2b-256 85a02a67e9cf8b5de2aa74c0d7b2f55b390b717546ca9aecaf140db449371a34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdmv_http_client-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 30.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15bb130168f51c6600adaab320f5cab2b9ba658022dca8a32ceeb84cae1df21e
MD5 dfe167097441ccaed0c8f2be1afbad3f
BLAKE2b-256 299805dfa7041ad1be7764382c73fc45ce4420503dd5fd2a46bf3f6d53be5cc6

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