Python bindings for the XML Security Library
Project description
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:
Configure build environment, see wiki.python.org for more details.
Install from source dist:
pip install xmlsec --no-binary=xmlsec
Building from source
Clone the xmlsec source code repository to your local computer.
git clone https://github.com/mehcode/python-xmlsec.git
Change into the python-xmlsec root directory.
cd /path/to/xmlsec
Install the project and all its dependencies using pip.
pip install .
Contributing
Setting up your environment
Follow steps 1 and 2 of the manual installation instructions.
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.
Activate the created virtual environment:
workon xmlsec
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
Run the unit tests.
pytest tests
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file xmlsec-1.3.8.tar.gz
.
File metadata
- Download URL: xmlsec-1.3.8.tar.gz
- Upload date:
- Size: 59.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86943fe2b31cd3b584d23987f404e9309f5251019c15bb565b3a65a4799425ce |
|
MD5 | 981dc9890747bb269115d33283b66a54 |
|
BLAKE2b-256 | c3e53e3183715fb3f98bd1ad44a7cc4a278bfeb800b9e9c2d50fe15f8522e548 |
File details
Details for the file xmlsec-1.3.8-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 317d1a7d7e69233890dc3d107a1da78769dc9239e7dc37a11824cdfe437496ad |
|
MD5 | 131e33469f89b587de9fdfe38a6a8231 |
|
BLAKE2b-256 | d1d879a8428557d511351f9f398d7c135bcdecb5d05fac5f907f8119ef486f9a |
File details
Details for the file xmlsec-1.3.8-cp38-cp38-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c63b96755d50ac3a8cae9207e0b1b844cba0e9957f8496dd16317b84c8c0700 |
|
MD5 | 2072498ae3dfb0130c960cabf3c50dde |
|
BLAKE2b-256 | 7ceaba603bbb7ebbf8b86b8d4706353e93ffd999d59b8a1c4d0872481be31fc1 |
File details
Details for the file xmlsec-1.3.8-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3fe3a1256135edec4a35508b577355baaad780a60f4bb34eec9f3281f27cabd |
|
MD5 | 23546b89335aeea059fe2bd9149c3dcf |
|
BLAKE2b-256 | 09abf86dabca4519abf0d8ce7e5705429560733b1d3a5ea7b2de948c528544bc |
File details
Details for the file xmlsec-1.3.8-cp37-cp37m-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a75eab70813bfe3ba1d5e2aa13c91a0a72a04e7e105c8d0d94ab02be94246c50 |
|
MD5 | f95d940c0278c9f20eb9e63587162f13 |
|
BLAKE2b-256 | 7c9297fd2be669bc48d0383930db8ed3ab8ae6ac6332c9169b82d251ff5be5fb |
File details
Details for the file xmlsec-1.3.8-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c15d1e875789eda6965798f229d36e3c847660ad8c92e471a356e9c9f979e06 |
|
MD5 | a42455b0c238e159ed9f3021f37385ee |
|
BLAKE2b-256 | 01fe444fc03aab0a797650047880467001888037084fa958f06350579cc1ac1e |
File details
Details for the file xmlsec-1.3.8-cp36-cp36m-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13e8f99d88b3b630f2b72a7f32edab051dd490e8a070e4b9138f8335a981eea8 |
|
MD5 | 22434728c2df0c2961416c1275f4d947 |
|
BLAKE2b-256 | 0e4b514495262ba2db7787ea9cb8b0ede760bf91f0dfc93e03ae33688e0c3e7b |
File details
Details for the file xmlsec-1.3.8-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d174cd4dfc5d63bc0659d54e03e0ade425e636ff4107f9a96c0eb342814c948 |
|
MD5 | e239b30f260bbdb80abc8e02f6eee1bd |
|
BLAKE2b-256 | 57db6c020582d4cc898658d337a341b66354d0b7b4a36de94afb4f64335757fd |
File details
Details for the file xmlsec-1.3.8-cp35-cp35m-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13cf2c9a82df9f19ddc6c3d9baa1a92aba8011645c29bb4e7df4e3b6a51a86f3 |
|
MD5 | 04f4d816db8a8c6545d4e0f49b4400d7 |
|
BLAKE2b-256 | f4aedfcba7edaff0d88a65d3f5b05ea7686317ce95d713062baa3b29d25b3e1b |
File details
Details for the file xmlsec-1.3.8-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6bcac5ee9cd0cb5aa2d4d1e14f3714c5a09185607828285179c2c94fcc083dc |
|
MD5 | ef67c8d26e9b05ec13a53ff57bf9c10c |
|
BLAKE2b-256 | a6e0ebbf4d8a365215a7bb646ceab78e2d96d76733b76855df991e9759b99824 |
File details
Details for the file xmlsec-1.3.8-cp27-cp27m-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.8-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.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/2.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 568614710d0331544146d96532373158b59d8311e01cd1f4cc9947e7d39c0c56 |
|
MD5 | 6cc894a1ed0ce7f4558ccbdb2ed7c682 |
|
BLAKE2b-256 | cafc10fed4d64286046800197f0b49338bb6d04b2d8b3f62ea7f71c2707ff8bd |