Runnable samples
The examples below are also available as scripts in the samples directory. Run them from the repository root or after installing the package. They require a reachable geOrchestra instance and an account permitted to use the requested services.
Each script defines editable SERVER, USERNAME, and PASSWORD constants near the top. Replace the placeholder values with your instance URL and account before running; the metadata-string helper only needs SERVER.
Library examples
- Console API: reads the configured user by default.
--applycreates and deletes temporary test resources.--update-user-descriptionchanges the configured user's description.
python samples/console_api_demo.py
python samples/console_api_demo.py --apply
- Combined client: lists active filesystem harvests and optionally reads a record with
--uuid UUID.--assign-harvestschanges harvest assignments.--batch-editedits the selected record and must be used with--uuid.
python samples/georchestra_client_demo.py --uuid UUID
python samples/georchestra_client_demo.py --uuid UUID --batch-edit
- GeoNetwork API: reads site and thesaurus information by default.
--thesaurus-file FILEuploads a thesaurus;--overwrite-metadata FILEoverwrites and publishes a record.
python samples/geonetwork_api_demo.py
python samples/geonetwork_api_demo.py --thesaurus-file vocabulary.rdf
- Metadata thesaurus helper: adds a selected GeoNetwork keyword to an input metadata file and writes to
sample_meta3.xmlby default. Use--output FILEto choose another destination.
python samples/metadata_thesaurus_demo.py metadata.xml --output updated.xml
- Metadata string helper: adds a legacy ISO 19139 thesaurus element and writes to
<input>.newby default.
python samples/meta_manipulation_demo.py metadata.xml
- Duplicate resource identifiers: existing sample for detecting duplicate resource identifiers.
Remote changes are deliberately opt-in. Review the sample and target instance before using mutation flags, especially --update-user-description, --assign-harvests, --batch-edit, --thesaurus-file, and --overwrite-metadata.
Other command-line tools
These files are standalone utilities, not library demos; their main() entry points remain in place:
- LDAP LDIF creator, with usage notes in the LDAP README.
- Proxy link generator, with usage notes in the proxy README.