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.11.tar.gz
.
File metadata
- Download URL: xmlsec-1.3.11.tar.gz
- Upload date:
- Size: 61.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd2eaaff7f31784a07dd99ce81fa767313df3ba1834faa4143ee2c07000cac7a |
|
MD5 | 8fab1bb4919fd45ea7eb02539eb8b6d2 |
|
BLAKE2b-256 | ffdd0893ae620bfe3537eaa91c3a24e70dceba616b0cc71ed8e9fe9d0289fe34 |
File details
Details for the file xmlsec-1.3.11-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb38ab0bf3e47cbae136119674a869e09d61c939b510350f369c8ac46087373 |
|
MD5 | 3b971233864af5e917d8a7d5588c62b2 |
|
BLAKE2b-256 | 9827d91697a59419dc09c935f4208a09ec4616f2ffe61d4a452fe0ecd5e580e6 |
File details
Details for the file xmlsec-1.3.11-cp39-cp39-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 843d10bba4c480609da74ee11fff1ee0fc1c12821c656979f12a7a4ecb043e03 |
|
MD5 | 7c3e3a69e7071ce4c543b591a4792445 |
|
BLAKE2b-256 | d769ce30beabe841229d3355abfccf3a45ca09984136338d9deddaaec7257e5e |
File details
Details for the file xmlsec-1.3.11-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23f209260b37bdc2fd96af837494c47dd1e67964f077442b63acd83c0f62e212 |
|
MD5 | 8dd1f098be00232fc855d4a5071aec24 |
|
BLAKE2b-256 | 330ff1ea1bcf7dbfc09a553e3d302dcb36a10eecd83bc07187f14eeaddeb45ba |
File details
Details for the file xmlsec-1.3.11-cp38-cp38-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7b49d4fce83186b89f7ce6cec765245d36a70d0acc2f3ed0ba95c735b3667da |
|
MD5 | 7a3cd7e38d5dc7d1073e6fbcdd994497 |
|
BLAKE2b-256 | d9382b8d1322ccf4ec4877833a6ab8ebf3592383fc2b5b7e2821be917fe6df39 |
File details
Details for the file xmlsec-1.3.11-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee233d0bc27fb8f447ca2622b0de2ac2df45b8795f02ef263825912011fe4fe9 |
|
MD5 | 3e791435a31ae9323cd98144f8889cad |
|
BLAKE2b-256 | aa7b98f8d6ef14c06c1429cb432c2380022fea5bf2badb53bd6f778c6caf1acd |
File details
Details for the file xmlsec-1.3.11-cp37-cp37m-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea5bef9b5830c36ccb7a68a0d94d49eaea4d03fbbd04179652bf661b7e6e30f |
|
MD5 | d64ea05aa18d063227ed7342d5bc3c8d |
|
BLAKE2b-256 | ea7c0bd6f832b94cc10e1ab1c31bc769e33cb44802167f6296b347013d9931d3 |
File details
Details for the file xmlsec-1.3.11-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86d54b93f8278e2f0c504d0744e39a483c1c7ce9993f2ca70184cc7770faa982 |
|
MD5 | f0e8797b32cd7ceafbbd2acb8cf19705 |
|
BLAKE2b-256 | 961393000dfd14d2d4524df00126397c1d306a7bc48611c0661aaad25d831efb |
File details
Details for the file xmlsec-1.3.11-cp36-cp36m-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eadff662d89c80db409c69d82eb3e695e16d4a5e8ab56b5b22670a54e9c6ff20 |
|
MD5 | 5fa473b4fd882e072962a9c6fbdaf711 |
|
BLAKE2b-256 | 05afd8f93ff0a4ddf1a301eeb1dbc6f4adc424be036e9817bfef9b9207ec684b |
File details
Details for the file xmlsec-1.3.11-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.61.0 CPython/3.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 705ab5b848afdf3a5c78b1322276054c885f44dc51601e14cb883a9c86cbe20f |
|
MD5 | 331eab5ce0f1751443e1a8844968bee5 |
|
BLAKE2b-256 | baffff7e783b43879e76738358855a8c035d53a1f65ac7ced5714c45cb2ae449 |
File details
Details for the file xmlsec-1.3.11-cp35-cp35m-win32.whl
.
File metadata
- Download URL: xmlsec-1.3.11-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.61.0 CPython/3.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8922fba55a060ee81de4a7f5efc593c5bf121047763aecf0eead02e061c9d2db |
|
MD5 | 41ac4bf19acc9732807fff78c7e0bc0a |
|
BLAKE2b-256 | 8569c93c32048b4b84f2ec8da4284083bf478b594b2a5c914819b306e81a2c6d |