Skip to main content

SWORD2 python client

A python library and client to connect to and use SWORD v2 compliant servers.

SWORD overview

SWORD was originally a JISC-funded initiative to define and develop a standard mechanism for depositing into repositories and other systems. Why was it created? because there was no standard way of doing this. A standard deposit interface to repositories allows more services to be built which can offer functionality such as deposit from multiple locations, e.g. disparate repositories, desktop drag’n'drop tools or from within standard office applications. SWORD can also facilitate deposit to multiple repositories, increasingly important for depositors who wish to deposit to funder, institutional or subject repositories. Other possibilities include migration of content between repositories, transfer to preservation services and many more.

SWORD is an Atom Publishing Profile

Rather than develop a new standard from scratch, SWORD chose to leverage the existing Atom Publishing Protocol (APP), “an application-level protocol for publishing and editing Web resources”. APP is based on the HTTP transfer of Atom-formatted representations yet SWORD has focussed on two key aspects of the protocol – the deposit of files, rather than Atom documents, and the extension mechanism for specifying additional deposit parameters. Also worth noting is that SWORD does not specify the implementation of all of the functionality of APP, rather it supports deposit only – implementations are free to support update and delete if they wish but this is out of the SWORD remit.

Python Client library

Dependencies

The core dependency is httplib2, and uses this for all of its HTTP requests and response handling.

The python client tries to use any suitable ElementTree library implementation (lxml, xml.etree, cElementTree, ElementTree) and will fail without one.

Installation:

$ pip install .

(use of a virtualenv is recommended)

Software links:

Usage documentation: https://github.com/swordapp/python-client-sword2/wiki

API documentation: http://packages.python.org/sword2/

Repository: https://github.com/swordapp/python-client-sword2

Issue-tracker: https://github.com/swordapp/python-client-sword2/issues

Metadata

Release files for sword2 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sword2 0.3
File Size Uploaded
sword2-0.3.tar.gz 42.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sword2 0.3
File Interpreter ABI Platform
sword2-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 89.3 kB

Release files / sword2-0.3.tar.gz

Download URL sword2-0.3.tar.gz
Size 42.0 kB
Tags Source
SHA-256 checksum
How to use checksums
720f171ff13ff69baef682f753b8636b074469c38441dfaedaa08de1d4f419ec
BLAKE2b-256 checksum
How to use checksums
1e2a98cbe2520f5ba0c1e13c067f2131e8019615f609ac1904ada25ddafd539e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.10.10-200.fc33.x86_64

Release files / sword2-0.3-py3-none-any.whl

Download URL sword2-0.3-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae8a7165b2c0389cc1aa4ad75a4ca866c232e4506e6a4b7dd50b81082049c89f
BLAKE2b-256 checksum
How to use checksums
3bf0a363b19787eb9a4631d7a1941ee677bed188305e4541525c688333f1473b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.10.10-200.fc33.x86_64
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page