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://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 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.10.tar.gz (62.3 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

File details

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

File metadata

  • Download URL: xmlsec-1.3.10.tar.gz
  • Upload date:
  • Size: 62.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for xmlsec-1.3.10.tar.gz
Algorithm Hash digest
SHA256 52eded125c0d1ab72125105ef061370c6b06ab9bd37e29a61bc2f8a61205bae4
MD5 1c65436ad9864abb5a99f58be78f341f
BLAKE2b-256 caa00b6f01fa1f138276e776dc31f1627be795a93e2722066db037444d956ee0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for xmlsec-1.3.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 be0f475edd8e9c98f57449c97839f6a81946e79e4cccb81e4b5196a2cc40e044
MD5 f26bab4f10d0435c1181bce9b563c2eb
BLAKE2b-256 cf51640d4bab6802e1fefa57aab6a4b3a05e5b07531e62cfef213b37e15fc388

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for xmlsec-1.3.10-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 72af9a5a747a5fe6e425d2be10daa43d18307dbe03498df3820fc3cd93daa148
MD5 d4b7639fce4e9c38f03b8b34fe36e84f
BLAKE2b-256 a8ad1433a5c0be4956cd935cf57d75a5ed244f9e8c84385f1431674882de93ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for xmlsec-1.3.10-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2bc1b871b49d6580779805a4a1c2d835e834a2fa614fe40cf71931d11a8279cf
MD5 e753d46f378914d36d2c75c6a054b16c
BLAKE2b-256 1a1c174bbd85df0ada946ae7bba8f7e96c1536768d1c3e16740e74cbf9107a95

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for xmlsec-1.3.10-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 8746dd992aaec06ed8ff1615f4a8e2a32258e8af38f9a9f8acf3ee1fb34a5da6
MD5 0c502d9a013ad38462781cb289fd064b
BLAKE2b-256 deb7b5656080c4c6b3ebd23ec9e3a461be5671cc03032f259efd3559b48fdf94

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.5

File hashes

Hashes for xmlsec-1.3.10-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 806855d505da24aeb77758a6f373b1473e5ed63bdbe346af90cc6d2b053e4716
MD5 8b241694706fb8db9519b0ab418b77c7
BLAKE2b-256 ce883a89d3633e19baae873d74f0a6bed8e4d56f71871823158018f9503ddefb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.5

File hashes

Hashes for xmlsec-1.3.10-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 9d52b2b15d42292725e4f9d8a5b040e39cba0a9cd58059ac951e7310d6340bb9
MD5 1596e0dbe4845e9c94e6ae1e702a044d
BLAKE2b-256 1eb8eb96267bc2a9a38741d76ece87ba471dc43a66619d7dc9b27e46a3d341c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for xmlsec-1.3.10-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 b380f3ebc042f71afab057632481d06e06f1ba4f90047d91ca92612a7d3d487b
MD5 633c756d53bfa0b42ab864c1dad067f5
BLAKE2b-256 37d9268b13cd06812e69a27543636e06bf598818a28710f3646eca74a243b5c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for xmlsec-1.3.10-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 fe6a5f05aba3ff47e105a308482b68f8b0fd80656eb1456a9c1e4de47d2c580f
MD5 494634189789c941000dcd6da22a4d17
BLAKE2b-256 c2f8092850ed266e926dec59df68e467fbd0ee60b6c17a9e7918cd99e366847c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.5.4

File hashes

Hashes for xmlsec-1.3.10-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 17d2e66d4e3e601d210eed936b53c3eb44cddaef62f60b5c6ad5c18e948d926c
MD5 952bd874b0f93a52df5ce01e15c7e9fb
BLAKE2b-256 9200d2ce83237399119640abcfdff956fe9d83917d8efc3180539d9355a28c93

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.10-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.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.5.4

File hashes

Hashes for xmlsec-1.3.10-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 bf3c62d154f2222caf56d897ddfd53fd0aef560d5a2202447d90e015301a0a10
MD5 92ae2f24065e25964973b4fff0b0cf18
BLAKE2b-256 1cb88fe550b2ca15394ec3fc4a5996ab44b6d5a2bc1123a9db88159a3d33f42b

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