Skip to main content

Python bindings for the XML Security Library

Project description

https://img.shields.io/pypi/v/xmlsec.svg?logo=python&logoColor=white https://img.shields.io/travis/com/mehcode/python-xmlsec/master.svg?logo=travis&logoColor=white&label=Travis%20CI https://img.shields.io/appveyor/ci/hoefling/xmlsec/master.svg?logo=appveyor&logoColor=white&label=AppVeyor https://github.com/mehcode/python-xmlsec/workflows/manylinux2010/badge.svg https://github.com/mehcode/python-xmlsec/workflows/MacOS/badge.svg https://github.com/mehcode/python-xmlsec/workflows/linuxbrew/badge.svg https://codecov.io/gh/mehcode/python-xmlsec/branch/master/graph/badge.svg Documentation Status

Python bindings for the XML Security Library.

Documentation

A documentation for xmlsec can be found at xmlsec.readthedocs.io.

Usage

Check the examples section in the documentation to see various examples of signing and verifying using the library.

Requirements

  • libxml2 >= 2.9.1

  • libxmlsec1 >= 1.2.18

Install

xmlsec is available on PyPI:

pip install xmlsec

Depending on your OS, you may need to install the required native libraries first:

Linux (Debian)

apt-get install pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl

Note: There is no required version of LibXML2 for Ubuntu Precise, so you need to download and install it manually.

wget http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz
tar -xvf libxml2-2.9.1.tar.gz
cd libxml2-2.9.1
./configure && make && make install

Linux (CentOS)

yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel

Linux (Fedora)

dnf install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel

Mac

brew install libxml2 libxmlsec1 pkg-config

Alpine

apk add build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec

Troubleshooting

Mac

If you get any fatal errors about missing .h files, update your C_INCLUDE_PATH environment variable to include the appropriate files from the libxml2 and libxmlsec1 libraries.

Windows

Starting with 1.3.7, prebuilt wheels are available for Windows, so running pip install xmlsec should suffice. If you want to build from source:

  1. Configure build environment, see wiki.python.org for more details.

  2. Install from source dist:

    pip install xmlsec --no-binary=xmlsec

Building from source

  1. Clone the xmlsec source code repository to your local computer.

    git clone https://github.com/mehcode/python-xmlsec.git
  2. Change into the python-xmlsec root directory.

    cd /path/to/xmlsec
  3. Install the project and all its dependencies using pip.

    pip install .

Contributing

Setting up your environment

  1. Follow steps 1 and 2 of the manual installation instructions.

  2. Initialize a virtual environment to develop in. This is done so as to ensure every contributor is working with close-to-identicial versions of packages.

    mkvirtualenv xmlsec

    The mkvirtualenv command is available from virtualenvwrapper package which can be installed by following link.

  3. Activate the created virtual environment:

    workon xmlsec
  4. Install xmlsec in development mode with testing enabled. This will download all dependencies required for running the unit tests.

    pip install -r requirements-test.txt
    pip install -e "."

Running the test suite

  1. Set up your environment.

  2. Run the unit tests.

    pytest tests
  3. Tests configuration

    Env variable PYXMLSEC_TEST_ITERATIONS specifies number of test iterations to detect memory leaks.

Reporting an issue

Please attach the output of following information:

  • version of xmlsec

  • version of libxmlsec1

  • version of libxml2

  • output from the command

    pkg-config --cflags xmlsec1

License

Unless otherwise noted, all files contained within this project are licensed under the MIT opensource license. See the included LICENSE file or visit opensource.org for more information.

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

xmlsec-1.3.12.tar.gz (64.2 kB view details)

Uploaded Source

Built Distributions

xmlsec-1.3.12-cp39-cp39-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

xmlsec-1.3.12-cp39-cp39-win32.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86

xmlsec-1.3.12-cp38-cp38-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

xmlsec-1.3.12-cp38-cp38-win32.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86

xmlsec-1.3.12-cp37-cp37m-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.7m Windows x86-64

xmlsec-1.3.12-cp37-cp37m-win32.whl (1.6 MB view details)

Uploaded CPython 3.7m Windows x86

xmlsec-1.3.12-cp36-cp36m-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.6m Windows x86-64

xmlsec-1.3.12-cp36-cp36m-win32.whl (1.6 MB view details)

Uploaded CPython 3.6m Windows x86

xmlsec-1.3.12-cp35-cp35m-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.5m Windows x86-64

xmlsec-1.3.12-cp35-cp35m-win32.whl (1.6 MB view details)

Uploaded CPython 3.5m Windows x86

File details

Details for the file xmlsec-1.3.12.tar.gz.

File metadata

  • Download URL: xmlsec-1.3.12.tar.gz
  • Upload date:
  • Size: 64.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for xmlsec-1.3.12.tar.gz
Algorithm Hash digest
SHA256 2c86ac6ce570c9e04f04da0cd5e7d3db346e4b5b1d006311606368f17c756ef9
MD5 a10c1d1b64d7001547832ac74b2a235d
BLAKE2b-256 70d783ac0d43bb92333c8ba3d9be97b85d1b2856ff9f32cebfc87b0e733339cc

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for xmlsec-1.3.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e4783f7814aa2a3e318385cce8ef87c82954b9a59535a48f67da4e2c21c08ce1
MD5 b9edb97b8801752ff38350ac7eb91a20
BLAKE2b-256 5db56861c564906c67fc444db2be5a003119c83bb9556430d441845667efedce

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp39-cp39-win32.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp39-cp39-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for xmlsec-1.3.12-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 f32e54065f0404ceff71388daa7fa7df10e1fb800051dfe302d63abb0acf0020
MD5 cb1a6ee25132ecd9bff0a3f71ef0b72a
BLAKE2b-256 4711ac60b30a27a321af4625a3b9299c8f2afb0afc921856a964a547f7002b03

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.0

File hashes

Hashes for xmlsec-1.3.12-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 db3e18ca883c01bbe28c9f5197c66f676c9772cf2d85f667e6122fc4d0702225
MD5 c31810046a088e1a5ca204e34dc7944b
BLAKE2b-256 ccea9bde822a30f7f7de41ba9389fd4f71df27e7373fed9f4229870198b25ce7

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp38-cp38-win32.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp38-cp38-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.0

File hashes

Hashes for xmlsec-1.3.12-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 1b4377f6d37ad714ba95a227ef40fb54ba1b22ef5170ce04c330fe45ee6ad184
MD5 0af8446658caa665238c3b52e0d78315
BLAKE2b-256 7e4b657a7632f0bbe91a97586bc25ba5413f939e61395fa4ce653656e3292315

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.5

File hashes

Hashes for xmlsec-1.3.12-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4e5f565de311afa33aaee4724566e685f951afe301212b6cf82f98cf9d8a1749
MD5 40887f98e9cc8a4b9bbbbf41449de744
BLAKE2b-256 9be912b09c738498ed30ed44d3a6438a45d4f0ef199c3e019724666972ddf600

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp37-cp37m-win32.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.5

File hashes

Hashes for xmlsec-1.3.12-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 135724cdce60e6bbd072fca6f09a21f72e2cecc59eebb4eed7740c316ecabc7b
MD5 d3ceb6b82b3b90cbe249924dd1d6840f
BLAKE2b-256 b19b89fd041131bdbf67cdb3687739bbb017affded23c30f79f6068485c86a75

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.8

File hashes

Hashes for xmlsec-1.3.12-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f5d242b1a19a36078608f5d7f4d561c5ca55cac8061a323a071c06275267dc19
MD5 f88bd6ec7b86b2cc0811f00101085303
BLAKE2b-256 669ee170952371c19109fe43dc40efca244a8393d461ead71638b9eb82c877b3

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp36-cp36m-win32.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.8

File hashes

Hashes for xmlsec-1.3.12-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 ce9c681adbc87b4f06c2b16725d9b2edbdbd508117dae4288b5faf78c1406038
MD5 3af4113f46ce17b8a77afce03335432d
BLAKE2b-256 0c609e4edc2341ee947910f8ba29f666c13c02f8358230796f244d0ac2f53cf2

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.5.4

File hashes

Hashes for xmlsec-1.3.12-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 9a2b8a780093b0fe8cecae53a81a8cd9edd50c08980d374c5317c91f065042d9
MD5 a12eb5da37a2d1829f6832674ccd040a
BLAKE2b-256 d73e75b873833a607ad59d730f3ba067f4b5e13f94d8ab0c3a8d47d6b3f11c1e

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.12-cp35-cp35m-win32.whl.

File metadata

  • Download URL: xmlsec-1.3.12-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.5.4

File hashes

Hashes for xmlsec-1.3.12-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 d22da4d3dcc559fb2e54e782f39c9ddad5f8d5b356f86a79bbb80b0a45115c97
MD5 c607354fc8004c2025e718ba3e1727f9
BLAKE2b-256 821d54c7154b88fefaf6be30b240de1adcab20e9fc907976e4f139127ff9e095

See more details on using hashes here.

Supported by

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