Skip to main content

pyPreservica

Supported Versions CodeQL PyPI Downloads

Python language binding for the Preservica API

https://preservica.com/

This library provides a Python class for working with the Preservica Rest API

https://developers.preservica.com/api-reference

Wiki with example scripts https://github.com/carj/pyPreservica/wiki

Quick Start

Fetch an asset and browse its parent folder:

from pyPreservica import *

client = EntityAPI()

# Fetch an asset by its UUID
asset = client.asset("dc949259-2c1d-4658-8eee-c17b27a8823d")
print(asset.title)         # LC-USZ62-20901
print(asset.security_tag)  # open

# List all children of a folder
folder = client.folder(asset.parent)
for child in client.children(folder.reference):
    print(child.title, child.entity_type)

Upload a file as a new asset into an existing folder:

from pyPreservica import *

upload = UploadAPI()
folder_ref = "ae108c8f-b058-4228-b099-6049175d2f0c"
package = simple_asset_package(preservation_file="picture.tiff", parent_folder=folder_ref)
upload.upload_zip_package(package)

Search the repository:

from pyPreservica import *

content = ContentAPI()
for hit in content.simple_search_list("London"):
    print(hit)

Credentials can also be passed as constructor arguments or stored in a credentials.properties file. See the full documentation for all authentication options.

Documentation

The full documentation is available at: https://pypreservica.readthedocs.io/

Documentation Status

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/carj/pyPreservica

For announcements about new versions and discussion of pyPreservica please subscribe to the google groups forum https://groups.google.com/g/pypreservica

License

The package is available as open source under the terms of the Apache License 2.0

Installation

pyPreservica is available from the Python Package Index (PyPI)

https://pypi.org/project/pyPreservica/

To install pyPreservica, simply run this simple command in your terminal of choice:

$ pip install pyPreservica

Metadata

Release files for pyPreservica 4.2.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 pyPreservica 4.2.3
File Size Uploaded Provenance Actions
pypreservica-4.2.3.tar.gz 138.2 kB Without provenance Details for pypreservica-4.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyPreservica 4.2.3
File Interpreter ABI Platform Actions
pypreservica-4.2.3-py3-none-any.whl Python 3 none any Details for pypreservica-4.2.3-py3-none-any.whl

Total release size: 263.3 kB

Release files / pypreservica-4.2.3.tar.gz

Download URL pypreservica-4.2.3.tar.gz
Size 138.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e117fdedc1513528c95e57ce033eb039e5bc63994ca3f334784a5e6d1c99f394
BLAKE2b-256 checksum
How to use checksums
a8396f42d1950af237f1b65850d87e5fbc51eed9dea57ab3de2138a99a0ac650
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / pypreservica-4.2.3-py3-none-any.whl

Download URL pypreservica-4.2.3-py3-none-any.whl
Size 125.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06eded5a6b70832b56095b19120a082524910c982023823f3ef572beae1f94a6
BLAKE2b-256 checksum
How to use checksums
f5f3c64004b884ef255d147c4f4401889b0612292279c8e4f13821e51d6ccfd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Security for pyPreservica 4.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.2.3 This release

2 release files No provenance

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