Tools for working with a Fedora 4 repository.
Plastron is composed of several distribution packages, arranged in three layers:
- plastron-cli: Command-line tool. Also includes the
handler classes for the
loadcommand - plastron-stomp: STOMP daemon for handling asynchronous operations
- plastron-web: Web application for handling synchronous operations
- plastron-models: Content models, CSV serialization
- plastron-repo: Repository operations and structural models (LDP, PCDM, Web Annotations, etc.)
- plastron-jobs: Batch repository operations (import, export, publish, etc.)
- plastron-client: The Fedora repository API client
- plastron-messaging: STOMP message models and message broker connection handling
- plastron-rdf: RDF-to-Python property mapping
- plastron-utils: Namespace definitions and miscellaneous utilities
The intent is that these distribution packages are independently useful, either as tools that can be run or libraries to be included in other projects.
This "layer cake" style diagram represents the dependencies among the
plastron-* distribution packages:
block-beta
columns 6
cli:2 web:2 stomp:2
jobs:6
repo:4 messaging:2
client:2 models:2 space:2
space:2 rdf utils space:2
Requires Python 3.10+
To install the applications (with their dependencies):
pip install plastron-cli
pip install plastron-stomp
pip install plastron-webIf you just need to run the applications, we recommend installing via [pipx] instead:
pipx install plastron-cli
pipx install plastron-stomp
pipx install plastron-webThis will place the executables plastron, plastrond-stomp, and
plastrond-http on your system path.
To install just the API libraries (low- and high-level), use pip install
with the appropriate package name.
This repository includes a .python-version file. If you are using a tool like pyenv to manage your Python versions, it will select an installed Python 3.8 for you.
To install Plastron in development mode, do the following:
git clone [email protected]:umd-lib/plastron.git
cd plastron
python -m venv --prompt "plastron-py$(cat .python-version)" .venv
source .venv/bin/activate
pip install --upgrade pip
pip install --use-pep517 \
-e './plastron-utils[test]' \
-e './plastron-client[test]' \
-e './plastron-rdf[test]' \
-e './plastron-messaging[test]' \
-e './plastron-models[test]' \
-e './plastron-repo[test]' \
-e './plastron-jobs[test]' \
-e './plastron-web[test]' \
-e './plastron-stomp[test]' \
-e './plastron-cli[test]'This allows for in-place editing of Plastron's source code in the git repository (i.e., it is not locked away in a Python site-packages directory structure).
Plastron uses the pytest test framework for its tests.
pytestSee the testing documentation for more information.
To generate API documentation from the code, use pdoc:
pip install pdocTo use the built-in, live-reloading web server to generate and browse the documentation, use:
pdoc plastronThe generated HTML documentation will be available at http://localhost:8080/plastron.html.
The plastron is the nearly flat part of the shell structure of a turtle, what one would call the belly or ventral surface of the shell.
Source: Wikipedia
See the LICENSE file for license rights and limitations (Apache 2.0).