Skip to main content

Initiates, monitors, and reports on bulk user operations in FOLIO.

Project description

FOLIO User Bulk Edit

Initiates, monitors, and reports on bulk user operations in FOLIO. Not to be confused with the very limited user capabilities of bulk edit.

Installation

User Bulk Edit is available on PyPi. It can be installed using:

pip install folio-user-bulk-edit

Additionally if you wish to only use the cli you can install it using pipx:

pipx install folio-user-bulk-edit

Check out the CHANGELOG for what's new!

Usage

As a cli tool

The executable to run the tool is ube. If you installed using pip or pipx it should be on your path and executable.

You can also run the cli without installing using pipx:

pipx run --spec folio-user-bulk-edit ube

By default a ./logs directory will be created to store more verbose logging information that is output to the console. This location is controlled by using the --log-directory parameter.

Many parameters can be specified using environment variables. The general format is UBE__SECTION_NAME__VARIABLE_NAME. Run ube --help for a full list of options and the corresponding environment variables.

The User Bulk Edit has two modes which take the same core parameters.

ube check <data>

This command will ensure the connection to FOLIO is ok and report any issues with the data. Check makes no changes to FOLIO or your local file system and is ok to run repeatedly. It is using the Pandera library, consult the documentation for more information on interpreting the check.

Check is a "best effort" check. Data with check errors may still import into FOLIO fine, and data without check errors may still encounter issues during import.

ube import <data>

This command will import the user data file through the mod-user-import endpoint. The data will be batched and as much of it will be imported as possible. The user-mod-import endpoint returns information about users imported, this information is summarized and reported after running. The full list of errored users and causes can be found in the log directory as a csv.

As a library

If you are programatically calling ube you can use it as a python library by doing the following:

from pathlib import Path
from folio_bulk_user_edit.commands import check, user_import

check_results = check.run(check.CheckOptions(
    folio_url="...",
    folio_tenant="...",
    folio_username="...",
    folio_password="...",
    data_location=Path("to" / "file.csv"),
))

if check_results.folio_ok and check_results.schema_ok and check_results.read_ok:
    import_results = user_import.run(check.ImportOptions(
        folio_url="...",
        folio_tenant="...",
        folio_username="...",
        folio_password="...",
        data_location=Path("to" / "file.csv"),
        batch_size=1000,
        retry_count=1,
        deactivate_missing_users=False,
        update_all_fields=False,
    ))

There are some utility subpackages in the root package that might also be useful. Especially the schemas.

Contributing

See CONTRIBUTING.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

folio_user_bulk_edit-1.0.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

folio_user_bulk_edit-1.0.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file folio_user_bulk_edit-1.0.0.tar.gz.

File metadata

  • Download URL: folio_user_bulk_edit-1.0.0.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for folio_user_bulk_edit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 18eb2ac29032380dbeae4807854e1abb64a93b7ddd53f552c283bad0447f0a40
MD5 7bd4cb4542286208242b2dd78696e4dc
BLAKE2b-256 450d9e4642c6a24c64025989015923b8291d3b25eade84689c8ca1a481546765

See more details on using hashes here.

Provenance

The following attestation bundles were made for folio_user_bulk_edit-1.0.0.tar.gz:

Publisher: publish.yml on Five-Colleges-Incorporated/folio-user-bulk-edit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file folio_user_bulk_edit-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for folio_user_bulk_edit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 930edaa503476f74f728638ddce822746a8b9683187f7f4d3440f3698748bc31
MD5 06b0d1320f633feae1f1adbf27ab9aa6
BLAKE2b-256 15d5010b90a07fd0d12df918ab2f39d68975cb859bbf62d1f49887579da3bee6

See more details on using hashes here.

Provenance

The following attestation bundles were made for folio_user_bulk_edit-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Five-Colleges-Incorporated/folio-user-bulk-edit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page