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.9.tar.gz (62.6 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

xmlsec-1.3.9-cp27-cp27m-win_amd64.whl (1.9 MB view details)

Uploaded CPython 2.7m Windows x86-64

xmlsec-1.3.9-cp27-cp27m-win32.whl (1.6 MB view details)

Uploaded CPython 2.7m Windows x86

File details

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

File metadata

  • Download URL: xmlsec-1.3.9.tar.gz
  • Upload date:
  • Size: 62.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for xmlsec-1.3.9.tar.gz
Algorithm Hash digest
SHA256 3d13d7b6cb921dbc4d60d00ad00081a038df73a1e69f5bcc3695deb1bf2093b0
MD5 70a0f0019383f442c163f828012556b4
BLAKE2b-256 4761b466ff0c8aa87ff033de8349d5f56d44336b67a77c092d3162a5f9e35ee8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for xmlsec-1.3.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6d9d46d1f6b4985023469a1e334cb35c7c8fc6bd9d8b65ca52b923a7a6869c2a
MD5 21ec024a3b7868b55a2f286e793debf1
BLAKE2b-256 27abf029421fc324a425e67d01674d415bbc85db7beaa85ba0ad8d529f4a73fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for xmlsec-1.3.9-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 8a7ffdc4f7f760253aa4dd8d2037358eb33915ca1dcf1c2422b19fcf0ab68506
MD5 2f6830d5cc760d6d9f0a7910ebf7eb2d
BLAKE2b-256 57e6f126c7c5bf46f9ea9819fee91ced4d04e2774b882f9f0bb59bbe8490808f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0

File hashes

Hashes for xmlsec-1.3.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 61076be98da4c7cf842a78aa3f129a5039f2ba4992e02480eefe78028d317698
MD5 2a2bc43a709b06616800bbcb49c8c489
BLAKE2b-256 ca21f1c9db6a4ca4788dc5d8de26a700ecb9bc9b7b3caa40b1c1a72afd9c0540

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0

File hashes

Hashes for xmlsec-1.3.9-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 252f79ed4482d6eefcca62c3bfc99b8d95c07abd846262d854a207ec4d67fac5
MD5 07e74a14881ea9d4fd9c6e29097fb720
BLAKE2b-256 7b566c5ee2d02ec9ec2310a3cf551c84feb417a202b2a916941763e818f2ae26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.5

File hashes

Hashes for xmlsec-1.3.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6d8bb24c3a4db398011f394e29b58cd34c9c26d76b772c5d418d8579df127234
MD5 ae9a7f0681a3a114b7ead65183f46822
BLAKE2b-256 87087ac84bdf151facf6353b8f87c2e573243269e2f1523bf3e1e3c2954c018b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.5

File hashes

Hashes for xmlsec-1.3.9-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 69d7f965d6b74b3266f7baa99a0377d9c76acbf26c615b4ee8d2cbe17bf85528
MD5 f11f42f42dd702c88ab6353f529c4b65
BLAKE2b-256 47cb81c60bacb0bddcc13eff29bf52f5f9a37ec5489ee407489a1e243e9d3c47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.8

File hashes

Hashes for xmlsec-1.3.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 dcaa084c3700f775eba09d81a1432444f82d9ad6270320c56c1a733d71cceb3a
MD5 fd90975b61556bc35901c6c90ed42c6e
BLAKE2b-256 f08f9f3ea54cb89e4d1882986f51b204900059f7e7132e8eeaa0af80ad3c2159

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.8

File hashes

Hashes for xmlsec-1.3.9-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 927fc5755bb93dc09275bd5d818811e016290c194012d63f8e6f86b7ece3e468
MD5 203ed18e399fbee07b292a5174cfc155
BLAKE2b-256 4c723f4f6e850d242a44deeaad5c777efd7c65958dd755b8935a56d4ac4dcad9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.5.4

File hashes

Hashes for xmlsec-1.3.9-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 32a669dfe447bccecdb4ef79221c0452ce6dad919f3a75daf512792141a54dac
MD5 1c76222029380ccbc4a64afdc8c144ac
BLAKE2b-256 23940a6a6fb5ef20571f942cbef6a909c1b238f844a1482d2764ca47c928280a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmlsec-1.3.9-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.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.5.4

File hashes

Hashes for xmlsec-1.3.9-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 31884dc97cc34cf1681a0f239f613969e61f9a01f4c2d2a62e53d68216fe42d6
MD5 dc929b4688bb72f378e0c3eb20aacff9
BLAKE2b-256 fd739d6c796ce9dcc5436ce1c30ac1c9abf43465c5c097afa9a399bf912080cc

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.9-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: xmlsec-1.3.9-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/2.7.17

File hashes

Hashes for xmlsec-1.3.9-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 5e2f263a21fd146859911479ec35e40a57f519e650f56c775f91367d2a1b6e15
MD5 f90fe6604fca031f4c8f5d2c8cb647df
BLAKE2b-256 9851deaeefb423d785614869a7d3a70eaa9f0d641f545bd2d00e106fcea84807

See more details on using hashes here.

File details

Details for the file xmlsec-1.3.9-cp27-cp27m-win32.whl.

File metadata

  • Download URL: xmlsec-1.3.9-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/2.7.17

File hashes

Hashes for xmlsec-1.3.9-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 f59698cc0366395ca79b48b080674973541aae290670c57d88f05d939a4c00da
MD5 a1187e66f1a18c8d620f011243536a84
BLAKE2b-256 14f21b274671eee755071b42c7a31ec3d212adfcaec5593c1e45de5f24e54b78

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